mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:37:34 +00:00
LibWeb: Apply scroll offset after clip in PaintableBox::before_paint()
The order is important because clip rectangles are calculated with the scroll offset taken into account. Therefore, they need to be applied before the scroll offset is changed, to avoid accounting for the scroll offset twice.
This commit is contained in:
parent
ae42c6ed80
commit
91378ded96
1 changed files with 2 additions and 2 deletions
|
@ -240,8 +240,8 @@ void PaintableBox::before_paint(PaintContext& context, [[maybe_unused]] PaintPha
|
|||
if (!is_visible())
|
||||
return;
|
||||
|
||||
apply_scroll_offset(context, phase);
|
||||
apply_clip_overflow_rect(context, phase);
|
||||
apply_scroll_offset(context, phase);
|
||||
}
|
||||
|
||||
void PaintableBox::after_paint(PaintContext& context, [[maybe_unused]] PaintPhase phase) const
|
||||
|
@ -249,8 +249,8 @@ void PaintableBox::after_paint(PaintContext& context, [[maybe_unused]] PaintPhas
|
|||
if (!is_visible())
|
||||
return;
|
||||
|
||||
clear_clip_overflow_rect(context, phase);
|
||||
reset_scroll_offset(context, phase);
|
||||
clear_clip_overflow_rect(context, phase);
|
||||
}
|
||||
|
||||
void PaintableBox::paint(PaintContext& context, PaintPhase phase) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue