1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 01:27:42 +00:00
serenity/Userland/Libraries/LibWeb
Andreas Kling 80ce0419b6 LibWeb: Fix abspos flex container with height:auto getting zero height
When laying out abspos boxes, we compute the height twice: before and
after the inside of the box has been laid out.

The first pass allows percentage vertical values inside the box to be
resolved against the box's height. The second pass resolves the final
used value for the height of the box itself.

In cases where the box height depends on the results of inside layout,
we were incorrectly setting the box to having a definite zero height.
This led to incorrect results when sizing an abspos flex container,
since the FFC sizes containers (in row layouts) based on whether the
container has a definite height.

To avoid this problem, this patch adds an enum so we can differentiate
between the two abspos height computation passes. If the first pass
discovers a dependency on the inside layout, we simply bail out of
computing the height, leaving it as indefinite. This allows the FFC
to size its container correctly, and the correct height gets set by
the second pass.
2023-01-06 21:12:55 +01:00
..
Bindings Everywhere: Remove unused includes of AK/StdLibExtras.h 2023-01-02 20:27:20 -05:00
Cookie LibIPC+Everywhere: Change IPC::encode's return type to ErrorOr 2023-01-04 11:49:15 +01:00
Crypto LibJS: Convert Heap::allocate{,_without_realm}() to NonnullGCPtr 2022-12-15 06:56:37 -05:00
CSS LibWeb: Use CSS Pixels for viewport rects 2023-01-05 17:42:31 +01:00
DOM LibWeb: Convert Layout Boxes to new pixel units 2023-01-05 17:42:31 +01:00
DOMParsing LibJS: Convert Heap::allocate{,_without_realm}() to NonnullGCPtr 2022-12-15 06:56:37 -05:00
Encoding LibJS: Convert Heap::allocate{,_without_realm}() to NonnullGCPtr 2022-12-15 06:56:37 -05:00
Fetch AK: Stop using DeprecatedString in Base64 encoding 2022-12-20 10:34:19 +01:00
FileAPI LibWeb: Verify optional argument has a value before static_cast-ing it 2023-01-06 20:51:21 +01:00
Geometry LibJS: Convert Heap::allocate{,_without_realm}() to NonnullGCPtr 2022-12-15 06:56:37 -05:00
HighResolutionTime Everywhere: Remove unused includes of AK/StdLibExtras.h 2023-01-02 20:27:20 -05:00
HTML LibWeb: Pass FloatRect to Painter::draw_text in fill_text 2023-01-05 15:47:40 -05:00
Infra LibJS: Replace standalone js_string() with PrimitiveString::create() 2022-12-07 16:43:06 +00:00
IntersectionObserver LibJS: Convert Heap::allocate{,_without_realm}() to NonnullGCPtr 2022-12-15 06:56:37 -05:00
Layout LibWeb: Fix abspos flex container with height:auto getting zero height 2023-01-06 21:12:55 +01:00
Loader LibWeb: Store cookies for every HTTP response 2022-12-30 21:56:54 -05:00
MimeSniff Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
NavigationTiming Everywhere: Remove unused includes of AK/StdLibExtras.h 2023-01-02 20:27:20 -05:00
Page LibWeb+WebContent: Convert BrowsingContext to new pixel units 2023-01-05 17:42:31 +01:00
Painting LibWeb: Return floats from color stop resolution functions 2023-01-05 19:56:43 +01:00
Platform LibWeb: Use default system fonts for serif, sans-serif, etc. 2023-01-06 12:02:21 +01:00
ReferrerPolicy LibWeb: Implement 'Determine request’s Referrer' AO 2022-10-30 20:10:29 +00:00
RequestIdleCallback Everywhere: Remove unused includes of AK/StdLibExtras.h 2023-01-02 20:27:20 -05:00
ResizeObserver LibJS: Convert Heap::allocate{,_without_realm}() to NonnullGCPtr 2022-12-15 06:56:37 -05:00
Scripts Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
SecureContexts Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
Selection LibJS: Convert Heap::allocate{,_without_realm}() to NonnullGCPtr 2022-12-15 06:56:37 -05:00
Streams LibJS: Convert Heap::allocate{,_without_realm}() to NonnullGCPtr 2022-12-15 06:56:37 -05:00
SVG LibWeb: Resolve Lengths to CSSPixels 2023-01-05 17:42:31 +01:00
Tests Everywhere: Rename WrapperGenerator to BindingsGenerator 2022-09-21 23:06:08 +01:00
UIEvents LibWeb: Support MouseEvent.{pageX,pageY} 2022-12-31 16:17:48 +01:00
URL LibJS: Convert Heap::allocate{,_without_realm}() to NonnullGCPtr 2022-12-15 06:56:37 -05:00
WebAssembly LibJS: Convert Object::construct() to NonnullGCPtr 2022-12-15 06:56:37 -05:00
WebDriver LibWeb+WebContent: Convert BrowsingContext to new pixel units 2023-01-05 17:42:31 +01:00
WebGL LibGL+LibWeb: Remove WebGL-specific API from GLContext 2022-12-25 15:48:59 +01:00
WebIDL LibJS: Convert Heap::allocate{,_without_realm}() to NonnullGCPtr 2022-12-15 06:56:37 -05:00
WebSockets LibJS: Convert Heap::allocate{,_without_realm}() to NonnullGCPtr 2022-12-15 06:56:37 -05:00
XHR LibJS: Convert Heap::allocate{,_without_realm}() to NonnullGCPtr 2022-12-15 06:56:37 -05:00
XML Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
CMakeLists.txt LibWeb: Add initial implementation of structured clone 2022-11-26 00:47:23 +01:00
Dump.cpp LibWeb: Convert Paintable coordinates to new pixel units 2022-12-14 16:47:57 +00:00
Dump.h LibWeb: Implement initial CSSFontFaceRule and FontFace classes 2022-03-28 22:25:25 +02:00
FontCache.cpp LibGfx: Move other font-related files to LibGfx/Font/ 2022-04-09 23:48:18 +02:00
FontCache.h AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
Forward.h LibWeb: Implement RadialGradientStyleValue 2022-11-30 14:24:04 +00:00
idl_files.cmake LibWeb: Sketch out basic support for SVG <foreignObject> elements 2022-11-16 13:01:21 +01:00
Namespace.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Namespace.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
PixelUnits.h LibWeb: Only allow DevicePixels operators to work with integers 2022-12-14 16:47:57 +00:00
TreeNode.h LibWeb: Make the layout tree GC-allocated 2022-10-20 15:16:23 +02:00