Skip to content

Commit

Permalink
Relax a bit the requirements of animation-only traversals.
Browse files Browse the repository at this point in the history
The whole animation-only traversal thing is quite messy, but it can
generally no longer assert that it only deals with already-styled
subtrees, since we want to make display animatable.

Make it more in line with the regular traversal, in order not to leave
the tree in an inconsistent state (an element with display != none that
has unstyled children), which the frame constructor complains about
(rightfully so).

Differential Revision: https://phabricator.services.mozilla.com/D240307

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1941651
gecko-commit: 52430cf390952929710e421e7bb9be13d1608f77
gecko-reviewers: dshin
  • Loading branch information
emilio authored and moz-wptsync-bot committed Mar 4, 2025
1 parent c83d2d6 commit 120e23a
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions css/css-animations/display-via-custom-prop-animation-crash.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!DOCTYPE html>
<html class="test-wait">
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1941651">
<style>
:root {
--disp: block;
}

@keyframes switch {
0% { --disp: none; }
100% { --disp: block; }
}

#target {
height: 100px;
width: 100px;
background-color: green;
animation: switch 0.5s;
display: var(--disp);
}
</style>
<div id="target">
<div></div>
</div>
<script>
target.addEventListener("animationend", function() {
document.documentElement.classList = "";
})
target.getBoundingClientRect();
</script>

0 comments on commit 120e23a

Please sign in to comment.