-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[LayoutNG] RequiresContentBeforeBreaking() and OOF fragmentation
We would previously always set RequiresContentBeforeBreaking() to true for OOF positioned elements (see CL:3310887 for more details). However, we should use the value of RequiresContentBeforeBreaking() of the CB as the basis, instead. Store an extra bit in NGContainingBlock to keep track of what RequiresContentBeforeBreaking() should be for the CB. This will get set when adjusting the newly created OOF fragmentainer descendant in NGOutOfFlowLayoutPart. As a result, NGBoxFragmentBuilder:: AdjustOffsetsForFragmentainerDescendant() was renamed to AdjustFragmentainerDescendant() since the method no longer is just adjusting offsets. tall-content-inside-constrained-block-003.tentative.html and tall-content-inside-constrained-block-004.tentative.html were updated based on the new logic, and two similar tests were added to ensure this gets set correctly for |fixedpos_containing_block|. Bug: 1319280 Change-Id: I450adb7e4a07c6948d76dcd3ec808a848483e8a2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3611135 Reviewed-by: Morten Stenshorne <[email protected]> Commit-Queue: Alison Maher <[email protected]> Cr-Commit-Position: refs/heads/main@{#997220}
- Loading branch information
1 parent
e5e9169
commit 1452185
Showing
6 changed files
with
65 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!DOCTYPE html> | ||
<style> | ||
ul { columns:1; height:20px; width:100px; line-height:20px; } | ||
ul li { position:relative; list-style-type:none; font-size:20px; } | ||
ul li::before { content:" \2022 "; position:absolute; top:0; left:-15px; } | ||
</style> | ||
<p>There should be a bullet to the left of the word "Bullet".</p> | ||
<ul> | ||
<li>Bullet</li> | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1319280"> | ||
<link rel="match" href="out-of-flow-in-multicolumn-093-ref.html"> | ||
<style> | ||
ul { columns:2; column-gap:0; height:20px; width:200px; line-height:20px; margin-left:-100px; } | ||
ul li { position:relative; list-style-type:none; font-size:20px; } | ||
ul li::before { content:" \2022 "; position:absolute; top:-2px; left:-15px; } | ||
</style> | ||
<p>There should be a bullet to the left of the word "Bullet".</p> | ||
<ul> | ||
<li>Bullet</li> | ||
<li>Bullet</li> | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
css/css-break/tall-content-inside-constrained-block-005.tentative.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!DOCTYPE html> | ||
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/6056#issuecomment-951767882"> | ||
<meta name="assert" content=""> | ||
<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="width:100px; height:100px; background:red;"> | ||
<div style="columns:2; column-gap:0; column-fill:auto; height:75px;"> | ||
<div style="height:50px; background:green;"></div> | ||
<div style="transform:translateX(0);"> | ||
<div style="position:relative;"> | ||
<div style="position:absolute"> | ||
<div style="position:fixed; height:25px; width:100%; background:red;"> | ||
<div style="contain:size; height:50px; background:green;"></div> | ||
<div style="contain:size; height:100px; background:green;"></div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
20 changes: 20 additions & 0 deletions
20
css/css-break/tall-content-inside-constrained-block-006.tentative.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!DOCTYPE html> | ||
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/6056#issuecomment-951767882"> | ||
<meta name="assert" content=""> | ||
<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="width:100px; height:100px; background:red;"> | ||
<div style="columns:2; column-gap:0; column-fill:auto; height:75px;"> | ||
<div style="height:50px; background:green;"></div> | ||
<div style="transform:translateX(0); height:25px;"> | ||
<div style="position:relative;"> | ||
<div style="position:absolute"> | ||
<div style="position:fixed; width:100%; background:red;"> | ||
<div style="contain:size; height:50px; background:green;"></div> | ||
<div style="contain:size; height:100px; background:green;"></div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |