mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 20:45:14 +00:00
LibWeb: Vertical % margins are relative to containing block width
We were messing this up on absolutely positioned elements by using the containing block height instead.
This commit is contained in:
parent
9c44634ca5
commit
d1d99fda32
Notes:
sideshowbarker
2024-07-17 06:26:45 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/d1d99fda32
1 changed files with 2 additions and 2 deletions
|
@ -749,9 +749,9 @@ void FormattingContext::layout_absolutely_positioned_element(Box const& box, Ava
|
|||
compute_height_for_absolutely_positioned_element(box, available_space);
|
||||
|
||||
box_state.margin_left = box.computed_values().margin().left().resolved(box, width_of_containing_block_as_length).to_px(box);
|
||||
box_state.margin_top = box.computed_values().margin().top().resolved(box, height_of_containing_block_as_length).to_px(box);
|
||||
box_state.margin_top = box.computed_values().margin().top().resolved(box, width_of_containing_block_as_length).to_px(box);
|
||||
box_state.margin_right = box.computed_values().margin().right().resolved(box, width_of_containing_block_as_length).to_px(box);
|
||||
box_state.margin_bottom = box.computed_values().margin().bottom().resolved(box, height_of_containing_block_as_length).to_px(box);
|
||||
box_state.margin_bottom = box.computed_values().margin().bottom().resolved(box, width_of_containing_block_as_length).to_px(box);
|
||||
|
||||
box_state.border_left = box.computed_values().border_left().width;
|
||||
box_state.border_right = box.computed_values().border_right().width;
|
||||
|
|
Loading…
Add table
Reference in a new issue