summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb/Layout
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-06-25 15:16:43 +0200
committerAndreas Kling <kling@serenityos.org>2020-06-25 15:53:23 +0200
commitbab0143bb27f8dfcdde25863276518d3b94d4f6f (patch)
treebb2b27355e6350534755e86cfc30ebb345a1f353 /Libraries/LibWeb/Layout
parentb2f54be5147de518007ff45cb0a9c279d05bf574 (diff)
downloadserenity-bab0143bb27f8dfcdde25863276518d3b94d4f6f.zip
LibWeb: Place normal-flow blocks relative to non-absolute siblings
We could previously place a box next to a preceding sibling with position:fixed, which is wrong since fixed-position elements are taken out of the normal flow.
Diffstat (limited to 'Libraries/LibWeb/Layout')
-rw-r--r--Libraries/LibWeb/Layout/LayoutBlock.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibWeb/Layout/LayoutBlock.cpp b/Libraries/LibWeb/Layout/LayoutBlock.cpp
index 9ca859e7a6..863cec0b40 100644
--- a/Libraries/LibWeb/Layout/LayoutBlock.cpp
+++ b/Libraries/LibWeb/Layout/LayoutBlock.cpp
@@ -627,7 +627,7 @@ void LayoutBlock::place_block_level_non_replaced_element_in_normal_flow(LayoutBl
auto* relevant_sibling = block.previous_sibling();
while (relevant_sibling != nullptr) {
- if (relevant_sibling->style().position() != CSS::Position::Absolute)
+ if (!relevant_sibling->is_absolutely_positioned())
break;
relevant_sibling = relevant_sibling->previous_sibling();
}