mirror of
https://github.com/servo/servo.git
synced 2025-10-01 09:09:15 +01:00
layout: Add an indefinite containing block for intrinsic sizing (#33204)
When computing the min-content or max-content size of an element we need to ignore `inline-size`, `min-inline-size` and `max-inline-size`. However, we should take the block-axis sizing properties into account. That's because the contents could have percentages depending on them, which can then affect their inline size via an aspect ratio. Therefore, this patch adds `IndefiniteContainingBlock`, which is similar to `ContainingBlock`, but it allows an indefinite inline-size. This struct is then passed arround during intrinsic sizing. More refinement will be needed in follow-up patches in order to fully address the problem. Signed-off-by: Oriol Brufau <obrufau@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
46dbe4ce32
commit
93abdf7cb5
29 changed files with 600 additions and 332 deletions
13
tests/wpt/meta/MANIFEST.json
vendored
13
tests/wpt/meta/MANIFEST.json
vendored
|
@ -176439,6 +176439,19 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"percentage-padding-005.html": [
|
||||
"928286a590407bd5607fe4797b19be3b4ecb14d8",
|
||||
[
|
||||
null,
|
||||
[
|
||||
[
|
||||
"/css/reference/ref-filled-green-100px-square-only.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"percentage-size-subitems-001.html": [
|
||||
"70f3953052a3a770c6cd15ee169607a00fc452b0",
|
||||
[
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[flex-basis-011.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[flex-minimum-height-flex-items-015.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[flexbox-flex-direction-column-percentage-ignored.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[item-with-max-height-and-scrollbar.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[nested-flex-image-loading-invalidates-intrinsic-sizes.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[percentage-heights-014.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[position-fixed-001.html]
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[aspect-ratio-affects-container-width-when-height-changes.html]
|
||||
[#container 1]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[intrinsic-percent-replaced-001.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[intrinsic-percent-replaced-dynamic-002.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[intrinsic-percent-replaced-dynamic-003.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[intrinsic-percent-replaced-dynamic-004.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[intrinsic-percent-replaced-dynamic-006.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[intrinsic-percent-replaced-dynamic-009.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[calc-rounding-002.html]
|
||||
expected: FAIL
|
11
tests/wpt/tests/css/css-flexbox/percentage-padding-005.html
vendored
Normal file
11
tests/wpt/tests/css/css-flexbox/percentage-padding-005.html
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#item-margins">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#intrinsic-main-sizes">
|
||||
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
|
||||
<meta name="assert" content="The flex container becomes 100px tall because the padding percentage of the item resolves against its width.">
|
||||
|
||||
<p>Test passes if there is a filled green square.</p>
|
||||
<div style="display: flex; background: green; flex-direction: column; width: 100px;">
|
||||
<div style="width: 100px; padding-bottom: 100%"></div>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue