Commit 41f8db90 authored by Ana SollanoKim's avatar Ana SollanoKim Committed by Commit Bot

[LayoutNG] Correct border painting for fieldset fragmentation

Previously, in a fragmented fieldset its top and bottom borders would
paint in every fragment. In this change, we supply the paint border
function (inside the fieldset painter) with the sides to include
variable. As a result, the top border is only painted in the first
fragment and the bottom border is only painted in the last.

Bug: 829028
Change-Id: I758795ae7a368d81319ddcd54bea032320100535
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2378812Reviewed-by: default avatarMorten Stenshorne <mstensho@chromium.org>
Reviewed-by: default avatarAlison Maher <almaher@microsoft.com>
Commit-Queue: Ana Sollano Kim <ansollan@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#802675}
parent 39ef8e02
......@@ -120,9 +120,11 @@ void NGFieldsetPainter::PaintBoxDecorationBackground(
const LayoutObject* layout_object = fieldset_.GetLayoutObject();
Node* node = layout_object->GeneratingNode();
fragment_painter.PaintBorder(*fieldset_.GetLayoutObject(),
layout_object->GetDocument(), node, paint_info,
contracted_rect, fieldset_.Style());
fragment_painter.PaintBorder(
*fieldset_.GetLayoutObject(), layout_object->GetDocument(), node,
paint_info, contracted_rect, fieldset_.Style(),
box_decoration_data.GetBackgroundBleedAvoidance(),
fieldset_.SidesToInclude());
}
}
......
<!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. The top border should only be in the first column, and
the bottom border should only be in the third.</p>
<div style="float:left; border:10px solid pink; border-bottom:none; width:140px; height:190px; background:lightblue;"></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:110px; 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-002-ref.html">
<p>There should be a light blue fieldset that starts in the first column and
ends in the third. The top border should only be in the first column, and
the bottom border should only be in the third.</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:500px; background:lightblue;"></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