diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:47:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:47:29 +0000 |
commit | 0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d (patch) | |
tree | a31f07c9bcca9d56ce61e9a1ffd30ef350d513aa /layout/reftests/svg/smil/restart/reset-6.svg | |
parent | Initial commit. (diff) | |
download | firefox-esr-0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d.tar.xz firefox-esr-0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d.zip |
Adding upstream version 115.8.0esr.upstream/115.8.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/reftests/svg/smil/restart/reset-6.svg')
-rw-r--r-- | layout/reftests/svg/smil/restart/reset-6.svg | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/layout/reftests/svg/smil/restart/reset-6.svg b/layout/reftests/svg/smil/restart/reset-6.svg new file mode 100644 index 0000000000..a0fe33ae2d --- /dev/null +++ b/layout/reftests/svg/smil/restart/reset-6.svg @@ -0,0 +1,58 @@ +<!-- + SMIL3 5.4.3, "Resetting element state" has: + + Any instance times associated with past Event-values, Repeat-values, + Accesskey-values or added via DOM method calls are removed from the + dependent begin and end instance times lists. In effect, all events and DOM + methods calls in the past are cleared. This does not apply to an instance + time that defines the begin of the current interval. + + In this test we have the following scenario: + + <set begin="1s" end="2s" dur="1s" ... /> + + giving us: + + |...| + 1 2 + + Then at t=1.5s we have the following DOM calls + + anim.beginElementAt(1.5); + anim.endElementAt(2); + + potentially giving us: + + |...| | | + ^ + 1 2 3 3.5 + + At t=2s we'll go to look for the next interval and construct one from 3s-3.5s. + We should apply restart behaviour at t=3s meaning we'll reset instance times + generated by DOM calls in the past however we'll keep the begin instance time + at 3s since it defines the beginning of the (now) current interval. Sticking + to the letter of the spec quoted above however, we'll end up clearing the end + instance at 3.5s. Yet in this case we should use the active end (t=4s) since + there's no end attribute specified. + --> +<svg xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + class="reftest-wait" + onload="addInstanceTimes()"> + <script type="text/ecmascript"><![CDATA[ + function addInstanceTimes() { + var svg = document.documentElement; + svg.pauseAnimations(); + svg.setCurrentTime(1.5); + var anim = document.getElementById('anim'); + anim.beginElementAt(1.5); + anim.endElementAt(2); + setTimeAndSnapshot(3.7, true); + } + ]]></script> + <script xlink:href="../smil-util.js" type="text/javascript"/> + <rect width="100" height="100" fill="red"> + <set attributeName="fill" attributeType="CSS" + to="green" begin="1s" dur="1s" fill="remove" id="anim"/> + </rect> +</svg> |