Browse Source

LibWeb: Print FIXME instead of crashing if fill is url() in svg text

Aliaksandr Kalenik 2 years ago
parent
commit
cf47e130ae
1 changed files with 5 additions and 0 deletions
  1. 5 0
      Userland/Libraries/LibWeb/Painting/SVGTextPaintable.cpp

+ 5 - 0
Userland/Libraries/LibWeb/Painting/SVGTextPaintable.cpp

@@ -34,6 +34,11 @@ void SVGTextPaintable::paint(PaintContext& context, PaintPhase phase) const
     if (!layout_node().computed_values().fill().has_value())
     if (!layout_node().computed_values().fill().has_value())
         return;
         return;
 
 
+    if (layout_node().computed_values().fill()->is_url()) {
+        dbgln("FIXME: Using url() as fill is not supported for svg text");
+        return;
+    }
+
     SVGGraphicsPaintable::paint(context, phase);
     SVGGraphicsPaintable::paint(context, phase);
 
 
     if (phase != PaintPhase::Foreground)
     if (phase != PaintPhase::Foreground)