diff options
author | Martin Robinson <mrobinson@igalia.com> | 2025-03-25 10:41:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-25 09:41:59 +0000 |
commit | b4a768cfc7c4c4fdef5c6454aeb4a124f303d40d (patch) | |
tree | 6148d1e2cda20aa30cd8877b25591a87e7de81fb /tests/wpt | |
parent | b79a79458dcbd9e199c7ac3be649b3586fda80c7 (diff) | |
download | servo-b4a768cfc7c4c4fdef5c6454aeb4a124f303d40d.tar.gz servo-b4a768cfc7c4c4fdef5c6454aeb4a124f303d40d.zip |
layout: Ensure compatible positioning context during flexbox block content sizing calculation (#36123)
Sometimes column Flexbox needs to do an early layout pass to determine
the preferred block content size of flex items. Previously the
absolutely positioned children created during this pass were discarded,
but now they are cached to be possibly used during the final layout
phase of the flex item. Since they are not thrown away, it is necessary
that the `PositioningContext` used to collect them is compatible with
their final `PositioningContext`.
Fixes #36121.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Diffstat (limited to 'tests/wpt')
-rw-r--r-- | tests/wpt/meta/MANIFEST.json | 7 | ||||
-rw-r--r-- | tests/wpt/tests/css/css-flexbox/mixed-containing-blocks-crash.html | 13 |
2 files changed, 20 insertions, 0 deletions
diff --git a/tests/wpt/meta/MANIFEST.json b/tests/wpt/meta/MANIFEST.json index 117f1af832b..522021d0a9c 100644 --- a/tests/wpt/meta/MANIFEST.json +++ b/tests/wpt/meta/MANIFEST.json @@ -2599,6 +2599,13 @@ {} ] ], + "mixed-containing-blocks-crash.html": [ + "f8a38e057d32e8bb8d7e143d867ca6364210ba38", + [ + null, + {} + ] + ], "negative-available-size-crash.html": [ "837fdaeba9ef8baeb4f2bad281bb13551d6d8ff9", [ diff --git a/tests/wpt/tests/css/css-flexbox/mixed-containing-blocks-crash.html b/tests/wpt/tests/css/css-flexbox/mixed-containing-blocks-crash.html new file mode 100644 index 00000000000..f8a38e057d3 --- /dev/null +++ b/tests/wpt/tests/css/css-flexbox/mixed-containing-blocks-crash.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<title>CSS Flexbox: Mixed containing blocks</title> + +<link rel="help" href="https://drafts.csswg.org/css-flexbox"> +<link rel="help" href="https://github.com/servo/servo/issues/36121"> +<meta name="assert" content="This test ensures that flex boxes that establish a containing block for fixed position descendants do not cause a crash when combined with flex items that establish a containing block for absolutely positioned descendants."> + +<html> + <div class="box" style="display: flex; flex-direction: column; transform: translateX(1px)"> + <div style="position: relative;"><div>Three</div><div style="position: absolute">fixed</div></div> + </div> +</div> + |