1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 20:28:11 +00:00
serenity/Tests/LibWeb
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
..
Layout LibWeb: Let parent formatting context determine size of flex containers 2024-01-10 16:28:12 +01:00
Ref LibWeb: Add ref-test cases for reordered keywords in CSS positions 2024-01-09 13:37:35 +00:00
Text LibWeb: Add missing CSS Transforms Module Level 2 functions 2024-01-10 09:48:25 +01:00
WPT WPT: Update metadata for current WPT master and ladybird results 2023-10-24 01:43:31 +02:00
CMakeLists.txt LibWeb: Add test for week_number_of_the_last_day microsyntax 2023-12-11 14:04:27 -07:00
rebaseline-libweb-test Tests/LibWeb: Update rebaseline-libweb-test for path changes 2023-06-10 21:46:33 +02:00
TestConfig.ini LibWeb: Skip window-scrollTo test that keeps timing out on macOS 2023-12-29 17:03:51 +01:00
TestCSSIDSpeed.cpp LibWeb: Make value_id_from_string() return Optional 2023-05-25 06:36:10 +02:00
TestCSSPixels.cpp LibWeb: Remove rounding division for CSSPixels 2024-01-06 21:40:27 +01:00
TestHTMLTokenizer.cpp Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
TestMicrosyntax.cpp LibWeb: Add test for week_number_of_the_last_day microsyntax 2023-12-11 14:04:27 -07:00
TestMimeSniff.cpp LibWeb: Add rules for distinguishing if a resource is text or binary 2024-01-04 12:25:38 -07:00
TestNumbers.cpp LibWeb: Implement spec-compliant integer parsing 2023-08-24 22:26:53 +01:00
tokenizer-test.html LibWeb: Fix assertion failure when tokenizing JS regex literals 2021-07-15 01:47:22 +02:00