summaryrefslogtreecommitdiffstats
path: root/layout
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-14 11:55:23 +0100
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-14 11:55:23 +0100
commitc58cec26c73da9a5c48f7d75555c6a2409965693 (patch)
tree318932a7d433433d94ad2ac0f7c46a1ae66a17fe /layout
parentaade91b13a50ee4f246016fa8d8d1561f58f80ee (diff)
downloadUXP-c58cec26c73da9a5c48f7d75555c6a2409965693.tar
UXP-c58cec26c73da9a5c48f7d75555c6a2409965693.tar.gz
UXP-c58cec26c73da9a5c48f7d75555c6a2409965693.tar.lz
UXP-c58cec26c73da9a5c48f7d75555c6a2409965693.tar.xz
UXP-c58cec26c73da9a5c48f7d75555c6a2409965693.zip
Bug 1202333: AnimationEvent elapsedTime should reflect playbackRate (added tests)
Issue #55
Diffstat (limited to 'layout')
-rw-r--r--layout/reftests/transform-3d/animate-backface-hidden.html10
-rw-r--r--layout/reftests/transform-3d/animate-preserve3d-parent.html10
-rw-r--r--layout/style/test/test_animations.html3
-rw-r--r--layout/style/test/test_animations_omta.html3
4 files changed, 16 insertions, 10 deletions
diff --git a/layout/reftests/transform-3d/animate-backface-hidden.html b/layout/reftests/transform-3d/animate-backface-hidden.html
index ce957bf73..27b587006 100644
--- a/layout/reftests/transform-3d/animate-backface-hidden.html
+++ b/layout/reftests/transform-3d/animate-backface-hidden.html
@@ -17,7 +17,7 @@ body { padding: 50px }
height: 200px; width: 200px;
backface-visibility: hidden;
/* use a -99.9s delay to start at 99.9% and then move to 0% */
- animation: flip 100s -99.9s linear 2;
+ animation: flip 100s -99.9s linear 2 paused;
}
</style>
@@ -27,7 +27,13 @@ body { padding: 50px }
<script>
-document.getElementById("test").addEventListener("animationiteration", IterationListener, false);
+document.getElementById("test").addEventListener("animationstart", StartListener, false);
+
+function StartListener(event) {
+ var test = document.getElementById("test");
+ test.style.animationPlayState = 'running';
+ test.addEventListener("animationiteration", IterationListener, false);
+}
function IterationListener(event) {
setTimeout(RemoveReftestWait, 0);
diff --git a/layout/reftests/transform-3d/animate-preserve3d-parent.html b/layout/reftests/transform-3d/animate-preserve3d-parent.html
index ae3fec196..d05beac6f 100644
--- a/layout/reftests/transform-3d/animate-preserve3d-parent.html
+++ b/layout/reftests/transform-3d/animate-preserve3d-parent.html
@@ -18,7 +18,7 @@ body { padding: 50px }
border: 1px solid black;
transform-style: preserve-3d;
/* use a -99.9s delay to start at 99.9% and then move to 0% */
- animation: spin 100s -99.9s linear 2;
+ animation: spin 100s -99.9s linear 2 paused;
}
#child {
@@ -39,7 +39,13 @@ body { padding: 50px }
<script>
-document.getElementById("parent").addEventListener("animationiteration", IterationListener, false);
+document.getElementById("parent").addEventListener("animationstart", StartListener, false);
+
+function StartListener(event) {
+ var test = document.getElementById("parent");
+ test.style.animationPlayState = 'running';
+ test.addEventListener("animationiteration", IterationListener, false);
+}
function IterationListener(event) {
setTimeout(RemoveReftestWait, 0);
diff --git a/layout/style/test/test_animations.html b/layout/style/test/test_animations.html
index eaccba122..4019af77f 100644
--- a/layout/style/test/test_animations.html
+++ b/layout/style/test/test_animations.html
@@ -1195,9 +1195,6 @@ is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_in(0.4), 0.01,
"large negative delay test at 0ms");
check_events([{ type: 'animationstart', target: div,
animationName: 'anim2', elapsedTime: 3.6,
- pseudoElement: "" },
- { type: 'animationiteration', target: div,
- animationName: 'anim2', elapsedTime: 3.6,
pseudoElement: "" }],
"right after start in large negative delay test");
advance_clock(380);
diff --git a/layout/style/test/test_animations_omta.html b/layout/style/test/test_animations_omta.html
index 4b276c896..0b2a61ecc 100644
--- a/layout/style/test/test_animations_omta.html
+++ b/layout/style/test/test_animations_omta.html
@@ -1408,9 +1408,6 @@ addAsyncAnimTest(function *() {
"large negative delay test at 0ms");
check_events([{ type: 'animationstart', target: gDiv,
animationName: 'anim2', elapsedTime: 3.6,
- pseudoElement: "" },
- { type: 'animationiteration', target: gDiv,
- animationName: 'anim2', elapsedTime: 3.6,
pseudoElement: "" }],
"right after start in large negative delay test");
advance_clock(380);