Skip to content

Commit

Permalink
Handle inner fieldset / legend multicol at outer boundary.
Browse files Browse the repository at this point in the history
This used to fail a DCHECK when nested multicol was specified on a
fieldset at an outer fragmentainer boundary, but apart from that, it
worked fine, because BreakBeforeChildIfNeeded() correctly detects the
situation (abortion) and inserts a break before. Just move the DCHECK a
bit down.

No code changes are required for legends, as they are monolithic. Just
replace the TODO with a proper comment, and keep the DCHECK (the legend
test also passes without the code changes in this CL).

Bug: 829028
Change-Id: I62bf97f9bd04c185f86e93103f204cc6d872c438
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2595288
Reviewed-by: Alison Maher <[email protected]>
Commit-Queue: Morten Stenshorne <[email protected]>
Cr-Commit-Position: refs/heads/master@{#837755}
  • Loading branch information
mstensho authored and chromium-wpt-export-bot committed Dec 17, 2020
1 parent ed5cae4 commit 170a516
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
11 changes: 11 additions & 0 deletions css/css-multicol/nested-at-outer-boundary-as-fieldset.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mailto:[email protected]">
<link rel="help" href="https://www.w3.org/TR/css-multicol-1/#the-multi-column-model">
<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="margin-left:-100px; columns:2; height:100px; width:200px; column-gap:0; column-fill:auto; background:red;">
<div style="height:100px; background:white;"></div>
<fieldset style="columns:2; column-gap:0; border:none; margin:0; padding:0; background:red;">
<div style="height:200px; background:green;"></div>
</fieldset>
</div>
13 changes: 13 additions & 0 deletions css/css-multicol/nested-at-outer-boundary-as-legend.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mailto:[email protected]">
<link rel="help" href="https://www.w3.org/TR/css-multicol-1/#the-multi-column-model">
<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="margin-left:-100px; columns:2; height:100px; width:200px; column-gap:0; column-fill:auto; background:red;">
<div style="height:100px; background:white;"></div>
<fieldset style="border:none; margin:0; padding:0; background:red;">
<legend style="columns:2; column-gap:0; margin:0; padding:0; width:100%;">
<div style="height:200px; background:green;"></div>
</legend>
</fieldset>
</div>

0 comments on commit 170a516

Please sign in to comment.