Bug 1353208 - Add check for attribute namespace ID when we decide if it should animate as a CSS property or not; r=dholbert

This seems like an existing bug. If the content specifies
attributeType="yer:opacity", we should not try to animate it as a CSS property.
This patch adds a namespace check before we try to animate as a CSS property.

MozReview-Commit-ID: 1LpBa23ddqX

--HG--
extra : rebase_source : c5a4edb4c48bfd6116e58d4ef3eb91384ee86bd5
This commit is contained in:
Brian Birtles 2017-03-30 16:13:02 +09:00
Родитель 6b8dbeadd1
Коммит 5986b384f6
3 изменённых файлов: 13 добавлений и 0 удалений

Просмотреть файл

@ -141,6 +141,10 @@ nsSMILCompositor::CreateSMILAttr()
nsCSSPropertyID
nsSMILCompositor::GetCSSPropertyToAnimate() const
{
if (mKey.mAttributeNamespaceID != kNameSpaceID_None) {
return eCSSProperty_UNKNOWN;
}
nsCSSPropertyID propID =
nsCSSProps::LookupProperty(nsDependentAtomString(mKey.mAttributeName),
CSSEnabledState::eForAllContent);

Просмотреть файл

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<rect x="15" y="15" width="200" height="200" fill="blue">
<set attributeName="xlink:opacity" to="0.5" begin="0s" fill="freeze"/>
</rect>
</svg>

После

Ширина:  |  Высота:  |  Размер: 241 B

Просмотреть файл

@ -155,3 +155,6 @@ fuzzy-if(skiaContent,1,170) == anim-css-strokewidth-4-from-by-no-no.svg anim-c
# check correct handling of "!important" values
== important-set-1.svg anim-standard-ref.svg
== important-set-2.svg anim-standard-ref.svg
# check namespaced attribute
== namespaced-property-1.svg anim-standard-ref.svg