forked from mirrors/gecko-dev
Automatic update from web-platform-tests Fix fragment post-layout cloning for multicol. Fragment post-layout cloning is needed for two things: 1. Rebuilding the fragment tree spine after subtree relayout 2. Recalculating overflow without laying out Don't store layout results on the flow thread. This was tricky to maintain and hard to reason about (we'd store fragmentainer children of the multicol container fragment, but not spanners, OOFs, list item markers etc.), Besides, we're going to remove the flow thread concept as soon as we can (which admittedly isn't *that* soon, though), so this will prepare us for the future. This also means that we should no longer set up FragmentData entries for the flow thread, so removed that code as well. When cloning a fragmentation context root fragment, we'll now also update the children of its fragmentainers to the post-layout fragments, since fragmentainers no longer have the concept of "post-layout" (line boxes don't have that, either, FWIW). For subtree relayout, all we need to do is making sure that we only visit NG containing blocks when rebuilding the fragment tree spine (i.e. skip any flow threads). For overflow recalculation, we're not making any specific changes in this CL at all; things will just start working (with at least one exception, but I'll get back to that in a follow-up), and stop crashing. The change in OwnerLayoutBox() (to never do anything special) would trigger a DCHECK failure in OffsetFromOwnerLayoutBox() when hit-testing (because the owner is the multicol container and |this| is a fragmentainer), which is why we will now never hit fragmentainers during hit-testing (and there should be no need for that anyway). Add an additional DCHECK (and documentation) to OffsetFromOwnerLayoutBox(), to make it clear that fragmentainers aren't supported. NGOutOfFlowLayoutPart::ReplaceFragmentainer() became a bit fancy, but it was the best I could come up with. This part was easier when we could just update fragments in the flow thread. Had to update the unit tests that expected any useful FragmentData from flow threads. Bug: 1279078, 1279525 Change-Id: I1d1c8366fe22f75e9a56a8e3f9910671f1ee81bc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3378669 Reviewed-by: Alison Maher <almaher@microsoft.com> Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org> Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org> Reviewed-by: Koji Ishii <kojii@chromium.org> Commit-Queue: Morten Stenshorne <mstensho@chromium.org> Cr-Commit-Position: refs/heads/main@{#959971} -- wpt-commits: a4d9d522de565a6aa85901421cf1e84e4b3423e6 wpt-pr: 32366
20 lines
979 B
HTML
20 lines
979 B
HTML
<!DOCTYPE html>
|
|
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
|
|
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1279525">
|
|
<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="overflow:auto; width:500px;">
|
|
<div style="columns:2; column-gap:0; column-fill:auto; margin-left:-300px; width:400px; height:100px;">
|
|
<div style="break-after:column; height:1px;"></div>
|
|
<div style="columns:2; column-gap:0; column-fill:auto; height:200px;">
|
|
<div style="break-after:column; height:1px;"></div>
|
|
<div style="width:100px; height:100px; background:red;">
|
|
<div id="elm" style="transform:translateX(1000px); width:100px; height:100px; background:green;"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
document.body.offsetTop;
|
|
elm.style.transform = "translateX(0)";
|
|
</script>
|