Skip to content

Commit

Permalink
Bug 1766555 [wpt PR 33806] - Avoid calling CompositorPropertyAnimatio…
Browse files Browse the repository at this point in the history
…nsHaveNoEffect when effect->IsCurrent() is false., a=testonly

Automatic update from web-platform-tests
Avoid calling CompositorPropertyAnimationsHaveNoEffect when effect->IsCurrent() is false.

Being stricter about compositing only the relevant property tree nodes
for relevant animations (https://crrev.com/c/3307117) has made the
DCHECK()s in CompositorPropertyAnimationsHaveNoEffect more sensitive.
In particular, those DCHECK()s, which ensure that either no properties
of an animation or all properties of an animation are composited, will
sometimes (prior to this change) run for animations that are not
current.  This is a case where other animations might have caused some
(but not all) of the properties to be composited, yet this animation (in
UpdateAnimationFlagsForAnimation in css_animations.cc) will not set the
flags for this animation that cause the properties it animates to be
composited.

Avoiding calling CompositorPropertyAnimationsHaveNoEffect in such cases
avoids this problem.

Fixed: 1319304
Change-Id: If3db29b98ce319c57e27acbe2f47d7319ec8230b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3609191
Commit-Queue: David Baron <[email protected]>
Reviewed-by: Robert Flack <[email protected]>
Cr-Commit-Position: refs/heads/main@{#997837}

--

wpt-commits: dd1250ade8e7eb852c28f4b87c3b108d18ba389e
wpt-pr: 33806
  • Loading branch information
dbaron authored and moz-wptsync-bot committed May 15, 2022
1 parent 8cb8fd8 commit b66796a
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<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=1319304">
<meta name="assert" content="This should not crash.">

<script>
window.onload = function(){
let div = document.querySelector("div");
let a1 = div.animate([{"transform": "translateX(10px)", "opacity": "0.4"}], { duration: 1000 });
a1.reverse();
let a2 = div.animate([{"transform": "translateY(10px)"}], { duration: 1000 });
}
</script>
<div>X</div>

0 comments on commit b66796a

Please sign in to comment.