Files
sousa-gecko/testing/web-platform/tests/css/css-transforms/crashtests/zero-perspective-002.html
T
Timothy Nikkel 46b4a9abde Bug 2045159. Invalidate the scrolled rect cache when ScrollToImpl recomputes perspective overflow. r=layout-reviewers,emilio
Bug 2044231 started using an AutoScrolledRectCache during
ScrollContainerFrame::ReflowFinished so the several GetScrolledRect() calls
there share a single computation. In debug builds the cache asserts that the
scrolled rect stays constant while it is alive.

ReflowFinished calls ScrollToRestoredPosition (and a clamping ScrollToImpl)
while the cache is alive. When the scroll container has perspective
descendants, ScrollToImpl calls RecomputePerspectiveChildrenOverflow, which
recomputes those descendants' overflow (it depends on the scroll position) and
thereby changes mScrolledFrame's scrollable overflow. That overflow is an input
to ComputeScrolledRect, so the scrolled rect legitimately changes while the
cache is alive, and the UpdateOverflow() on the next line reads it back through
the cache and asserts.

Invalidate the cache as soon as RecomputePerspectiveChildrenOverflow reports a
change, before the UpdateOverflow() that reads the rect, so that it (and any
later GetScrolledRect() calls in ReflowFinished) recompute the new value.

Differential Revision: https://phabricator.services.mozilla.com/D307910
2026-06-20 10:00:35 +00:00

21 lines
427 B
HTML

<!doctype html>
<meta charset="utf-8">
<link rel="help" href="https://drafts.csswg.org/css-transforms-2/#perspective-property">
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=2045159">
<style>
#a {
perspective: 0px;
height: 0vw;
column-width: 0px;
overflow-x: scroll;
}
#b {
rotate: 6deg 96 0 0;
}
</style>
<ul id="a">
<li id="b">
<textarea autofocus="autofocus">a</textarea>
</li>
</ul>