mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:57:44 +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
|
@ -753,7 +753,7 @@ int Element::client_top() const
|
|||
// 2. Return the computed value of the border-top-width property
|
||||
// plus the height of any scrollbar rendered between the top padding edge and the top border edge,
|
||||
// ignoring any transforms that apply to the element and its ancestors.
|
||||
return static_cast<Layout::Box const&>(*layout_node()).computed_values().border_top().width;
|
||||
return static_cast<Layout::Box const&>(*layout_node()).computed_values().border_top().width.to_int();
|
||||
}
|
||||
|
||||
// https://drafts.csswg.org/cssom-view/#dom-element-clientleft
|
||||
|
@ -769,7 +769,7 @@ int Element::client_left() const
|
|||
// 2. Return the computed value of the border-left-width property
|
||||
// plus the width of any scrollbar rendered between the left padding edge and the left border edge,
|
||||
// ignoring any transforms that apply to the element and its ancestors.
|
||||
return static_cast<Layout::Box const&>(*layout_node()).computed_values().border_left().width;
|
||||
return static_cast<Layout::Box const&>(*layout_node()).computed_values().border_left().width.to_int();
|
||||
}
|
||||
|
||||
// https://drafts.csswg.org/cssom-view/#dom-element-clientwidth
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue