diff options
author | Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com> | 2022-11-26 01:27:34 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-12-06 08:53:10 +0100 |
commit | f74251606d74b504a1379ebb893fdb5529054ea5 (patch) | |
tree | db1cecc6fd0ef8265b3d7c5ddfb3e180ca00513b /Userland | |
parent | 91b3a3bb58d7d1327b4e22dc02364fd4ebb7a48b (diff) | |
download | serenity-f74251606d74b504a1379ebb893fdb5529054ea5.zip |
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.
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp b/Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp index 18f6ef194b..51aa5cefe0 100644 --- a/Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp +++ b/Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp @@ -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; |