LibWeb: Fix scroll offset application for SVG root box

Now we use `before_paint()` and `after_paint()` calls for SVG root box
to make sure that both clip and scroll are applied.

Fixes painting of SVG arrows on www.ubereats.com
This commit is contained in:
Aliaksandr Kalenik 2025-03-26 19:01:11 +00:00 committed by Alexander Kalenik
commit e655b77393
Notes: github-actions[bot] 2025-03-26 20:13:44 +00:00
3 changed files with 29 additions and 2 deletions

View file

@ -103,11 +103,11 @@ void StackingContext::paint_svg(PaintContext& context, PaintableBox const& paint
if (phase != PaintPhase::Foreground)
return;
paintable.apply_clip_overflow_rect(context, PaintPhase::Foreground);
paintable.before_paint(context, PaintPhase::Foreground);
paint_node(paintable, context, PaintPhase::Background);
paint_node(paintable, context, PaintPhase::Border);
SVGSVGPaintable::paint_svg_box(context, paintable, phase);
paintable.clear_clip_overflow_rect(context, PaintPhase::Foreground);
paintable.after_paint(context, PaintPhase::Foreground);
}
void StackingContext::paint_descendants(PaintContext& context, Paintable const& paintable, StackingContextPaintPhase phase)