summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorAliaksandr Kalenik <kalenik.aliaksandr@gmail.com>2022-11-22 22:57:14 +0300
committerAndreas Kling <kling@serenityos.org>2022-11-22 21:13:01 +0100
commit3d74d72bcb9763a695a53bf27114031fe62d146e (patch)
treef72d8130a690c987abe2720d038f4389daebe172 /Userland
parentaa08c825ecbfd63ce2f3f62e3360ba3aef157ff7 (diff)
downloadserenity-3d74d72bcb9763a695a53bf27114031fe62d146e.zip
LibWeb: Do not try to join floats into anonymous block
Making floats to join anonymous block caused regressions in Acid2 Test so let's leave it to be only absolute blocks who might be joined into anonymous block when possible.
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp b/Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp
index 9500d3488c..6227f381df 100644
--- a/Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp
+++ b/Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp
@@ -84,11 +84,10 @@ static Layout::Node& insertion_parent_for_block_node(Layout::NodeWithStyle& layo
return layout_parent;
}
- if (layout_node.is_floating() || layout_node.is_absolutely_positioned()) {
+ // TODO: Floats should probably also be able to have inline siblings
+ if (layout_node.is_absolutely_positioned() && layout_parent.last_child()->children_are_inline()) {
// Block is out-of-flow, it can have inline siblings if necessary.
- if (layout_parent.last_child()->children_are_inline()) {
- return *layout_parent.last_child();
- }
+ return *layout_parent.last_child();
}
if (!layout_parent.children_are_inline()) {