Files
sousa-gecko/testing/web-platform/tests/css/css-multicol/remove-transform-descendant-becomes-spanner.html
T
Morten Stenshorne 82f370b753 Bug 1989091 [wpt PR 54903] - Mark new spanners for layout when an ancestor no longer prevents them., a=testonly
Automatic update from web-platform-tests
Mark new spanners for layout when an ancestor no longer prevents them.

There are a few requirements for a descendant of a multicol container to
become a spanner. Having `column-span:all` is just one thing.
Additionally, all ancestors of the spanner candidate need to participate
in the block formatting context established by the columns.
Additionally, things like transforms prevent spanners inside. If a box
initially establishes a transform, but then a style change removes the
transform, a descendant may suddenly become a spanner. However, such new
spanners were not marked for layout when this happened. Fix this.

This bug caused layout correctness issues and layout inconsistency.
Additionally, we could get false cache hits on an ancestor of the
spanner, and end up re-using an old fragment after a child in the tree
was detached, which would lead to a crash when walking the fragment tree
afterwards.

Split IsValidColumnSpanner() into separate functions, so that the new
code that checks the tree for new spanners can use them.

Bug: 445210793
Change-Id: Id9f0869d5aaed20da8e3ba1275faf029c8988008
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6955055
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1516713}

--

wpt-commits: 5cabe69f99d130ad8a6f087002920569b2977aa4
wpt-pr: 54903
2025-09-22 10:53:53 +00:00

18 lines
775 B
HTML

<!DOCTYPE html>
<title>A transform inside multicol prevents descendants from becoming spanners. If the transform is removed, descendants may become spanners.</title>
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<link rel="help" href="https://issues.chromium.org/issues/445210793">
<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div style="columns:2; width:100px; background:red;">
<div id="elm" style="transform:rotate(45deg);">
<div>
<div style="column-span:all; padding-bottom:100px; background:green;"></div>
</div>
</div>
</div>
<script>
document.body.offsetTop;
elm.style.transform = "none";
</script>