Skip to content

Commit 065ee54

Browse files
[LayoutNG] Fieldset container separation
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}
1 parent f0430be commit 065ee54

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

css/css-break/fieldset-006.html

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<!DOCTYPE html>
2+
<link rel="help" href="https://www.w3.org/TR/css-break-3/#breaking-rules">
3+
<link rel="help" href="https://html.spec.whatwg.org/multipage/rendering.html#the-fieldset-and-legend-elements">
4+
<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
5+
<style>
6+
#multicol {
7+
columns:2;
8+
column-gap:0;
9+
column-fill:auto;
10+
width:100px;
11+
height:100px;
12+
margin-left:-50px;
13+
}
14+
fieldset {
15+
border:none;
16+
margin:0;
17+
padding:0px;
18+
width:50px;
19+
}
20+
legend {
21+
padding:0px;
22+
margin:0px;
23+
width:50px;
24+
height:100px;
25+
background: green;
26+
}
27+
#abs {
28+
position:absolute;
29+
width:100px;
30+
height:100px;
31+
background:red;
32+
z-index:-1;
33+
}
34+
</style>
35+
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
36+
<div id="abs"></div>
37+
<div id="multicol">
38+
<div style="height:50px;"></div>
39+
<fieldset>
40+
<legend></legend>
41+
<div style="height:100px; background:green;"></div>
42+
</fieldset>
43+
</div>

0 commit comments

Comments
 (0)