1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 13:17:35 +00:00

LibWeb: Resolve % top and bottom insets against containing block height

This makes cookie banner buttons show up on Linktree again. :^)

Regressed in fd37ad3a84
This commit is contained in:
Andreas Kling 2023-07-08 09:49:37 +02:00
parent fd37ad3a84
commit db5bde01dc
3 changed files with 36 additions and 2 deletions

View file

@ -1020,8 +1020,8 @@ void FormattingContext::compute_height_for_absolutely_positioned_non_replaced_el
if (before_or_after_inside_layout == BeforeOrAfterInsideLayout::Before)
return;
box_state.inset_top = top.to_px(box, width_of_containing_block);
box_state.inset_bottom = bottom.to_px(box, width_of_containing_block);
box_state.inset_top = top.to_px(box, height_of_containing_block);
box_state.inset_bottom = bottom.to_px(box, height_of_containing_block);
box_state.margin_top = margin_top.to_px(box, width_of_containing_block);
box_state.margin_bottom = margin_bottom.to_px(box, width_of_containing_block);
box_state.padding_top = box.computed_values().padding().top().to_px(box, width_of_containing_block);