Skip to content

Commit

Permalink
[LayoutNG] Fieldset container separation
Browse files Browse the repository at this point in the history
There should never be a class C breakpoint in front of fieldset
content. As a result, always pass in false for
|has_container_separation| when evaluating a break before fieldset
content.

As a result of this update, if the legend overflows the fragmentainer,
we may now end up pushing the entire fieldset to the next fragmentainer,
as expected. (See the newly added WPT test: fieldset-006.html).

Several unit tests were updated to reflect this change in behavior.

Bug: 1246175
Change-Id: I1e6e0393119fe01c6a293fb0d09f4a779684e9d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3139496
Reviewed-by: Morten Stenshorne <[email protected]>
Commit-Queue: Alison Maher <[email protected]>
Cr-Commit-Position: refs/heads/main@{#921481}
  • Loading branch information
alisonmaher authored and chromium-wpt-export-bot committed Sep 15, 2021
1 parent f0430be commit 065ee54
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions css/css-break/fieldset-006.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!DOCTYPE html>
<link rel="help" href="https://www.w3.org/TR/css-break-3/#breaking-rules">
<link rel="help" href="https://html.spec.whatwg.org/multipage/rendering.html#the-fieldset-and-legend-elements">
<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
<style>
#multicol {
columns:2;
column-gap:0;
column-fill:auto;
width:100px;
height:100px;
margin-left:-50px;
}
fieldset {
border:none;
margin:0;
padding:0px;
width:50px;
}
legend {
padding:0px;
margin:0px;
width:50px;
height:100px;
background: green;
}
#abs {
position:absolute;
width:100px;
height:100px;
background:red;
z-index:-1;
}
</style>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div id="abs"></div>
<div id="multicol">
<div style="height:50px;"></div>
<fieldset>
<legend></legend>
<div style="height:100px; background:green;"></div>
</fieldset>
</div>

0 comments on commit 065ee54

Please sign in to comment.