Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cancel animations that affect nodes that do not participate in layout.
- Loading branch information
Showing
9 changed files
with
89 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
tests/wpt/mozilla/meta/mozilla/animation-removed-node.html.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[animation-removed-node.html] | ||
prefs: [css.animations.testing.enabled:true] |
28 changes: 28 additions & 0 deletions
28
tests/wpt/mozilla/tests/mozilla/animation-removed-node.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<style> | ||
@keyframes boo { | ||
0% { opacity: 0; } | ||
100% { opacity: 1; } | ||
} | ||
div.test { animation: boo 1s infinite; } | ||
</style> | ||
<div class="test" id="first">hi there!</div> | ||
<div class="test" id="second">hi again!</div> | ||
<script> | ||
async_test(function(t) { | ||
window.onload = t.step_func(function() { | ||
// Verify that there are the expected animations active. | ||
assert_equals(window.runningAnimationCount, 2); | ||
// Cause the animating nodes to become uninvolved with layout. | ||
document.getElementById('first').remove(); | ||
document.getElementById('second').style.display = 'none'; | ||
// Ensure that we wait until the next layout is complete. | ||
requestAnimationFrame(t.step_func(function() { | ||
// Verify that the previous animations are no longer considered active. | ||
assert_equals(window.runningAnimationCount, 0); | ||
t.done(); | ||
})); | ||
}); | ||
}, "Animations are no longer active when a node can't be animated."); | ||
</script> |