summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Layout/SVGGeometryBox.cpp
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2022-02-16 15:17:50 +0000
committerAndreas Kling <kling@serenityos.org>2022-02-16 21:47:53 +0100
commitaba8774c9c34a890f1fb421bd3766d40827cc3ae (patch)
tree5aa1ee030884da8e682ef2788b2dbaaa31dbe2fd /Userland/Libraries/LibWeb/Layout/SVGGeometryBox.cpp
parentae93aeb414334e5bb58517279783c01b95c74ca9 (diff)
downloadserenity-aba8774c9c34a890f1fb421bd3766d40827cc3ae.zip
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. :^)
Diffstat (limited to 'Userland/Libraries/LibWeb/Layout/SVGGeometryBox.cpp')
-rw-r--r--Userland/Libraries/LibWeb/Layout/SVGGeometryBox.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/SVGGeometryBox.cpp b/Userland/Libraries/LibWeb/Layout/SVGGeometryBox.cpp
index 756016361f..0f6c4a774f 100644
--- a/Userland/Libraries/LibWeb/Layout/SVGGeometryBox.cpp
+++ b/Userland/Libraries/LibWeb/Layout/SVGGeometryBox.cpp
@@ -32,7 +32,7 @@ void SVGGeometryBox::paint(PaintContext& context, PaintPhase phase)
Gfx::AntiAliasingPainter painter { context.painter() };
auto& svg_context = context.svg_context();
- auto offset = absolute_position();
+ auto offset = svg_context.svg_element_position();
painter.translate(offset);
if (auto fill_color = geometry_element.fill_color().value_or(svg_context.fill_color()); fill_color.alpha() > 0) {