mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-21 18:37:58 +03:00
LibWeb: Respect explicitly specified CSS "height" on block elements
Don't size blocks to fit their contents if they have an explicit (non-auto) height specified.
This commit is contained in:
parent
543dd54a1d
commit
2c3376f9d4
Notes:
sideshowbarker
2024-07-18 22:00:34 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/2c3376f9d45
@ -351,8 +351,10 @@ void BlockFormattingContext::layout_block_level_children(Box& box, LayoutMode la
|
||||
box.set_width(content_width);
|
||||
}
|
||||
|
||||
// FIXME: It's not right to always shrink-wrap the box to the content here.
|
||||
box.set_height(content_height);
|
||||
if (box.computed_values().height().is_undefined_or_auto())
|
||||
box.set_height(content_height);
|
||||
else
|
||||
box.set_height(box.computed_values().height().resolved_or_zero(box, context_box().height()).to_px(box));
|
||||
}
|
||||
|
||||
void BlockFormattingContext::place_block_level_replaced_element_in_normal_flow(Box& child_box, Box& containing_block)
|
||||
|
Loading…
Reference in New Issue
Block a user