mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
LibWeb: Do not crash when inserting block elements into inline SVGBoxes
Fixes #3395.
This commit is contained in:
parent
0c58dad7a6
commit
5f5d18d719
Notes:
github-actions[bot]
2025-02-19 12:50:19 +00:00
Author: https://github.com/gmta
Commit: 5f5d18d719
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3624
3 changed files with 10 additions and 5 deletions
|
@ -549,12 +549,10 @@ void TreeBuilder::update_layout_tree(DOM::Node& dom_node, TreeBuilder::Context&
|
|||
&& old_layout_node != layout_node;
|
||||
if (may_replace_existing_layout_node) {
|
||||
old_layout_node->parent()->replace_child(*layout_node, *old_layout_node);
|
||||
} else if (layout_node->is_svg_box()) {
|
||||
m_ancestor_stack.last()->append_child(*layout_node);
|
||||
} else {
|
||||
if (layout_node->is_svg_box()) {
|
||||
m_ancestor_stack.last()->append_child(*layout_node);
|
||||
} else {
|
||||
insert_node_into_inline_or_block_ancestor(*layout_node, display, AppendOrPrepend::Append);
|
||||
}
|
||||
insert_node_into_inline_or_block_ancestor(*layout_node, display, AppendOrPrepend::Append);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue