mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
layout: Make non-normal
align-content
establish a block formatting context (#34984)
* Make non-normal align-content establish a block formatting context Signed-off-by: rayguo17 <rayguo17@gmail.com> * Adjust code comment Signed-off-by: Martin Robinson <mrobinson@igalia.com> --------- Signed-off-by: rayguo17 <rayguo17@gmail.com> Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
e81951a973
commit
cbea70d1a0
18 changed files with 24 additions and 271 deletions
|
@ -721,6 +721,15 @@ impl ComputedValuesExt for ComputedValues {
|
|||
return true;
|
||||
}
|
||||
|
||||
// Per <https://drafts.csswg.org/css-align/#distribution-block>:
|
||||
// Block containers with an `align-content` value that is not `normal` should
|
||||
// form an independent block formatting context. This should really only happen
|
||||
// for block containers, but we do not support subgrid containers yet which is the
|
||||
// only other case.
|
||||
if self.get_position().align_content.0.primary() != AlignFlags::NORMAL {
|
||||
return true;
|
||||
}
|
||||
|
||||
// TODO: We need to handle CSS Contain here.
|
||||
false
|
||||
}
|
||||
|
|
12
tests/wpt/meta/MANIFEST.json
vendored
12
tests/wpt/meta/MANIFEST.json
vendored
|
@ -557232,42 +557232,42 @@
|
|||
]
|
||||
],
|
||||
"align-content-block-006.html": [
|
||||
"acdb6454bd4b85780b5abc6da476f5c699e89dfa",
|
||||
"fa45f74a7ed8a2515ca0515636ff19c9d5513a13",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"align-content-block-007.html": [
|
||||
"c60f640ab066b35c0fb60b2f5c8d134f61d99b0a",
|
||||
"7c8a7166866e275bd4803fad840711220f2366ce",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"align-content-block-008.html": [
|
||||
"7d088d6ae634e0fb63081dd4b01a578a104dc0b5",
|
||||
"2325933fb34ebf1838656f8b66927dad1ac4352b",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"align-content-block-009.html": [
|
||||
"df45aa588f9ddf7a8b657885a817860d1ef0c022",
|
||||
"312c3ff3a9f3577b674b760f30b9f0f45636e652",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"align-content-block-010.html": [
|
||||
"f3ec7a4e9299d71c4fb26b928866cced2d437eed",
|
||||
"d0808f0206e842f2b186eb3375edb18cc0d10263",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"align-content-block-011.html": [
|
||||
"9210f5a83a7a5c95775c42d7a01d1f3ac6ab440e",
|
||||
"ff5e24ad5f0fff201dcb3c3f255f126f373f4461",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[align-content-block-001.html]
|
||||
expected: FAIL
|
|
@ -28,21 +28,4 @@
|
|||
|
||||
[.test 16: space-around]
|
||||
expected: FAIL
|
||||
|
||||
[.test 1: start]
|
||||
expected: FAIL
|
||||
|
||||
[.test 4: baseline]
|
||||
expected: FAIL
|
||||
|
||||
[.test 6: flex-start]
|
||||
expected: FAIL
|
||||
|
||||
[.test 8: unsafe start]
|
||||
expected: FAIL
|
||||
|
||||
[.test 11: safe start]
|
||||
expected: FAIL
|
||||
|
||||
[.test 15: space-between]
|
||||
expected: FAIL
|
||||
|
|
@ -1,37 +1,22 @@
|
|||
[align-content-block-004.html]
|
||||
[.test 1: start]
|
||||
expected: FAIL
|
||||
|
||||
[.test 2: center]
|
||||
expected: FAIL
|
||||
|
||||
[.test 3: end]
|
||||
expected: FAIL
|
||||
|
||||
[.test 4: baseline]
|
||||
expected: FAIL
|
||||
|
||||
[.test 5: last baseline]
|
||||
expected: FAIL
|
||||
|
||||
[.test 6: flex-start]
|
||||
expected: FAIL
|
||||
|
||||
[.test 7: flex-end]
|
||||
expected: FAIL
|
||||
|
||||
[.test 8: unsafe start]
|
||||
expected: FAIL
|
||||
|
||||
[.test 9: unsafe center]
|
||||
expected: FAIL
|
||||
|
||||
[.test 10: unsafe end]
|
||||
expected: FAIL
|
||||
|
||||
[.test 11: safe start]
|
||||
expected: FAIL
|
||||
|
||||
[.test 12: safe center]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -41,8 +26,5 @@
|
|||
[.test 14: space-evenly]
|
||||
expected: FAIL
|
||||
|
||||
[.test 15: space-between]
|
||||
expected: FAIL
|
||||
|
||||
[.test 16: space-around]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,48 +1,6 @@
|
|||
[align-content-block-005.html]
|
||||
[.test 1: start]
|
||||
expected: FAIL
|
||||
|
||||
[.test 2: center]
|
||||
expected: FAIL
|
||||
|
||||
[.test 3: end]
|
||||
expected: FAIL
|
||||
|
||||
[.test 4: baseline]
|
||||
expected: FAIL
|
||||
|
||||
[.test 5: last baseline]
|
||||
expected: FAIL
|
||||
|
||||
[.test 6: flex-start]
|
||||
expected: FAIL
|
||||
|
||||
[.test 7: flex-end]
|
||||
expected: FAIL
|
||||
|
||||
[.test 8: unsafe start]
|
||||
expected: FAIL
|
||||
|
||||
[.test 9: unsafe center]
|
||||
expected: FAIL
|
||||
|
||||
[.test 10: unsafe end]
|
||||
expected: FAIL
|
||||
|
||||
[.test 11: safe start]
|
||||
expected: FAIL
|
||||
|
||||
[.test 12: safe center]
|
||||
expected: FAIL
|
||||
|
||||
[.test 13: safe end]
|
||||
expected: FAIL
|
||||
|
||||
[.test 14: space-evenly]
|
||||
expected: FAIL
|
||||
|
||||
[.test 15: space-between]
|
||||
expected: FAIL
|
||||
|
||||
[.test 16: space-around]
|
||||
expected: FAIL
|
||||
expected: FAIL
|
|
@ -1,37 +1,22 @@
|
|||
[align-content-block-006.html]
|
||||
[.test 1: start]
|
||||
expected: FAIL
|
||||
|
||||
[.test 2: center]
|
||||
expected: FAIL
|
||||
|
||||
[.test 3: end]
|
||||
expected: FAIL
|
||||
|
||||
[.test 4: baseline]
|
||||
expected: FAIL
|
||||
|
||||
[.test 5: last baseline]
|
||||
expected: FAIL
|
||||
|
||||
[.test 6: flex-start]
|
||||
expected: FAIL
|
||||
|
||||
[.test 7: flex-end]
|
||||
expected: FAIL
|
||||
|
||||
[.test 8: unsafe start]
|
||||
expected: FAIL
|
||||
|
||||
[.test 9: unsafe center]
|
||||
expected: FAIL
|
||||
|
||||
[.test 10: unsafe end]
|
||||
expected: FAIL
|
||||
|
||||
[.test 11: safe start]
|
||||
expected: FAIL
|
||||
|
||||
[.test 12: safe center]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -41,8 +26,5 @@
|
|||
[.test 14: space-evenly]
|
||||
expected: FAIL
|
||||
|
||||
[.test 15: space-between]
|
||||
expected: FAIL
|
||||
|
||||
[.test 16: space-around]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,48 +1,6 @@
|
|||
[align-content-block-007.html]
|
||||
[.test 1: start]
|
||||
expected: FAIL
|
||||
|
||||
[.test 2: center]
|
||||
expected: FAIL
|
||||
|
||||
[.test 3: end]
|
||||
expected: FAIL
|
||||
|
||||
[.test 4: baseline]
|
||||
expected: FAIL
|
||||
|
||||
[.test 5: last baseline]
|
||||
expected: FAIL
|
||||
|
||||
[.test 6: flex-start]
|
||||
expected: FAIL
|
||||
|
||||
[.test 7: flex-end]
|
||||
expected: FAIL
|
||||
|
||||
[.test 8: unsafe start]
|
||||
expected: FAIL
|
||||
|
||||
[.test 9: unsafe center]
|
||||
expected: FAIL
|
||||
|
||||
[.test 10: unsafe end]
|
||||
expected: FAIL
|
||||
|
||||
[.test 11: safe start]
|
||||
expected: FAIL
|
||||
|
||||
[.test 12: safe center]
|
||||
expected: FAIL
|
||||
|
||||
[.test 13: safe end]
|
||||
expected: FAIL
|
||||
|
||||
[.test 14: space-evenly]
|
||||
expected: FAIL
|
||||
|
||||
[.test 15: space-between]
|
||||
expected: FAIL
|
||||
|
||||
[.test 16: space-around]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,37 +1,22 @@
|
|||
[align-content-block-008.html]
|
||||
[.test 1: start]
|
||||
expected: FAIL
|
||||
|
||||
[.test 2: center]
|
||||
expected: FAIL
|
||||
|
||||
[.test 3: end]
|
||||
expected: FAIL
|
||||
|
||||
[.test 4: baseline]
|
||||
expected: FAIL
|
||||
|
||||
[.test 5: last baseline]
|
||||
expected: FAIL
|
||||
|
||||
[.test 6: flex-start]
|
||||
expected: FAIL
|
||||
|
||||
[.test 7: flex-end]
|
||||
expected: FAIL
|
||||
|
||||
[.test 8: unsafe start]
|
||||
expected: FAIL
|
||||
|
||||
[.test 9: unsafe center]
|
||||
expected: FAIL
|
||||
|
||||
[.test 10: unsafe end]
|
||||
expected: FAIL
|
||||
|
||||
[.test 11: safe start]
|
||||
expected: FAIL
|
||||
|
||||
[.test 12: safe center]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -41,8 +26,5 @@
|
|||
[.test 14: space-evenly]
|
||||
expected: FAIL
|
||||
|
||||
[.test 15: space-between]
|
||||
expected: FAIL
|
||||
|
||||
[.test 16: space-around]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,27 +1,4 @@
|
|||
[align-content-block-009.html]
|
||||
[.test 1: start]
|
||||
expected: FAIL
|
||||
|
||||
[.test 2: center]
|
||||
expected: FAIL
|
||||
|
||||
[.test 3: end]
|
||||
expected: FAIL
|
||||
|
||||
[.test 4: baseline]
|
||||
expected: FAIL
|
||||
|
||||
[.test 5: last baseline]
|
||||
expected: FAIL
|
||||
|
||||
[.test 6: flex-start]
|
||||
expected: FAIL
|
||||
|
||||
[.test 7: flex-end]
|
||||
expected: FAIL
|
||||
|
||||
[.test 8: unsafe start]
|
||||
expected: FAIL
|
||||
|
||||
[.test 9: unsafe center]
|
||||
expected: FAIL
|
||||
|
@ -29,20 +6,3 @@
|
|||
[.test 10: unsafe end]
|
||||
expected: FAIL
|
||||
|
||||
[.test 11: safe start]
|
||||
expected: FAIL
|
||||
|
||||
[.test 12: safe center]
|
||||
expected: FAIL
|
||||
|
||||
[.test 13: safe end]
|
||||
expected: FAIL
|
||||
|
||||
[.test 14: space-evenly]
|
||||
expected: FAIL
|
||||
|
||||
[.test 15: space-between]
|
||||
expected: FAIL
|
||||
|
||||
[.test 16: space-around]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,37 +1,22 @@
|
|||
[align-content-block-010.html]
|
||||
[.test 1: start]
|
||||
expected: FAIL
|
||||
|
||||
[.test 2: center]
|
||||
expected: FAIL
|
||||
|
||||
[.test 3: end]
|
||||
expected: FAIL
|
||||
|
||||
[.test 4: baseline]
|
||||
expected: FAIL
|
||||
|
||||
[.test 5: last baseline]
|
||||
expected: FAIL
|
||||
|
||||
[.test 6: flex-start]
|
||||
expected: FAIL
|
||||
|
||||
[.test 7: flex-end]
|
||||
expected: FAIL
|
||||
|
||||
[.test 8: unsafe start]
|
||||
expected: FAIL
|
||||
|
||||
[.test 9: unsafe center]
|
||||
expected: FAIL
|
||||
|
||||
[.test 10: unsafe end]
|
||||
expected: FAIL
|
||||
|
||||
[.test 11: safe start]
|
||||
expected: FAIL
|
||||
|
||||
[.test 12: safe center]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -41,8 +26,5 @@
|
|||
[.test 14: space-evenly]
|
||||
expected: FAIL
|
||||
|
||||
[.test 15: space-between]
|
||||
expected: FAIL
|
||||
|
||||
[.test 16: space-around]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,48 +1,7 @@
|
|||
[align-content-block-011.html]
|
||||
[.test 1: start]
|
||||
expected: FAIL
|
||||
|
||||
[.test 2: center]
|
||||
expected: FAIL
|
||||
|
||||
[.test 3: end]
|
||||
expected: FAIL
|
||||
|
||||
[.test 4: baseline]
|
||||
expected: FAIL
|
||||
|
||||
[.test 5: last baseline]
|
||||
expected: FAIL
|
||||
|
||||
[.test 6: flex-start]
|
||||
expected: FAIL
|
||||
|
||||
[.test 7: flex-end]
|
||||
expected: FAIL
|
||||
|
||||
[.test 8: unsafe start]
|
||||
expected: FAIL
|
||||
|
||||
[.test 9: unsafe center]
|
||||
expected: FAIL
|
||||
|
||||
[.test 10: unsafe end]
|
||||
expected: FAIL
|
||||
|
||||
[.test 11: safe start]
|
||||
expected: FAIL
|
||||
|
||||
[.test 12: safe center]
|
||||
expected: FAIL
|
||||
|
||||
[.test 13: safe end]
|
||||
expected: FAIL
|
||||
|
||||
[.test 14: space-evenly]
|
||||
expected: FAIL
|
||||
|
||||
[.test 15: space-between]
|
||||
expected: FAIL
|
||||
|
||||
[.test 16: space-around]
|
||||
expected: FAIL
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
function doTest()
|
||||
{
|
||||
document.body.offsetHeight; // trigger layout
|
||||
document.getElementById('initial').type = 'text/plain'; // invalidate stylesheet
|
||||
document.getElementById('initial').disabled = true;
|
||||
checkLayout('.test');
|
||||
}
|
||||
window.onload = () => {
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
function doTest()
|
||||
{
|
||||
document.body.offsetHeight; // trigger layout
|
||||
document.getElementById('initial').type = 'text/plain'; // invalidate stylesheet
|
||||
document.getElementById('initial').disabled = true;
|
||||
checkLayout('.test');
|
||||
}
|
||||
window.onload = () => {
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
function doTest()
|
||||
{
|
||||
document.body.offsetHeight; // trigger layout
|
||||
document.getElementById('initial').type = 'text/plain'; // invalidate stylesheet
|
||||
document.getElementById('initial').disabled = true;
|
||||
checkLayout('.test');
|
||||
}
|
||||
window.onload = () => {
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
function doTest()
|
||||
{
|
||||
document.body.offsetHeight; // trigger layout
|
||||
document.getElementById('initial').type = 'text/plain'; // invalidate stylesheet
|
||||
document.getElementById('initial').disabled = true;
|
||||
checkLayout('.test');
|
||||
}
|
||||
window.onload = () => {
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
function doTest()
|
||||
{
|
||||
document.body.offsetHeight; // trigger layout
|
||||
document.getElementById('initial').type = 'text/plain'; // invalidate stylesheet
|
||||
document.getElementById('initial').disabled = true;
|
||||
checkLayout('.test');
|
||||
}
|
||||
window.onload = () => {
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
function doTest()
|
||||
{
|
||||
document.body.offsetHeight; // trigger layout
|
||||
document.getElementById('initial').type = 'text/plain'; // invalidate stylesheet
|
||||
document.getElementById('initial').disabled = true;
|
||||
checkLayout('.test');
|
||||
}
|
||||
window.onload = () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue