mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 17:40:27 +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
Notes:
sideshowbarker
2024-07-19 05:23:26 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/bab0143bb27
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…
Reference in a new issue