Skip to content

Commit 4f26de0

Browse files
David Awogbemilachromium-wpt-export-bot
authored andcommitted
[animation-trigger] Fix crash when trigger source has ::selection style
In the linked clusterfuzz bug, Blink would perform blink::Element::RecalcHighlightStyles which ended up invoking blink::CSSAnimations::UpdateNamedTriggers again, except without CSSAnimationData, i.e. StyleBuilder().Animations() is null, even though in an earlier pass while styling the same element it was not. This resulted in clobbering the trigger that had already been correctly created, replacing it with a null pointer. Bug: 451477493, 390314945 Change-Id: Ib192410e0b408e6af8fe38fcfa54923d3ebf2151 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7063693 Reviewed-by: Rune Lillesveen <[email protected]> Commit-Queue: David Awogbemila <[email protected]> Cr-Commit-Position: refs/heads/main@{#1533669}
1 parent 4888812 commit 4f26de0

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<body>
4+
<style>
5+
@keyframes myAnim {}
6+
7+
.target {
8+
animation: myAnim linear 0.5s forwards
9+
}
10+
11+
#scroll_target {
12+
animation-trigger: --scrolltrigger play-once;
13+
timeline-trigger: --scrolltrigger scroll() 150px 200px
14+
}
15+
16+
.subject,
17+
.target::selection {
18+
height: 50px;
19+
}
20+
</style>
21+
<div id=scroll_target class="subject target" 0></div>
22+
</body>
23+
</html>

0 commit comments

Comments
 (0)