mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:28:11 +00:00
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.
This commit is contained in:
parent
b2f54be514
commit
bab0143bb2
1 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue