Bug 1518494 [wpt PR 14748] - Ignore instance times from endElement*() for inactive timed elements, a=testonly
authorFredrik Söderquist <fs@opera.com>
Thu, 31 Jan 2019 15:45:46 +0000
changeset 457760 121ea962aa35bbf8ea073b527ffee46c36f6224c
parent 457759 96a038e47ce0afcce500a4a82622ecbf9c7794fc
child 457761 976daadd87694ea64d169d8972d6fe5e49922e96
push id111763
push userjames@hoppipolla.co.uk
push dateThu, 07 Feb 2019 22:12:57 +0000
treeherdermozilla-inbound@c983e907bbfd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1518494, 14748, 20010904, 241742, 1400663, 620752
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1518494 [wpt PR 14748] - Ignore instance times from endElement*() for inactive timed elements, a=testonly Automatic update from web-platform-tests Ignore instance times from endElement*() for inactive timed elements When endElementAt()/endElement() is trying to add a new instance time and there's no active interval, just ignore the new instance time. Spec: "While the element is not active, any end specification of the event is ignored." (https://www.w3.org/TR/2001/REC-smil-animation-20010904/#Timing-EventSensitivity) Bug: 241742 Change-Id: Ic3333698ac275eff32bd87f5e0205c1004c3e2d4 Reviewed-on: https://chromium-review.googlesource.com/c/1400663 Reviewed-by: Stephen Chenney <schenney@chromium.org> Commit-Queue: Fredrik Söderquist <fs@opera.com> Cr-Commit-Position: refs/heads/master@{#620752} -- wpt-commits: 3aeda5c548e6e15aa8f2ecd8180fd13a80ceb716 wpt-pr: 14748
testing/web-platform/tests/svg/animations/scripted/end-element-on-inactive-element.svg
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/animations/scripted/end-element-on-inactive-element.svg
@@ -0,0 +1,20 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:h="http://www.w3.org/1999/xhtml">
+  <h:script src="/resources/testharness.js"/>
+  <h:script src="/resources/testharnessreport.js"/>
+  <rect width="100" height="100" fill="red">
+    <set id="anim" attributeName="fill" to="green" begin="indefinite"/>
+  </rect>
+  <script>
+    async_test(t => {
+      let anim = document.getElementById("anim");
+      onload = t.step_func(() => {
+        anim.endElement();
+        anim.beginElement();
+
+        requestAnimationFrame(t.step_func_done(() => {
+          assert_equals(getComputedStyle(anim.parentNode).fill, "rgb(0, 128, 0)");
+        }));
+      });
+    }, "endElement() on an inactive element");
+  </script>
+</svg>