1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:38:11 +00:00
serenity/Tests/LibWeb/Layout/expected/flex
Andreas Kling 5af02a914c LibWeb: Let parent formatting context determine size of flex containers
Until now, we had implemented flex container sizing by awkwardly doing
exactly what the spec said (basically having FFC size the container)
despite that not really making sense in the big picture. (Parent
formatting contexts should be responsible for sizing and placing their
children)

This patch moves us away from the Flexbox spec text a little bit, by
removing the logic for sizing the flex container in FFC, and instead
making sure that all formatting contexts can set both width and height
of flex container children.

This required changes in BFC and IFC, but it's actually quite simple!
Width was already not a problem, and it turns out height isn't either,
since the automatic height of a flex container is max-content.
With this in mind, we can simply determine the height of flex containers
before transferring control to FFC, and everything flows nicely.

With this change, we can remove all the virtuals and FFC logic for
negotiating container size with the parent formatting context.
We also don't need the "available space for flex container" stuff
anymore either, so that's gone as well.

There are some minor diffs in layout test results from this, but the
new results actually match other browsers more closely, so that's fine.

This should make flex layout, and indeed layout in general, easier to
understand, since this was the main weird special case outside of
BFC/IFC where a formatting context delegates work to its parent instead
of the other way around. :^)
2024-01-10 16:28:12 +01:00
..
abspos-flex-child-static-position-with-align-items.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
abspos-flex-child-static-position-with-justify-content.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
abspos-flex-child-static-position-with-padding-on-flex-container.txt LibWeb: Don't offset abspos children of flex container by padding twice 2023-10-08 09:06:30 +02:00
abspos-flex-child-with-auto-height.txt LibWeb: Handle case where abspos flex child position depends on height 2023-09-03 15:44:47 +02:00
align-items-normal.txt LibWeb: Make align-items: normal behave like stretch on flex items 2023-08-20 19:37:50 +02:00
align-keywords-start-and-end.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
align-self-end-crash.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
automatic-minimum-size-with-explicit-flex-basis-and-flex-container-with-max-content-main-size.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
box-baseline-with-inline-flex-empty-child.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
br-element-does-not-get-blockified-by-itself.txt LibWeb: Consolidate consecutive inlines in a single anonymous flex item 2023-09-01 12:45:38 +02:00
calc-flex-basis.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
columns-33-percent-width.txt LibWeb: Forbid using CSS::Length as reference value in resolved() 2024-01-07 09:03:57 +01:00
cross-size-of-item-with-box-sizing-border-box-and-nonzero-padding.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
flex-column-container-with-max-width-max-content.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
flex-column-item-with-intrinsic-aspect-ratio-and-percentage-max-width.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
flex-column-item-with-natural-aspect-ratio-and-automatic-cross-size.txt LibWeb: Support transforms, stroking, gradients, etc for SVG <text> 2023-11-05 02:46:46 +01:00
flex-column-item-with-percentage-max-width.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
flex-container-intrinsic-cross-size-with-max-content-main-size.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
flex-container-with-max-width-and-negative-margin-in-same-axis.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
flex-gap-between-items-and-lines.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
flex-item-min-width-fit-content.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
flex-item-with-calc-main-size-and-layout-dependent-containing-block-size.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
flex-item-with-intrinsic-aspect-ratio-and-max-height.txt LibWeb: Let parent formatting context determine size of flex containers 2024-01-10 16:28:12 +01:00
flex-row-reverse-with-centered-content.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
flex-shorthand-flex-basis-zero-percent.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
inf-available-space-with-auto-margins.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
inline-flex-with-main-axis-margin-on-flex-container.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
intrinsic-height-of-column-items-with-different-kinds-of-width.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
intrinsic-height-of-flex-container-with-svg-item-that-only-has-natural-aspect-ratio.txt LibWeb: Support transforms, stroking, gradients, etc for SVG <text> 2023-11-05 02:46:46 +01:00
justify-content-1.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
justify-content-space-between-single-item.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
justify-content-with-margin-auto-child.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
list-container-display-contents.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
multi-line-column-container-with-automatic-height.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
percentage-flex-basis-with-indefinite-flex-container-size.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
relpos-flex-item.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
reverse-flex-layout-with-space-between-and-space-around.txt LibWeb: Remove rounding division for CSSPixels 2024-01-06 21:40:27 +01:00
reverse-with-justify-content-normal.txt LibWeb: Fix reverse flex layout with justify-content: normal 2024-01-08 14:42:19 +01:00
specified-size-suggestion-with-box-sizing-border-box.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
stretch-alignment-with-cross-gap.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00