mirror of
https://github.com/servo/servo.git
synced 2025-09-27 23:30:08 +01:00
layout: Add style to ConstraintSpace
and IndefiniteContainingBlock
(#39229)
They only had the writing mode, now they will have the entire computed style. This is needed for #39230. Testing: Not needed, no behavior change Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
dfdcba88d4
commit
9e9bd80bba
10 changed files with 44 additions and 62 deletions
|
@ -175,14 +175,14 @@ pub(crate) fn outer_inline(
|
|||
available_block_size,
|
||||
)
|
||||
};
|
||||
ConstraintSpace::new(block_size, style.writing_mode, aspect_ratio)
|
||||
ConstraintSpace::new(block_size, style, aspect_ratio)
|
||||
} else {
|
||||
// This assumes that there is no preferred aspect ratio, or that there is no
|
||||
// block size constraint to be transferred so the ratio is irrelevant.
|
||||
// We only get into here for anonymous blocks, for which the assumption holds.
|
||||
ConstraintSpace::new(
|
||||
containing_block.size.block.into(),
|
||||
containing_block.writing_mode,
|
||||
containing_block.style,
|
||||
None,
|
||||
)
|
||||
};
|
||||
|
@ -246,13 +246,14 @@ pub(crate) fn outer_inline(
|
|||
// We need a comment here to avoid breaking `./mach test-tidy`.
|
||||
matches!(size, Size::Numeric(numeric) if numeric.has_percentage())
|
||||
};
|
||||
let writing_mode = containing_block.style.writing_mode;
|
||||
if content_box_sizes.inline.preferred.is_initial() &&
|
||||
has_percentage(style.box_size(containing_block.writing_mode).inline)
|
||||
has_percentage(style.box_size(writing_mode).inline)
|
||||
{
|
||||
preferred_min_content = Au::zero();
|
||||
}
|
||||
if content_box_sizes.inline.max.is_initial() &&
|
||||
has_percentage(style.max_box_size(containing_block.writing_mode).inline)
|
||||
has_percentage(style.max_box_size(writing_mode).inline)
|
||||
{
|
||||
max_min_content = Some(Au::zero());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue