Bug 536677 - fill with url to gradient not inherited when dynamically switched more than once. r=roc
This commit is contained in:
Родитель
670ca37ef7
Коммит
a1ab13f3d1
|
@ -5,7 +5,7 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" class="reftest-wait"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
onload="startTest()">
|
||||
<title>Testing that dynamic changes to the element for a given ID are reflected in patterns</title>
|
||||
<title>Testing that dynamic changes to the element for a given ID are reflected in gradients</title>
|
||||
<style>
|
||||
.foo stop { stop-color:lime; }
|
||||
</style>
|
||||
|
|
До Ширина: | Высота: | Размер: 1.0 KiB После Ширина: | Высота: | Размер: 1.0 KiB |
|
@ -0,0 +1,36 @@
|
|||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/licenses/publicdomain/
|
||||
-->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" class="reftest-wait"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
onload="startTest()">
|
||||
<title>Testing that dynamic changes to the parent element are reflected in gradients</title>
|
||||
<defs id="d">
|
||||
<linearGradient id="g1" gradientUnits="objectBoundingBox" x2="0" y2="1">
|
||||
<stop stop-color="red" offset="0"/>
|
||||
<stop stop-color="red" offset="1"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="g2" gradientUnits="objectBoundingBox" x2="0" y2="1">
|
||||
<stop stop-color="lime" offset="0"/>
|
||||
<stop stop-color="lime" offset="1"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
|
||||
<g id="g" fill="url(#g1)">
|
||||
<rect id="u1" width="100%" height="100%" />
|
||||
</g>
|
||||
|
||||
<script>
|
||||
function startTest() {
|
||||
document.addEventListener("MozReftestInvalidate", doTest, false);
|
||||
// in case we're not gecko
|
||||
setTimeout(doTest, 5000);
|
||||
}
|
||||
|
||||
function doTest() {
|
||||
document.getElementById("g").setAttribute("fill", "url(#g2)");
|
||||
document.documentElement.removeAttribute("class");
|
||||
}
|
||||
</script>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 1.2 KiB |
|
@ -30,6 +30,7 @@ include moz-only/reftest.list
|
|||
== dynamic-feImage-01.svg pass.svg
|
||||
== dynamic-filter-contents-01.svg dynamic-filter-contents-01-ref.svg
|
||||
== dynamic-gradient-contents-01.svg pass.svg
|
||||
== dynamic-gradient-contents-02.svg pass.svg
|
||||
== dynamic-link-style-01.svg pass.svg
|
||||
== dynamic-marker-01.svg pass.svg
|
||||
== dynamic-marker-02.svg dynamic-marker-02-ref.svg
|
||||
|
|
|
@ -381,6 +381,12 @@ nsSVGEffects::UpdateEffects(nsIFrame *aFrame)
|
|||
GetEffectProperty(style->mMarkerEnd, aFrame, nsGkAtoms::marker_end,
|
||||
CreateMarkerProperty);
|
||||
}
|
||||
|
||||
nsIFrame *aKid = aFrame->GetFirstChild(nsnull);
|
||||
while (aKid) {
|
||||
UpdateEffects(aKid);
|
||||
aKid = aKid->GetNextSibling();
|
||||
}
|
||||
}
|
||||
|
||||
nsSVGFilterProperty *
|
||||
|
|
Загрузка…
Ссылка в новой задаче