mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
LibWeb: Don't collapse blocks into the previous sibling's padding
We were forgetting to account for the padding-bottom of the previous relevant sibling when placing blocks vertically.
This commit is contained in:
parent
0aa74074dd
commit
6f74eaed42
Notes:
sideshowbarker
2024-07-19 01:56:52 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/6f74eaed429
1 changed files with 1 additions and 1 deletions
|
@ -647,7 +647,7 @@ void LayoutBlock::place_block_level_non_replaced_element_in_normal_flow(LayoutBl
|
|||
}
|
||||
|
||||
if (relevant_sibling) {
|
||||
y += relevant_sibling->effective_offset().y() + relevant_sibling->height();
|
||||
y += relevant_sibling->effective_offset().y() + relevant_sibling->height() + relevant_sibling->box_model().padding.bottom.to_px(*relevant_sibling);
|
||||
|
||||
// Collapse top margin with bottom margin of preceding siblings if needed
|
||||
float my_margin_top = box.margin.top.to_px(*this);
|
||||
|
|
Loading…
Add table
Reference in a new issue