зеркало из https://github.com/mozilla/gecko-dev.git
Bug 680035 - Filter elements do not react to color-interpolation-filters attribute changes. r=roc
--HG-- rename : layout/reftests/svg/dynamic-filter-contents-01.svg => layout/reftests/svg/dynamic-filter-contents-01a.svg
This commit is contained in:
Родитель
936be219fa
Коммит
789bcf6dff
|
@ -287,6 +287,20 @@ NS_IMETHODIMP nsSVGFE::GetResult(nsIDOMSVGAnimatedString * *aResult)
|
|||
return GetResultImageName().ToDOMAnimatedString(aResult, this);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsIContent methods
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsSVGFE::IsAttributeMapped(const nsIAtom* name) const
|
||||
{
|
||||
static const MappedAttributeEntry* const map[] = {
|
||||
sFiltersMap
|
||||
};
|
||||
|
||||
return FindAttributeDependence(name, map, NS_ARRAY_LENGTH(map)) ||
|
||||
nsSVGFEBase::IsAttributeMapped(name);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGElement methods
|
||||
|
||||
|
@ -2751,8 +2765,7 @@ NS_IMETHODIMP_(PRBool)
|
|||
nsSVGFEFloodElement::IsAttributeMapped(const nsIAtom* name) const
|
||||
{
|
||||
static const MappedAttributeEntry* const map[] = {
|
||||
sFEFloodMap,
|
||||
sFiltersMap
|
||||
sFEFloodMap
|
||||
};
|
||||
|
||||
return FindAttributeDependence(name, map, NS_ARRAY_LENGTH(map)) ||
|
||||
|
|
|
@ -147,6 +147,9 @@ public:
|
|||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_NSIDOMSVGFILTERPRIMITIVESTANDARDATTRIBUTES
|
||||
|
||||
// nsIContent interface
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
|
||||
virtual nsSVGString& GetResultImageName() = 0;
|
||||
// Return a list of all image names used as sources. Default is to
|
||||
// return no sources.
|
||||
|
|
До Ширина: | Высота: | Размер: 1017 B После Ширина: | Высота: | Размер: 1017 B |
|
@ -0,0 +1,28 @@
|
|||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<svg class="reftest-wait" xmlns="http://www.w3.org/2000/svg" onload="startTest()">
|
||||
<defs>
|
||||
<filter id="f" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox"
|
||||
x="0" y="0" width="1" height="1">
|
||||
<feFlood flood-color="#ff0000" flood-opacity="0.5" result="flood"/>
|
||||
<feComposite id="comp" width="1" height="1" in="flood" operator="over" in2="SourceGraphic"/>
|
||||
</filter>
|
||||
</defs>
|
||||
|
||||
<rect width="100" height="100" fill="lime" filter="url(#f)"/>
|
||||
|
||||
<script>
|
||||
function startTest() {
|
||||
document.addEventListener("MozReftestInvalidate", doTest, false);
|
||||
// in case we're not gecko
|
||||
setTimeout(doTest, 5000);
|
||||
}
|
||||
|
||||
function doTest() {
|
||||
document.getElementById("comp").setAttribute("color-interpolation-filters", "sRGB");
|
||||
document.documentElement.removeAttribute('class');
|
||||
}
|
||||
</script>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 967 B |
|
@ -64,7 +64,8 @@ fails-if(Android) == dynamic-conditions-01.svg pass.svg # bug 652050
|
|||
== dynamic-clipPath-01.svg pass.svg
|
||||
== dynamic-feFlood-01.svg pass.svg
|
||||
== dynamic-feImage-01.svg pass.svg
|
||||
== dynamic-filter-contents-01.svg dynamic-filter-contents-01-ref.svg
|
||||
== dynamic-filter-contents-01a.svg dynamic-filter-contents-01-ref.svg
|
||||
== dynamic-filter-contents-01b.svg dynamic-filter-contents-01-ref.svg
|
||||
== dynamic-gradient-contents-01.svg pass.svg
|
||||
== dynamic-gradient-contents-02.svg pass.svg
|
||||
== dynamic-inner-svg-01.svg pass.svg
|
||||
|
|
Загрузка…
Ссылка в новой задаче