mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 00:37:35 +00:00
LibWeb: Convert BorderData::width to CSSPixels
The `clip_shrink` optimization in `paint_background()` now also correctly uses DevicePixels, instead of reducing a DevicePixel rect by a CSSPixels amount.
This commit is contained in:
parent
072ab94889
commit
5ee1b7db7c
7 changed files with 20 additions and 20 deletions
|
@ -278,7 +278,7 @@ void PaintableBox::paint_background(PaintContext& context) const
|
|||
|
||||
// HACK: If the Box has a border, use the bordered_rect to paint the background.
|
||||
// This way if we have a border-radius there will be no gap between the filling and actual border.
|
||||
if (computed_values().border_top().width || computed_values().border_right().width || computed_values().border_bottom().width || computed_values().border_left().width)
|
||||
if (computed_values().border_top().width != 0 || computed_values().border_right().width != 0 || computed_values().border_bottom().width != 0 || computed_values().border_left().width != 0)
|
||||
background_rect = absolute_border_box_rect();
|
||||
|
||||
Painting::paint_background(context, layout_box(), background_rect, background_color, computed_values().image_rendering(), background_layers, normalized_border_radii_data());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue