mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user