mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-01 15:18:06 +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
Notes:
sideshowbarker
2024-07-16 23:38:54 +09:00
Author: https://github.com/AtkinsSJ
Commit: 5ee1b7db7c
Pull-request: https://github.com/SerenityOS/serenity/pull/20265
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