LibWeb: Do not try to place out-of-flow blocks in anonymous nodes
Currently placing floating blocks in anonymous nodes makes https://stackoverflow.com/ hang so let's leave it to try to place only absolute blocks in anonymous nodes for now. Also it breaks flex formatting when element with floating is flex child.
This commit is contained in:
parent
91b3a3bb58
commit
f74251606d
Notes:
sideshowbarker
2024-07-17 03:43:17 +09:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/SerenityOS/serenity/commit/f74251606d Pull-request: https://github.com/SerenityOS/serenity/pull/16192
1 changed files with 0 additions and 4 deletions
|
@ -85,10 +85,6 @@ static Layout::Node& insertion_parent_for_block_node(Layout::NodeWithStyle& layo
|
|||
return layout_parent;
|
||||
}
|
||||
|
||||
if ((layout_node.is_absolutely_positioned() || layout_node.is_floating()) && layout_parent.last_child()->children_are_inline() && layout_parent.last_child()->is_anonymous()) {
|
||||
return *layout_parent.last_child();
|
||||
}
|
||||
|
||||
if (!layout_parent.children_are_inline()) {
|
||||
// Parent block has block-level children, insert this block into parent.
|
||||
return layout_parent;
|
||||
|
|
Loading…
Add table
Reference in a new issue