mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-18 00:09:44 +00:00
LibWeb: Fix crash from text inside SVG
This commit is contained in:
parent
135daeb8bb
commit
801499f13e
Notes:
github-actions[bot]
2024-11-19 12:42:14 +00:00
Author: https://github.com/Psychpsyo
Commit: 801499f13e
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2381
Reviewed-by: https://github.com/kalenikaliaksandr
Reviewed-by: https://github.com/shlyakpavel
2 changed files with 9 additions and 2 deletions
|
@ -100,8 +100,8 @@ void SVGSVGPaintable::paint_descendants(PaintContext& context, PaintableBox cons
|
||||||
};
|
};
|
||||||
|
|
||||||
paintable.before_children_paint(context, PaintPhase::Foreground);
|
paintable.before_children_paint(context, PaintPhase::Foreground);
|
||||||
paintable.for_each_child([&](auto& child) {
|
paintable.for_each_child_of_type<PaintableBox>([&](PaintableBox& child) {
|
||||||
paint_svg_box(verify_cast<PaintableBox>(child));
|
paint_svg_box(child);
|
||||||
return IterationDecision::Continue;
|
return IterationDecision::Continue;
|
||||||
});
|
});
|
||||||
paintable.after_children_paint(context, PaintPhase::Foreground);
|
paintable.after_children_paint(context, PaintPhase::Foreground);
|
||||||
|
|
7
Tests/LibWeb/Ref/input/svg-text-crash.html
Normal file
7
Tests/LibWeb/Ref/input/svg-text-crash.html
Normal 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>
|
Loading…
Add table
Add a link
Reference in a new issue