fune/testing/web-platform/tests/css/css-multicol/scroll-width-height.tentative.html
Ian Kilpatrick 071d8a7347 Bug 1667926 [wpt PR 25827] - [layout] Introduce the NGLayoutOverflowCalculator., a=testonly
Automatic update from web-platform-tests
[layout] Introduce the NGLayoutOverflowCalculator.

This patch moves the layout-overflow calculation "into" NG.

It does several interconnected things:
 - Just before a fragment is created we calculate the layout-overflow
   for a fragment. This is more correct than doing it for the layout
   object as a whole, resulting in more multi-col passes.
   The additional regression was caused the layout-overflow
   calculation hiding a bug with large column gaps (which exceed the
   inline-size of the container).
 - Once this is calculated, we run the
   SetLayoutOverflowFromLayoutResults function which "joins" all the
   layout-overflow from the fragments into the layout-object, used for
   JS API calls.
 - Finally there is the LayoutNGMixin::RecalcLayoutOverflow which
   allows for recalculating of layout-overflow, and correctly rebuilding
   the fragment-tree.

Bug: 1066616
Change-Id: I25987a32b0254eafc2d7aad90ef6a36b60f1e1dc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2333083
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#814090}

--

wpt-commits: 16c99fc3f05855a7d7d19397a19f49d2dbf429b9
wpt-pr: 25827
2020-10-08 10:18:43 +00:00

39 lines
1.2 KiB
HTML

<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<style>
.multi {
width: 400px;
height: 400px;
columns: 3;
}
.child {
inline-size: 100px;
block-size: 100px;
outline: solid black;
}
.grandchild {
inline-size: 100px;
block-size: 300px;
background: lime;
}
</style>
<body onload="checkLayout('.child, .grandchild')">
<div id=log></div>
<div class="multi" style="writing-mode: horizontal-tb">
<div class="child" data-expected-scroll-width="100" data-expected-scroll-height="300">
<div class="grandchild" data-expected-scroll-width="100" data-expected-scroll-height="300"></div>
</div>
</div>
<div class="multi" style="writing-mode: vertical-rl">
<div class="child" data-expected-scroll-width="300" data-expected-scroll-height="100">
<div class="grandchild" data-expected-scroll-width="300" data-expected-scroll-height="100"></div>
</div>
</div>
<div class="multi" style="writing-mode: vertical-lr">
<div class="child" data-expected-scroll-width="300" data-expected-scroll-height="100">
<div class="grandchild" data-expected-scroll-width="300" data-expected-scroll-height="100"></div>
</div>
</div>