mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 22:05:44 +00:00
Bug 618205 - SVG SMIL: Correctly fallback to non-additive animation on display and shorthand properties; r=dholbert; a=roc
This commit is contained in:
parent
460d8df030
commit
b3a3833b10
@ -113,10 +113,10 @@ nsSMILCSSProperty::GetBaseValue() const
|
||||
// doing so involves clearing and resetting the property which can cause
|
||||
// frames to be recreated which we'd like to avoid.
|
||||
//
|
||||
// In either case, simply returning a null-typed nsSMILValue to indicate
|
||||
// failure is acceptable because the caller only uses base values when
|
||||
// there's interpolation or addition, and for both the shorthand properties
|
||||
// we know about and the display property those operations aren't supported.
|
||||
// In either case, just return a dummy value (initialized with the right
|
||||
// type, so as not to indicate failure).
|
||||
nsSMILValue tmpVal(&nsSMILCSSValueType::sSingleton);
|
||||
baseValue.Swap(tmpVal);
|
||||
return baseValue;
|
||||
}
|
||||
|
||||
|
14
layout/reftests/svg/smil/anim-additive-fallback-1.svg
Normal file
14
layout/reftests/svg/smil/anim-additive-fallback-1.svg
Normal file
@ -0,0 +1,14 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
class="reftest-wait"
|
||||
onload="setTimeAndSnapshot(0.5, true)">
|
||||
<script xlink:href="smil-util.js" type="text/javascript"/>
|
||||
<rect x="15" y="15" width="200" height="200" fill="blue" display="none">
|
||||
<!-- The following animation is marked as additive even though the display
|
||||
property is not additive. We should basically behave as if the additive
|
||||
attribute were not specified and set display to 'block' after 0.5s.
|
||||
-->
|
||||
<animate attributeName="display" from="none" to="block" additive="sum"
|
||||
dur="1s" fill="freeze"/>
|
||||
</rect>
|
||||
</svg>
|
After Width: | Height: | Size: 668 B |
@ -134,6 +134,9 @@ asserts(9) == anim-use-href-01.svg lime.svg # the asserts here are bug 563481
|
||||
== anim-fill-overpaintserver-1.svg lime.svg
|
||||
== anim-fill-overpaintserver-2.svg lime.svg
|
||||
|
||||
# animate where we fallback from 'additive' animation to non-additive
|
||||
== anim-additive-fallback-1.svg anim-standard-ref.svg
|
||||
|
||||
== anim-remove-1.svg anim-standard-ref.svg
|
||||
== anim-remove-2.svg anim-standard-ref.svg
|
||||
== anim-remove-3.svg anim-standard-ref.svg
|
||||
|
Loading…
Reference in New Issue
Block a user