diff --git a/Tests/LibWeb/Layout/expected/svg/text-fill-none.txt b/Tests/LibWeb/Layout/expected/svg/text-fill-none.txt new file mode 100644 index 00000000000..c467c8fd972 --- /dev/null +++ b/Tests/LibWeb/Layout/expected/svg/text-fill-none.txt @@ -0,0 +1,8 @@ +Viewport <#document> at (0,0) content-size 800x600 children: not-inline + BlockContainer at (0,0) content-size 800x600 [BFC] children: not-inline + BlockContainer at (8,8) content-size 784x163 children: inline + line 0 width: 300, height: 163, bottom: 163, baseline: 13.53125 + frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,21 300x150] + SVGSVGBox at (8,21) content-size 300x150 [SVG] children: not-inline + SVGTextBox at (8,21) content-size 0x0 children: not-inline + TextNode <#text> diff --git a/Tests/LibWeb/Layout/input/svg/text-fill-none.html b/Tests/LibWeb/Layout/input/svg/text-fill-none.html new file mode 100644 index 00000000000..dee2b3d7f7d --- /dev/null +++ b/Tests/LibWeb/Layout/input/svg/text-fill-none.html @@ -0,0 +1 @@ + diff --git a/Userland/Libraries/LibWeb/Painting/SVGTextPaintable.cpp b/Userland/Libraries/LibWeb/Painting/SVGTextPaintable.cpp index 51a3db79559..48a2a2cd36e 100644 --- a/Userland/Libraries/LibWeb/Painting/SVGTextPaintable.cpp +++ b/Userland/Libraries/LibWeb/Painting/SVGTextPaintable.cpp @@ -31,6 +31,9 @@ void SVGTextPaintable::paint(PaintContext& context, PaintPhase phase) const if (!is_visible()) return; + if (!layout_node().computed_values().fill().has_value()) + return; + SVGGraphicsPaintable::paint(context, phase); if (phase != PaintPhase::Foreground)