mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
layout: Fix intrinsic contributions of anonymous blocks (#34719)
In order to compute the inline min-content and max-content contributions of an anonymous block, we were finding its min-content and max-content inline size with a SizeConstraint coming from the block size of the box. However, anonymous blocks do not establish a containing block for their contents, so this patch uses a SizeConstraint from the block size of the containing block. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
1157fa28b3
commit
09408ae10b
6 changed files with 91 additions and 22 deletions
|
@ -410,8 +410,9 @@ fn compute_inline_content_sizes_for_block_level_boxes(
|
|||
&base.style,
|
||||
containing_block,
|
||||
&LogicalVec2::zero(),
|
||||
false, /* auto_block_size_stretches_to_containing_block */
|
||||
false, /* is_table */
|
||||
false, /* auto_block_size_stretches_to_containing_block */
|
||||
false, /* is_table */
|
||||
!matches!(base.style.pseudo(), Some(PseudoElement::ServoAnonymousBox)),
|
||||
|_| None, /* TODO: support preferred aspect ratios on non-replaced boxes */
|
||||
|constraint_space| {
|
||||
base.inline_content_sizes(layout_context, constraint_space, contents)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue