diff options
author | Brian Birtles <birtles@gmail.com> | 2017-08-16 15:01:44 +0900 |
---|---|---|
committer | Brian Birtles <birtles@gmail.com> | 2017-08-16 15:01:44 +0900 |
commit | 9ecb0aa7fa890bf872c0310d213efb0587721c7e (patch) | |
tree | 9f9a68f29dd91ecf9f3f6f2f63f61c8461903542 /components/script/dom/webglframebuffer.rs | |
parent | dc654c991238305d6fc0524173c85f40d7b9e90f (diff) | |
download | servo-9ecb0aa7fa890bf872c0310d213efb0587721c7e.tar.gz servo-9ecb0aa7fa890bf872c0310d213efb0587721c7e.zip |
Don't allow interpolating 'fill:none' with 'fill:none'
In SMIL we don't expect the 'none' value of the 'fill' property to be
additive and hence the following animation should have no effect:
<rect width="100" height="100" y="100" fill="blue">
<animate attributeName="fill" dur="3s" from="red" by="none"/>
</rect>
Although SMIL doesn't make this entirely clear, [1] says that "by
animation" and "from-by animation" may only be used "with attributes
that support addition (e.g. most numeric attributes)" and [2] says that
<paint>s are "only additive if each value can be converted to an RGB
color". As a result, the animation above should have no effect.
By extrapolation, animating from 'none' by 'none' should also have no
effect:
<rect width="100" height="100" y="100" fill="blue">
<animate attributeName="fill" dur="3s" from="none" by="none"/>
</rect>
However, in Servo's interpolation of <paint>s we special case the
interpolation and addition of 'none' such that if both values are 'none'
it is allowed.
We should disallow this in order to produce the expected behavior and in
order to match Gecko's behavior.
[1] https://www.w3.org/TR/smil-animation/#AnimFuncValues
[2] https://www.w3.org/TR/SVG11/animate.html#AnimationAttributesAndProperties
Diffstat (limited to 'components/script/dom/webglframebuffer.rs')
0 files changed, 0 insertions, 0 deletions