1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:47:34 +00:00

LibWeb: Give SVG geometry elements a position

This makes the selected-in-the-inspector outline appear in the right
place. We take the stroke-width into account when producing the
bounding box, which makes the fit nice and snug. :^)
This commit is contained in:
Sam Atkins 2022-02-16 15:17:50 +00:00 committed by Andreas Kling
parent ae93aeb414
commit aba8774c9c
4 changed files with 16 additions and 4 deletions

View file

@ -19,7 +19,7 @@ void SVGSVGBox::before_children_paint(PaintContext& context, PaintPhase phase)
return;
if (!context.has_svg_context())
context.set_svg_context(SVGContext());
context.set_svg_context(SVGContext(absolute_rect()));
SVGGraphicsBox::before_children_paint(context, phase);
}