mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-31 11:37:30 +09:00
Bug 1202333: AnimationEvent elapsedTime should reflect playbackRate (added tests)
Issue #55
This commit is contained in:
parent
901d2a277f
commit
2243f5248c
10 changed files with 469 additions and 24 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue