LibWeb: Fix crash from text inside SVG

This commit is contained in:
Psychpsyo 2024-11-16 14:46:51 +01:00 committed by Alexander Kalenik
parent 135daeb8bb
commit 801499f13e
Notes: github-actions[bot] 2024-11-19 12:42:14 +00:00
2 changed files with 9 additions and 2 deletions

View file

@ -100,8 +100,8 @@ void SVGSVGPaintable::paint_descendants(PaintContext& context, PaintableBox cons
};
paintable.before_children_paint(context, PaintPhase::Foreground);
paintable.for_each_child([&](auto& child) {
paint_svg_box(verify_cast<PaintableBox>(child));
paintable.for_each_child_of_type<PaintableBox>([&](PaintableBox& child) {
paint_svg_box(child);
return IterationDecision::Continue;
});
paintable.after_children_paint(context, PaintPhase::Foreground);

View file

@ -0,0 +1,7 @@
<!-- matches against itself because the only thing being tested is that this does not crash. -->
<link rel="match" href="./svg-text-crash.html" />
<svg>
<foreignObject>
<span>foo</span>
</foreignObject>
</svg>