From bab0143bb27f8dfcdde25863276518d3b94d4f6f Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 25 Jun 2020 15:16:43 +0200 Subject: [PATCH] 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. --- Libraries/LibWeb/Layout/LayoutBlock.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); }