Commit 9dea9475 authored by Ana SollanoKim's avatar Ana SollanoKim Committed by Commit Bot

[LayoutNG] Small legend large border and large legend small border

Added two web tests:
1. Small legend large border: At this time, the legend is treated as
monolithic and the borders are not breaking as well. As a result, the
border goes past the fragmentation line in the first and last columns.
2. Large legend small border: Similarly, the legend goes past the
fragmentation line in the first column. The fieldset breaks when it
reaches the fragmentation line in the second column.

Deleted the update of the border block start value as it's no longer
useful to calculate new offsets in the fieldset. This change in the code
does not affect the two new web tests.

Bug: 829028
Change-Id: I1746c9da67372f4a42ab7ab8c4184460814f486d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2391217
Commit-Queue: Ana Sollano Kim <ansollan@microsoft.com>
Reviewed-by: default avatarMorten Stenshorne <mstensho@chromium.org>
Reviewed-by: default avatarAlison Maher <almaher@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#805019}
parent 777e341b
...@@ -269,12 +269,6 @@ void NGFieldsetLayoutAlgorithm::LayoutLegend(NGBlockNode& legend) { ...@@ -269,12 +269,6 @@ void NGFieldsetLayoutAlgorithm::LayoutLegend(NGBlockNode& legend) {
intrinsic_block_size_ = legend_margin_end_offset; intrinsic_block_size_ = legend_margin_end_offset;
is_legend_past_border_ = true; is_legend_past_border_ = true;
// If the legend is larger than the width of the fieldset block-start
// border, the actual padding edge of the fieldset will be moved
// accordingly. This will be the block-start offset for the fieldset
// contents anonymous box.
borders_.block_start = legend_margin_end_offset;
} }
// If the margin box of the legend is at least as tall as the fieldset // If the margin box of the legend is at least as tall as the fieldset
......
...@@ -973,6 +973,8 @@ virtual/layout_ng_block_frag/external/wpt/css/css-break/break-between-avoid-000. ...@@ -973,6 +973,8 @@ virtual/layout_ng_block_frag/external/wpt/css/css-break/break-between-avoid-000.
virtual/layout_ng_block_frag/external/wpt/css/css-break/break-between-avoid-001.html [ Pass ] virtual/layout_ng_block_frag/external/wpt/css/css-break/break-between-avoid-001.html [ Pass ]
virtual/layout_ng_block_frag/external/wpt/css/css-break/break-between-avoid-003.html [ Pass ] virtual/layout_ng_block_frag/external/wpt/css/css-break/break-between-avoid-003.html [ Pass ]
virtual/layout_ng_block_frag/external/wpt/css/css-break/break-between-avoid-004.html [ Pass ] virtual/layout_ng_block_frag/external/wpt/css/css-break/break-between-avoid-004.html [ Pass ]
virtual/layout_ng_block_frag/external/wpt/css/css-break/fieldset-003.html [ Pass ]
virtual/layout_ng_block_frag/external/wpt/css/css-break/fieldset-004.html [ Pass ]
virtual/layout_ng_block_frag/external/wpt/css/css-break/forced-break-at-fragmentainer-start-000.html [ Pass ] virtual/layout_ng_block_frag/external/wpt/css/css-break/forced-break-at-fragmentainer-start-000.html [ Pass ]
virtual/layout_ng_block_frag/external/wpt/css/css-break/overflowed-block-with-no-room-after-000.html [ Pass ] virtual/layout_ng_block_frag/external/wpt/css/css-break/overflowed-block-with-no-room-after-000.html [ Pass ]
virtual/layout_ng_block_frag/external/wpt/css/css-break/overflowed-block-with-no-room-after-001.html [ Pass ] virtual/layout_ng_block_frag/external/wpt/css/css-break/overflowed-block-with-no-room-after-001.html [ Pass ]
...@@ -3187,6 +3189,8 @@ crbug.com/829028 external/wpt/css/css-break/break-between-avoid-000.html [ Failu ...@@ -3187,6 +3189,8 @@ crbug.com/829028 external/wpt/css/css-break/break-between-avoid-000.html [ Failu
crbug.com/829028 external/wpt/css/css-break/break-between-avoid-001.html [ Failure ] crbug.com/829028 external/wpt/css/css-break/break-between-avoid-001.html [ Failure ]
crbug.com/829028 external/wpt/css/css-break/break-between-avoid-003.html [ Failure ] crbug.com/829028 external/wpt/css/css-break/break-between-avoid-003.html [ Failure ]
crbug.com/829028 external/wpt/css/css-break/break-between-avoid-004.html [ Failure ] crbug.com/829028 external/wpt/css/css-break/break-between-avoid-004.html [ Failure ]
crbug.com/829028 external/wpt/css/css-break/fieldset-003.html [ Failure ]
crbug.com/829028 external/wpt/css/css-break/fieldset-004.html [ Failure ]
crbug.com/829028 external/wpt/css/css-break/forced-break-at-fragmentainer-start-000.html [ Failure ] crbug.com/829028 external/wpt/css/css-break/forced-break-at-fragmentainer-start-000.html [ Failure ]
crbug.com/829028 external/wpt/css/css-break/overflowed-block-with-no-room-after-001.html [ Failure ] crbug.com/829028 external/wpt/css/css-break/overflowed-block-with-no-room-after-001.html [ Failure ]
crbug.com/829028 external/wpt/css/css-break/overflowed-block-with-no-room-after-000.html [ Failure ] crbug.com/829028 external/wpt/css/css-break/overflowed-block-with-no-room-after-000.html [ Failure ]
......
<!DOCTYPE html>
<link rel="author" title="Ana Sollano Kim" href="mailto:ansollan@microsoft.com">
<p>There should be a light blue fieldset that starts in the first column and
ends in the third. Its blue violet legend should only be in the first column,
consuming the top border. The bottom border should only be in the third column.
</p>
<div style="float:left; border:60px solid pink; border-bottom:none; width:100px; height:0;">
<div style="margin-top:-60px; background:lightblue; height:60px"></div>
<div style="margin-top:-55px; background:blueviolet; height:50px"></div>
</div>
<div style="float:left; margin-left:10px; border:60px solid pink; border-top:none; border-bottom:none; width:100px; height:10px; background:lightblue;"></div>
<div style="float:left; margin-left:10px; border:60px solid pink; border-top:none; width:100px; height:0; background:lightblue;"></div>
\ No newline at end of file
<!DOCTYPE html>
<link rel="author" title="Ana Sollano Kim" href="mailto:ansollan@microsoft.com">
<link rel="help" href="href=https://www.w3.org/TR/css-break-3/#break-decoration">
<link rel="match" href="fieldset-003-ref.html">
<p>There should be a light blue fieldset that starts in the first column and
ends in the third. Its blue violet legend should only be in the first column,
consuming the top border. The bottom border should only be in the third column.
</p>
<div style="column-count:3; column-fill:auto; column-gap:10px; width: 680px; height:40px;">
<fieldset style="margin:0; border:60px solid pink; padding:0; width:100px; background:lightblue; height:10px;">
<legend style="padding:0; width:100px; height:50px; background:blueviolet;"></legend>
</fieldset>
</div>
\ No newline at end of file
<!DOCTYPE html>
<link rel="author" title="Ana Sollano Kim" href="mailto:ansollan@microsoft.com">
<p>There should be a light blue fieldset that starts in the first column and
ends in the third. Its blue violet legend should only be in the first column,
and past the fragmentation line. The bottom border should only be in the third
column.
</p>
<div style="float:left; margin-top:145px; border:10px solid pink; border-bottom:none; width:140px; height:145px; background:lightblue;">
<div style="margin-top:-155px; background:blueviolet; width:50px; height:300px"></div>
</div>
<div style="float:left; margin-left:10px; border:10px solid pink; border-top:none; border-bottom:none; width:140px; height:200px; background:lightblue;"></div>
<div style="float:left; margin-left:10px; border:10px solid pink; border-top:none; width:140px; height:100px; background:lightblue;"></div>
<!DOCTYPE html>
<link rel="author" title="Ana Sollano Kim" href="mailto:ansollan@microsoft.com">
<link rel="help" href="href=https://www.w3.org/TR/css-break-3/#break-decoration">
<link rel="match" href="fieldset-004-ref.html">
<p>There should be a light blue fieldset that starts in the first column and
ends in the third. Its blue violet legend should only be in the first column,
and past the fragmentation line. The bottom border should only be in the third
column.
</p>
<div style="column-count:3; column-fill:auto; column-gap:10px; width:500px; height:200px;">
<fieldset style="border:10px solid pink; margin:0; padding:0; height:590px; background:lightblue;">
<legend style="padding:0; margin:0; width:50px; height:300px; background:blueviolet;"></legend>
</fieldset>
</div>
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment