1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:28:11 +00:00
serenity/Userland/Libraries/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
..
Animations LibWeb: Add input element valueAsDate property 2024-01-06 09:59:30 -07:00
ARIA Everywhere: Use to_number<T> instead of to_{int,uint,float,double} 2023-12-23 20:41:07 +01:00
Bindings LibWeb: Let supported_property_names() return Vector<FlyString> 2023-12-24 22:49:19 +01:00
Clipboard LibWeb: Make HTML::Window::page() return a Page& 2023-12-15 22:04:46 +01:00
Cookie LibWeb: Fail to parse cookie date when date does not exist 2024-01-07 08:01:58 -05:00
Crypto LibJS+LibWeb: Implement resizable ArrayBuffer support for TypedArray 2023-12-26 11:16:10 +01:00
CSS LibWeb: Add missing CSS Transforms Module Level 2 functions 2024-01-10 09:48:25 +01:00
DOM LibWeb: Improve media document styling to center image 2024-01-07 10:16:24 +01:00
DOMParsing
Encoding
Fetch LibWeb: Honor User-Agent spoofing in Fetch headers 2023-12-27 11:43:14 +01:00
FileAPI LibJS+LibWeb: Add missing JS_DEFINE_ALLOCATOR() for a bunch of classes 2023-12-23 23:02:10 +01:00
Geometry LibWeb: Add DOMMatrix string constructor and set matrix value 2024-01-07 13:15:53 +01:00
HighResolutionTime
HTML LibWeb: Remove refusing to run script debug line 2024-01-10 09:38:41 +01:00
Infra LibWeb: Don't crash on FormData.append() with emoji in name 2023-12-04 00:04:04 +01:00
Internals LibWeb: Support obsolete but required -webkit- CSS parsing quirk 2023-12-11 16:54:59 +01:00
IntersectionObserver
Layout LibWeb: Let parent formatting context determine size of flex containers 2024-01-10 16:28:12 +01:00
Loader LibWeb: Ignore preconnect requests for file: and data: URLs 2023-12-30 13:49:50 +01:00
MathML
MimeSniff LibWeb: Add rules for distinguishing if a resource is text or binary 2024-01-04 12:25:38 -07:00
NavigationTiming
Page LibWeb: Refactor unsigned to u32 in WebContentServer.ipc 2024-01-10 09:38:41 +01:00
Painting LibWeb: Fix drawing axis-aligned lines 2024-01-09 00:03:09 +01:00
PerformanceTimeline
PermissionsPolicy
Platform Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
ReferrerPolicy
RequestIdleCallback
ResizeObserver
SecureContexts
Selection
SRI
Streams LibWeb: Port TypeError in UnderlyingSource from ByteString 2024-01-02 10:01:26 +01:00
SVG LibWeb: Use FlyString where possible in NamedNodeMap 2024-01-03 10:13:47 +01:00
UIEvents Kernel+Userland: Implement support for PS2 scan code set 2 2024-01-04 10:38:03 -07:00
URL Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
UserTiming
WebAssembly LibJS+LibWeb: Implement resizable ArrayBuffer support for TypedArray 2023-12-26 11:16:10 +01:00
WebAudio
WebDriver Everywhere: Use to_number<T> instead of to_{int,uint,float,double} 2023-12-23 20:41:07 +01:00
WebGL Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
WebIDL LibWeb/WebIDL: Implement ConvertToInt and IntegerPart AOs 2024-01-02 10:01:26 +01:00
WebSockets Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
Worker LibWeb+WebWorker: Convert Workers to use MessagePorts for postMessage 2023-12-25 12:09:11 +01:00
XHR Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
XLink
XML Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
CMakeLists.txt LibWeb: Implement SVGAnimatedString 2023-12-30 18:50:29 +01:00
Dump.cpp LibWeb: Wrap PseudoElements stored in SimpleSelector in a class 2023-12-11 16:54:59 +01:00
Dump.h
Forward.h LibWeb: Make resolution calculable 2023-12-30 20:11:24 +01:00
idl_files.cmake LibWeb: Implement SVGAnimatedString 2023-12-30 18:50:29 +01:00
Namespace.cpp
Namespace.h
PixelUnits.cpp LibWeb: Refactor int types in WebContentServer to DevicePixels 2023-12-15 17:01:16 +01:00
PixelUnits.h LibWeb: Remove rounding division for CSSPixels 2024-01-06 21:40:27 +01:00
TreeNode.h