mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
Cancel animations that affect nodes that do not participate in layout.
This commit is contained in:
parent
8fb1b567fa
commit
ed74b898a5
9 changed files with 89 additions and 10 deletions
|
@ -13458,6 +13458,12 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/animation-removed-node.html": [
|
||||
[
|
||||
"/_mozilla/mozilla/animation-removed-node.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/binding_keyword.html": [
|
||||
[
|
||||
"/_mozilla/mozilla/binding_keyword.html",
|
||||
|
@ -26613,6 +26619,10 @@
|
|||
"81de5b389c922067c61effe03208ea740ba8e067",
|
||||
"testharness"
|
||||
],
|
||||
"mozilla/animation-removed-node.html": [
|
||||
"6ba0318ea1e07b42ef444f838753adbefe9633d6",
|
||||
"testharness"
|
||||
],
|
||||
"mozilla/binding_keyword.html": [
|
||||
"818d2aa29471026c1b4215dfcd1b9939a052b1ea",
|
||||
"testharness"
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
[animation-removed-node.html]
|
||||
prefs: [css.animations.testing.enabled:true]
|
28
tests/wpt/mozilla/tests/mozilla/animation-removed-node.html
Normal file
28
tests/wpt/mozilla/tests/mozilla/animation-removed-node.html
Normal file
|
@ -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>
|
Loading…
Add table
Add a link
Reference in a new issue