Просмотр исходного кода

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

Aliaksandr Kalenik 2 лет назад
Родитель
Сommit
cf47e130ae
1 измененных файлов с 5 добавлено и 0 удалено
  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())
         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);
 
     if (phase != PaintPhase::Foreground)