mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:27:35 +00:00
LibWeb: Don't offset abspos children of flex container by padding twice
We were incorrectly offsetting the static position of abspos children of flex containers by the padding twice. This was a misguided attempt to adjust to the abspos containing block being the padding box, not the content box. Fixes #21344.
This commit is contained in:
parent
a86531809e
commit
3250a424f0
3 changed files with 37 additions and 8 deletions
|
@ -2240,14 +2240,6 @@ CSSPixelPoint FlexFormattingContext::calculate_static_position(Box const& box) c
|
|||
break;
|
||||
}
|
||||
|
||||
// NOTE: Next, we add the flex container's padding since abspos boxes are placed relative to the padding edge
|
||||
// of their abspos containing block.
|
||||
if (pack_from_end) {
|
||||
main_offset += is_row_layout() ? m_flex_container_state.padding_right : m_flex_container_state.padding_bottom;
|
||||
} else {
|
||||
main_offset += is_row_layout() ? m_flex_container_state.padding_left : m_flex_container_state.padding_top;
|
||||
}
|
||||
|
||||
if (pack_from_end)
|
||||
main_offset += inner_main_size(flex_container()) - inner_main_size(box) - main_border_before - main_border_after;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue