mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:27:35 +00:00
LibWeb: Skip over floating elements when collapsing margins
Two sibling blocks are not vertically adjacent if one is float:left and the other is float:none. Respect this when collapsing margins.
This commit is contained in:
parent
62daa6f73c
commit
ba76a72422
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();
|
auto* relevant_sibling = block.previous_sibling();
|
||||||
while (relevant_sibling != nullptr) {
|
while (relevant_sibling != nullptr) {
|
||||||
if (!relevant_sibling->is_absolutely_positioned())
|
if (!relevant_sibling->is_absolutely_positioned() && !relevant_sibling->is_floating())
|
||||||
break;
|
break;
|
||||||
relevant_sibling = relevant_sibling->previous_sibling();
|
relevant_sibling = relevant_sibling->previous_sibling();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue