Automatic update from web-platform-tests [gap-decorations] Update multicol gap decorations based on new def This CL updates the implementation for GapDecorations in multicol. Based on some discussions in https://github.com/w3c/csswg-drafts/issues/12784, and the definition of gap intersections https://drafts.csswg.org/css-gaps-1/#layout-painting we have to update how we compute and store the information to generate the intersections for gap decorations in multicol. The main new behavior is that intersections in the column gap happen right before/after where the column gap intersects any row gaps. Previously this happened at the middle of where these two gaps met. There are couple of tweaks needed for this, which overall at the end of the day reduces the code complexity of painting multicol gap decorations. 1. Instead of having ONE `MainGap` being generated by a spanner, we now generate TWO, one at the start of the spanner and one at the end. 2. Instead of having `CrossGap`s end only at spanners, we instead simply have `CrossGap`s end at all main gaps (spanners and row gaps), and start right after. This way, we can easily generate the intersections there, which is what the discussion seems to have settled on. 3. Using the two above, along with a transient map which maps from an intersection to a `MainGap`, we can now determine in constant time whether a given intersection is `blocked before/after` or if it should be treated like an Edge intersection, which enables us to fix the rule breaking behavior that was broken for multicol. This also enables us to get rid of a lot of the complex logic of advancing indices of spanner main gaps when generating the intersections for multicol. This CL also makes two more changes: a) Some of the expectation files had to be updated to match the new behavior. b) We add a test case of a multicol container with multiple spanners c) `column-height-009.html` test is now technically incorrect given the dicussion at https://github.com/w3c/csswg-drafts/issues/12784, so this CL updates the expectation for it. This brings the behavior to exactly what we had with the original GapDecorations, before the optimized pipeline. Bug: 357648037, 436140061, 446616449 Change-Id: Ie132c4f7c81c1db57e87c1a9b0601ff5c691fdfd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6972503 Commit-Queue: Javier Contreras <javiercon@microsoft.com> Reviewed-by: Alison Maher <almaher@microsoft.com> Reviewed-by: Sam Davis Omekara <samomekarajr@microsoft.com> Cr-Commit-Position: refs/heads/main@{#1520744} -- wpt-commits: c365dc339907a22df4ab1c360ce780a275d65d42 wpt-pr: 55068
44 lines
1.2 KiB
HTML
44 lines
1.2 KiB
HTML
<!DOCTYPE html>
|
|
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
|
|
<style>
|
|
.item {
|
|
display: block;
|
|
width: 50px;
|
|
height: 40px;
|
|
margin-bottom: 20px;
|
|
background: cyan;
|
|
}
|
|
.column {
|
|
float: left;
|
|
width: 100px;
|
|
}
|
|
.rule {
|
|
float: left;
|
|
width: 2px;
|
|
margin-left: 9px;
|
|
margin-right: 9px;
|
|
background: black;
|
|
}
|
|
</style>
|
|
<div style="width:340px; height:160px; line-height:20px; background:yellow;">
|
|
<div class="column">
|
|
<div class="item">a<br>b</div>
|
|
<div class="item">g<br>h</div>
|
|
<div class="item">m<br>n</div>
|
|
</div>
|
|
<div class="rule" style="height:40px;"></div>
|
|
<div class="rule" style="position: absolute; top: 68px; left: 108px; height:40px;"></div>
|
|
<div class="rule" style="position: absolute; top: 128px; left: 108px; height:40px;"></div>
|
|
<div class="column">
|
|
<div class="item">c<br>d</div>
|
|
<div class="item">i<br>j</div>
|
|
<div class="item">o<br>p</div>
|
|
</div>
|
|
<div class="rule" style="height:40px;"></div>
|
|
<div class="rule" style="position: absolute; top: 68px; left: 228px; height:40px;"></div>
|
|
<div class="column">
|
|
<div class="item">e<br>f</div>
|
|
<div class="item">k<br>l</div>
|
|
</div>
|
|
</div>
|