forked from web-platform-tests/wpt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Call RestartAnimationOnCompositor() whether or not performing_reattac…
…h is true. Even when performing_reattach is false, it's important to call RestartAnimationOnCompositor so that effect_changed will be true, so that if we restart the animation, the compositor gets the new element ID. Without this change, and with https://crrev.com/c/3498292, the added test fails when run in virtual/threaded/. Fixed: 1305487 Bug: 900241 Change-Id: I2fe8c92cd3b395ce8bf0e1b34f274ef56e553b82 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3522511 Reviewed-by: Robert Flack <[email protected]> Commit-Queue: David Baron <[email protected]> Cr-Commit-Position: refs/heads/main@{#981818}
- Loading branch information
Showing
2 changed files
with
45 additions
and
0 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
44 changes: 44 additions & 0 deletions
44
web-animations/crashtests/reparent-animating-element-002.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,44 @@ | ||
<!DOCTYPE html> | ||
<html class="test-wait"> | ||
<title>CSS Test (Animations): Reparenting an element with a web animation on the compositor</title> | ||
<link rel="author" title="L. David Baron" href="https://dbaron.org/"> | ||
<link rel="author" title="Google" href="http://www.google.com/"> | ||
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1305487"> | ||
<meta name="assert" content="This should not crash."> | ||
<!-- | ||
The Chromium implementation of <marquee> essentially uses web animations | ||
underneath. However, I was unable to make a testcase for this crash | ||
that uses web animations directly. Despite that, it still seems worth | ||
adding this testcase here in WPT. | ||
--> | ||
|
||
<style> | ||
#animate { | ||
width: 100px; | ||
height: 100px; | ||
} | ||
#newparent { | ||
display: none; | ||
} | ||
</style> | ||
<marquee id="animate">X</marquee> | ||
<div id="newparent"></div> | ||
<script> | ||
|
||
let a = document.getElementById("animate"); | ||
|
||
requestAnimationFrame(function() { | ||
// use setTimeout because the crash doesn't happen if we do this inside | ||
// a requestAnimationFrame callback | ||
setTimeout(function() { | ||
a.remove(); | ||
document.getElementById("newparent").appendChild(a); | ||
requestAnimationFrame(function() { | ||
document.documentElement.classList.remove("test-wait"); | ||
}); | ||
}, 0); | ||
}); | ||
|
||
</script> |