Commit 252314f8 authored by Alison Maher's avatar Alison Maher Committed by Chromium LUCI CQ

[LayoutNG] Fieldset borders with legend

Extend the fix in CL:2551748 to include the legend.

Bug: 1150803
Change-Id: Ic4a5879baf6da2a7f8a8953508674e0992dbb7f5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2572122
Commit-Queue: Alison Maher <almaher@microsoft.com>
Reviewed-by: default avatarMorten Stenshorne <mstensho@chromium.org>
Reviewed-by: default avatarKent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#834812}
parent 56f34c6f
...@@ -105,7 +105,7 @@ void NGFieldsetPainter::PaintBoxDecorationBackground( ...@@ -105,7 +105,7 @@ void NGFieldsetPainter::PaintBoxDecorationBackground(
box_decoration_data.GetBackgroundBleedAvoidance())) { box_decoration_data.GetBackgroundBleedAvoidance())) {
state_saver.Save(); state_saver.Save();
FloatRoundedRect border = RoundedBorderGeometry::PixelSnappedRoundedBorder( FloatRoundedRect border = RoundedBorderGeometry::PixelSnappedRoundedBorder(
style, paint_rect, fieldset_.SidesToInclude()); style, contracted_rect, fieldset_.SidesToInclude());
graphics_context.ClipRoundedRect(border); graphics_context.ClipRoundedRect(border);
if (box_decoration_data.GetBackgroundBleedAvoidance() == if (box_decoration_data.GetBackgroundBleedAvoidance() ==
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
<style> <style>
div { div {
background-color: green; background-color: green;
height: 150px; height: 110px;
position: absolute; position: absolute;
width: 150px; width: 150px;
top: 50px; top: 70px;
} }
</style> </style>
<p>There should be no red.</p> <p>There should be no red.</p>
......
...@@ -9,14 +9,18 @@ fieldset { ...@@ -9,14 +9,18 @@ fieldset {
height: 100px; height: 100px;
width: 100px; width: 100px;
} }
legend {
height: 50px;
width: 50px;
}
div { div {
background-color: green; background-color: green;
height: 150px; height: 110px;
position: absolute; position: absolute;
width: 150px; width: 150px;
top: 50px; top: 70px;
} }
</style> </style>
<p>There should be no red.</p> <p>There should be no red.</p>
<fieldset></fieldset> <fieldset><legend></legend></fieldset>
<div></div> <div></div>
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