mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
LibWeb: Use border box to position sticky elements
Fixes https://github.com/LadybirdBrowser/ladybird/issues/1245
This commit is contained in:
committed by
Andreas Kling
parent
2e06d26ddb
commit
427e6cec7b
@@ -1120,9 +1120,9 @@ RefPtr<ScrollFrame const> PaintableBox::nearest_scroll_frame() const
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CSSPixelRect PaintableBox::padding_box_rect_relative_to_nearest_scrollable_ancestor() const
|
||||
CSSPixelRect PaintableBox::border_box_rect_relative_to_nearest_scrollable_ancestor() const
|
||||
{
|
||||
auto result = absolute_padding_box_rect();
|
||||
auto result = absolute_border_box_rect();
|
||||
auto const* nearest_scrollable_ancestor = this->nearest_scrollable_ancestor();
|
||||
if (nearest_scrollable_ancestor) {
|
||||
result.set_location(result.location() - nearest_scrollable_ancestor->absolute_rect().top_left());
|
||||
|
||||
Reference in New Issue
Block a user