mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-24 18:02:20 +00:00
LibWeb: Never split <svg> for inline continuations
This fixes an issue where we'd make an absolute mess from nested SVG roots with display:block. Before this fix, the inner SVG root would trigger the inline continuation logic and try to split the tree.
This commit is contained in:
parent
4e23882995
commit
8e49b69f42
Notes:
github-actions[bot]
2025-07-12 12:12:47 +00:00
Author: https://github.com/awesomekling
Commit: 8e49b69f42
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5417
Reviewed-by: https://github.com/gmta ✅
3 changed files with 25 additions and 6 deletions
|
@ -1444,12 +1444,8 @@ bool NodeWithStyleAndBoxModelMetrics::should_create_inline_continuation() const
|
|||
if (is<SVG::SVGForeignObjectElement>(parent()->dom_node()))
|
||||
return false;
|
||||
|
||||
// SVGBoxes are appended directly to their layout parent without changing the parent's (non-)inline behavior.
|
||||
if (is_svg_box())
|
||||
return false;
|
||||
|
||||
// SVGForeignObjectBoxes should never be split.
|
||||
if (is_svg_foreign_object_box())
|
||||
// SVG related boxes should never be split.
|
||||
if (is_svg_box() || is_svg_svg_box() || is_svg_foreign_object_box())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue