layout: Reverse space-between alignment properly for absolute children of flex containers (#33406)

When aligning with `space-between` the space should be allocated on the
`flex-end` side of the container ie it should be mapped to `flex-start`
(`start` and reversing if necssary).

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
Martin Robinson 2024-09-11 10:51:56 -07:00 committed by GitHub
parent 68246df89e
commit ed5dc43f16
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 16 deletions

View file

@ -892,6 +892,8 @@ impl FlexContainer {
AlignFlags::END | AlignFlags::SAFE
},
(AlignFlags::STRETCH, false) => AlignFlags::START | AlignFlags::SAFE,
(AlignFlags::SPACE_BETWEEN, false) => AlignFlags::START | AlignFlags::SAFE,
(AlignFlags::SPACE_BETWEEN, true) => AlignFlags::END | AlignFlags::SAFE,
_ => value,
};
let cross = make_flex_only_values_directional_for_absolutes(

View file

@ -1,10 +1,4 @@
[position-absolute-001.html]
[.flexbox 39]
expected: FAIL
[.flexbox 34]
expected: FAIL
[.flexbox 89]
expected: FAIL
@ -80,9 +74,6 @@
[.flexbox 118]
expected: FAIL
[.flexbox 119]
expected: FAIL
[.flexbox 70]
expected: FAIL
@ -185,9 +176,6 @@
[.flexbox 55]
expected: FAIL
[.flexbox 24]
expected: FAIL
[.flexbox 120]
expected: FAIL
@ -197,9 +185,6 @@
[.flexbox 71]
expected: FAIL
[.flexbox 29]
expected: FAIL
[.flexbox 47]
expected: FAIL
@ -212,5 +197,8 @@
[.flexbox 76]
expected: FAIL
[.flexbox 109]
[.flexbox 69]
expected: FAIL
[.flexbox 74]
expected: FAIL