mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
layout: Ensure that min/max-content sizes ignore sizing properties (#37464)
This amends #37457 so that the min-content and max-content inline sizes of a replaced element stop depending on the value of the inline sizing properties. In practice I don't think this has any observable effect, but now the code obeys https://drafts.csswg.org/css-sizing-3/#intrinsic-sizes, and it's simpler. Testing: Unneeded Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
f2d0be1b9a
commit
ae20cdbdc9
1 changed files with 3 additions and 2 deletions
|
@ -551,13 +551,14 @@ impl ReplacedContents {
|
||||||
// First, compute the inline size. Intrinsic values depend on the block sizing properties
|
// First, compute the inline size. Intrinsic values depend on the block sizing properties
|
||||||
// through the aspect ratio, but these can also be intrinsic and depend on the inline size.
|
// through the aspect ratio, but these can also be intrinsic and depend on the inline size.
|
||||||
// Therefore, when there is an aspect ratio, we may need to:
|
// Therefore, when there is an aspect ratio, we may need to:
|
||||||
// 1. Tentatively resolve the inline size, ignoring block sizing properties.
|
// 1. Tentatively resolve the inline size, ignoring sizing properties in both axes
|
||||||
|
// (i.e. resulting in the inline fallback size).
|
||||||
// 2. Tentatively resolve the block size, resolving intrinsic keywords by transferring (1).
|
// 2. Tentatively resolve the block size, resolving intrinsic keywords by transferring (1).
|
||||||
// 3. Resolve the final inline size, resolving intrinsic keywords by transferring (2).
|
// 3. Resolve the final inline size, resolving intrinsic keywords by transferring (2).
|
||||||
// 4. Resolve the final block size, resolving intrinsic keywords by transferring (3).
|
// 4. Resolve the final block size, resolving intrinsic keywords by transferring (3).
|
||||||
let inline_size = resolve_inline_size(&|| {
|
let inline_size = resolve_inline_size(&|| {
|
||||||
SizeConstraint::Definite(resolve_block_size(&|| {
|
SizeConstraint::Definite(resolve_block_size(&|| {
|
||||||
SizeConstraint::Definite(resolve_inline_size(&|| SizeConstraint::default()))
|
SizeConstraint::Definite(get_inline_fallback_size())
|
||||||
}))
|
}))
|
||||||
});
|
});
|
||||||
LogicalVec2 {
|
LogicalVec2 {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue