mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
layout: align-content with default value normal should behave as strech in flex container (#35178)
Signed-off-by: rayguo17 <rayguo17@gmail.com>
This commit is contained in:
parent
6a2e37183c
commit
2030b7affd
23 changed files with 8 additions and 137 deletions
|
@ -784,12 +784,17 @@ impl FlexContainer {
|
||||||
// the resolution of https://github.com/w3c/csswg-drafts/issues/10154
|
// the resolution of https://github.com/w3c/csswg-drafts/issues/10154
|
||||||
let num_lines = initial_line_layouts.len();
|
let num_lines = initial_line_layouts.len();
|
||||||
let resolved_align_content: AlignFlags = {
|
let resolved_align_content: AlignFlags = {
|
||||||
|
// Computed value from the style system
|
||||||
let align_content_style = flex_context.config.align_content.0.primary();
|
let align_content_style = flex_context.config.align_content.0.primary();
|
||||||
|
|
||||||
// Inital values from the style system
|
|
||||||
let mut resolved_align_content = align_content_style.value();
|
|
||||||
let mut is_safe = align_content_style.flags() == AlignFlags::SAFE;
|
let mut is_safe = align_content_style.flags() == AlignFlags::SAFE;
|
||||||
|
|
||||||
|
// From https://drafts.csswg.org/css-align/#distribution-flex
|
||||||
|
// > `normal` behaves as `stretch`.
|
||||||
|
let mut resolved_align_content = match align_content_style.value() {
|
||||||
|
AlignFlags::NORMAL => AlignFlags::STRETCH,
|
||||||
|
align_content => align_content,
|
||||||
|
};
|
||||||
|
|
||||||
// From https://drafts.csswg.org/css-flexbox/#algo-line-align:
|
// From https://drafts.csswg.org/css-flexbox/#algo-line-align:
|
||||||
// > Some alignments can only be fulfilled in certain situations or are
|
// > Some alignments can only be fulfilled in certain situations or are
|
||||||
// > limited in how much space they can consume; for example, space-between
|
// > limited in how much space they can consume; for example, space-between
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
[position-absolute-002.html]
|
|
||||||
[.flexbox 5]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[.flexbox 8]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[.flexbox 9]
|
|
||||||
expected: FAIL
|
|
|
@ -1,15 +0,0 @@
|
||||||
[align-content-horiz-001a.html]
|
|
||||||
[.flexbox div 4]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[.flexbox div 7]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[.flexbox div 6]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[.flexbox div 3]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[.flexbox div 8]
|
|
||||||
expected: FAIL
|
|
|
@ -1,15 +0,0 @@
|
||||||
[align-content-horiz-001b.html]
|
|
||||||
[.flexbox div 4]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[.flexbox div 7]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[.flexbox div 6]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[.flexbox div 3]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[.flexbox div 8]
|
|
||||||
expected: FAIL
|
|
|
@ -1,15 +0,0 @@
|
||||||
[align-content-horiz-002.html]
|
|
||||||
[.flexbox div 4]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[.flexbox div 7]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[.flexbox div 6]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[.flexbox div 3]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[.flexbox div 8]
|
|
||||||
expected: FAIL
|
|
|
@ -1,15 +0,0 @@
|
||||||
[align-content-vert-001a.html]
|
|
||||||
[.flexbox div 4]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[.flexbox div 7]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[.flexbox div 6]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[.flexbox div 3]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[.flexbox div 8]
|
|
||||||
expected: FAIL
|
|
|
@ -1,15 +0,0 @@
|
||||||
[align-content-vert-001b.html]
|
|
||||||
[.flexbox div 4]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[.flexbox div 7]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[.flexbox div 6]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[.flexbox div 3]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[.flexbox div 8]
|
|
||||||
expected: FAIL
|
|
|
@ -1,15 +0,0 @@
|
||||||
[align-content-vert-002.html]
|
|
||||||
[.flexbox div 4]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[.flexbox div 7]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[.flexbox div 6]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[.flexbox div 3]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[.flexbox div 8]
|
|
||||||
expected: FAIL
|
|
|
@ -1,7 +1,4 @@
|
||||||
[align-content-wrap-003.html]
|
[align-content-wrap-003.html]
|
||||||
[.flexbox 1]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[.flexbox 33]
|
[.flexbox 33]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
[columns-height-set-via-top-bottom.html]
|
|
||||||
[.flexbox 2]
|
|
||||||
expected: FAIL
|
|
|
@ -1,2 +0,0 @@
|
||||||
[dynamic-change-simplified-layout.html]
|
|
||||||
expected: FAIL
|
|
|
@ -1,2 +0,0 @@
|
||||||
[multi-line-wrap-reverse-column-reverse.html]
|
|
||||||
expected: FAIL
|
|
|
@ -1,2 +0,0 @@
|
||||||
[multi-line-wrap-with-column-reverse.html]
|
|
||||||
expected: FAIL
|
|
|
@ -1,2 +0,0 @@
|
||||||
[flexbox-align-self-stretch-vert-002.html]
|
|
||||||
expected: FAIL
|
|
|
@ -1,2 +0,0 @@
|
||||||
[flexbox-break-request-horiz-001a.html]
|
|
||||||
expected: FAIL
|
|
|
@ -1,2 +0,0 @@
|
||||||
[flexbox-break-request-horiz-001b.html]
|
|
||||||
expected: FAIL
|
|
|
@ -1,2 +0,0 @@
|
||||||
[flexbox-break-request-vert-001a.html]
|
|
||||||
expected: FAIL
|
|
|
@ -1,2 +0,0 @@
|
||||||
[flexbox-break-request-vert-001b.html]
|
|
||||||
expected: FAIL
|
|
|
@ -1,2 +0,0 @@
|
||||||
[flexbox-flex-wrap-horiz-001.html]
|
|
||||||
expected: FAIL
|
|
|
@ -1,2 +0,0 @@
|
||||||
[flexbox-flex-wrap-horiz-002.html]
|
|
||||||
expected: FAIL
|
|
|
@ -1,2 +0,0 @@
|
||||||
[flexbox-flex-wrap-vert-001.html]
|
|
||||||
expected: FAIL
|
|
|
@ -1,3 +0,0 @@
|
||||||
[flexbox-lines-must-be-stretched-by-default.html]
|
|
||||||
[.flex-container 1]
|
|
||||||
expected: FAIL
|
|
|
@ -1,4 +0,0 @@
|
||||||
[flexbox_width-wrapping-column.html]
|
|
||||||
[.flexbox 1]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue