1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:57:35 +00:00

LibWeb: Add pair of methods to apply/reset scroll offset of paintable

Separate scroll application from before_children_paint and
after_children_paint.
This commit is contained in:
Aliaksandr Kalenik 2023-12-11 16:47:40 +01:00 committed by Andreas Kling
parent 8eacb81eba
commit 2952f01e84
4 changed files with 9 additions and 4 deletions

View file

@ -90,6 +90,7 @@ void StackingContext::paint_node_as_stacking_context(Paintable const& paintable,
void StackingContext::paint_descendants(PaintContext& context, Paintable const& paintable, StackingContextPaintPhase phase)
{
paintable.apply_scroll_offset(context, to_paint_phase(phase));
paintable.before_children_paint(context, to_paint_phase(phase));
paintable.apply_clip_overflow_rect(context, to_paint_phase(phase));
@ -174,6 +175,7 @@ void StackingContext::paint_descendants(PaintContext& context, Paintable const&
paintable.clear_clip_overflow_rect(context, to_paint_phase(phase));
paintable.after_children_paint(context, to_paint_phase(phase));
paintable.reset_scroll_offset(context, to_paint_phase(phase));
}
void StackingContext::paint_child(PaintContext& context, StackingContext const& child)