ladybird/Libraries/LibWeb/Layout
Andreas Kling 1bfcf49ffe LibWeb: Honor reversed axes for flex overflow
Scrollable overflow still assumed a top-left scroll origin and only
added trailing padding on the physical bottom edge. That broke
scrollWidth and scrollHeight for flex containers whose main or cross
axis was reversed by writing-mode, direction, flex-direction, or
wrap-reverse.

Teach flex layout to place wrapped lines using the computed cross-axis
direction and to measure scrollable overflow from the container's
actual scroll origin so reachable reversed overflow is preserved, the
unreachable side is clipped, and end padding is added on the correct
physical edge.

Keep per-item cross-axis placement using the existing behavior.
Applying full cross-axis reversal there regressed baseline alignment
tests, and zero-sized boxes exactly at the scroll origin must still
contribute descendant overflow, so the unreachable-overflow checks
need strict comparisons.

This makes negative-overflow-002 and negative-overflow-003 pass and
improves negative-overflow, align-content-wrap-003, and
overflow-with-padding.
2026-04-05 10:42:32 +02:00
..
AudioBox.cpp LibWeb: Use UA shadow DOM for media elements' controls 2026-02-23 07:27:31 +01:00
AudioBox.h LibWeb: Use UA shadow DOM for media elements' controls 2026-02-23 07:27:31 +01:00
AvailableSpace.cpp
AvailableSpace.h
BlockContainer.cpp LibWeb: Add missing type-isolating GC allocators for some types 2026-01-18 10:10:04 +01:00
BlockContainer.h LibWeb: Add missing type-isolating GC allocators for some types 2026-01-18 10:10:04 +01:00
BlockFormattingContext.cpp LibWeb: Use fragment extents for orthogonal inline widths 2026-04-05 00:03:22 +02:00
BlockFormattingContext.h LibWeb: Move standalone SVG document layout handling out of BFC 2026-03-31 10:49:15 +02:00
Box.cpp LibWeb/Layout: Don't inject natural size in prepare_for_replaced_layout 2026-02-02 14:36:49 +00:00
Box.h LibWeb/Layout: Don't inject natural size in prepare_for_replaced_layout 2026-02-02 14:36:49 +00:00
BreakNode.cpp LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
BreakNode.h Everywhere: Change west consts caught by clang-format-21 to east consts 2025-08-29 18:18:55 +01:00
CanvasBox.cpp LibWeb/Layout: Don't inject natural size in prepare_for_replaced_layout 2026-02-02 14:36:49 +00:00
CanvasBox.h LibWeb/Layout: Don't inject natural size in prepare_for_replaced_layout 2026-02-02 14:36:49 +00:00
CheckBox.cpp LibWeb: Separate the active element and the element being activated 2026-03-17 04:01:29 -05:00
CheckBox.h LibWeb: Separate the active element and the element being activated 2026-03-17 04:01:29 -05:00
DominantBaseline.h LibWeb: Implement dominant-baseline for SVG text 2026-02-26 09:23:23 +01:00
FieldSetBox.cpp LibWeb: Rework <fieldset> and <legend> rendering 2026-03-04 20:39:01 +01:00
FieldSetBox.h LibWeb: Rework <fieldset> and <legend> rendering 2026-03-04 20:39:01 +01:00
FlexFormattingContext.cpp LibWeb: Honor reversed axes for flex overflow 2026-04-05 10:42:32 +02:00
FlexFormattingContext.h LibWeb: Fix flex abspos static positions on reversed cross axes 2026-04-03 14:29:44 +02:00
FormattingContext.cpp LibWeb: Use fragment extents for orthogonal inline widths 2026-04-05 00:03:22 +02:00
FormattingContext.h LibWeb: Use fragment extents for orthogonal inline widths 2026-04-05 00:03:22 +02:00
GridFormattingContext.cpp LibWeb: Fix grid abspos descendant placement 2026-04-04 14:35:50 +02:00
GridFormattingContext.h LibWeb: Rerun row sizing for auto-height grids 2026-04-04 14:35:50 +02:00
ImageBox.cpp LibWeb/Layout: Don't inject natural size in prepare_for_replaced_layout 2026-02-02 14:36:49 +00:00
ImageBox.h LibWeb/Layout: Don't inject natural size in prepare_for_replaced_layout 2026-02-02 14:36:49 +00:00
ImageProvider.cpp Everywhere: Avoid large rebuilds when editing (Immutable)Bitmap headers 2025-11-28 18:32:48 +01:00
ImageProvider.h LibWeb: Add ImageProvider virtual to access the DecodedImageData 2025-11-05 09:11:49 +01:00
InlineFormattingContext.cpp LibWeb: Apply text-overflow ellipsis as line box post-processing 2026-03-26 00:19:50 +00:00
InlineFormattingContext.h LibWeb: Apply text-overflow ellipsis as line box post-processing 2026-03-26 00:19:50 +00:00
InlineLevelIterator.cpp LibWeb: Make every HTMLElement potentially form-associated 2026-03-25 13:18:15 +00:00
InlineLevelIterator.h LibWeb: Implement word-break functionality using UAX#14 line breaking 2026-02-14 16:23:18 -05:00
InlineNode.cpp LibWeb: Split PaintableWithLines from PaintableBox 2026-01-12 11:00:14 +00:00
InlineNode.h LibWeb: Add fast_is<T> optimization for Layout::InlineNode 2025-09-22 15:00:50 +02:00
LayoutState.cpp LibWeb: Honor reversed axes for flex overflow 2026-04-05 10:42:32 +02:00
LayoutState.h LibWeb: Implement CSS anchor positioning 2026-04-01 19:41:46 +01:00
LegendBox.cpp LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
LegendBox.h LibWeb: Remove Document.h include from Layout/Node.h 2026-02-08 18:51:13 +01:00
LineBox.cpp LibWeb/Layout: Use is_empty() when fragment text has nothing to trim 2026-03-31 13:48:50 +01:00
LineBox.h LibWeb: Make fragment start/length size_t instead of int 2025-06-13 15:08:26 +02:00
LineBoxFragment.cpp LibWeb: Store correct text offsets in PaintableFragment 2025-09-12 15:34:09 -04:00
LineBoxFragment.h LibWeb: Keep track of trailing whitespace for wrapped lines 2026-02-06 10:47:50 +00:00
LineBuilder.cpp LibWeb: Keep track of trailing whitespace for wrapped lines 2026-02-06 10:47:50 +00:00
LineBuilder.h LibWeb: Keep track of trailing whitespace for wrapped lines 2026-02-06 10:47:50 +00:00
ListItemBox.cpp LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
ListItemBox.h Meta: Enforce newlines around namespaces 2025-05-14 02:01:59 -06:00
ListItemMarkerBox.cpp LibWeb: Make CounterStyle ref counted 2026-02-27 16:25:53 +00:00
ListItemMarkerBox.h LibWeb: Make CounterStyle ref counted 2026-02-27 16:25:53 +00:00
NavigableContainerViewport.cpp LibWeb/Layout: Don't inject natural size in prepare_for_replaced_layout 2026-02-02 14:36:49 +00:00
NavigableContainerViewport.h LibWeb/Layout: Don't inject natural size in prepare_for_replaced_layout 2026-02-02 14:36:49 +00:00
Node.cpp LibWeb: Implement CSS anchor positioning 2026-04-01 19:41:46 +01:00
Node.h LibWeb: Update/remove unused includes 2026-04-01 19:41:46 +01:00
RadioButton.cpp LibWeb: Separate the active element and the element being activated 2026-03-17 04:01:29 -05:00
RadioButton.h LibWeb: Separate the active element and the element being activated 2026-03-17 04:01:29 -05:00
ReplacedBox.cpp LibWeb: Allow Layout::ImageBox to be anonymous 2025-07-28 22:46:27 +02:00
ReplacedBox.h LibWeb/Layout: Don't inject natural size in prepare_for_replaced_layout 2026-02-02 14:36:49 +00:00
ReplacedWithChildrenFormattingContext.cpp LibWeb: Allow replaced elements to host children 2026-02-23 07:27:31 +01:00
ReplacedWithChildrenFormattingContext.h LibWeb: Allow replaced elements to host children 2026-02-23 07:27:31 +01:00
SVGBox.cpp LibGC: Enforce that a Cell type must declare the allocator to use 2026-01-20 12:00:11 +01:00
SVGBox.h LibGC: Enforce that a Cell type must declare the allocator to use 2026-01-20 12:00:11 +01:00
SVGClipBox.cpp LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
SVGClipBox.h LibWeb: Add fast_is<T> for hotly dynamic_cast'ed things on imdb.com 2025-09-25 21:42:52 +02:00
SVGForeignObjectBox.cpp LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
SVGForeignObjectBox.h LibWeb: Make SVG foreignObject establish a new stacking context 2025-07-09 14:36:08 +02:00
SVGFormattingContext.cpp LibWeb: Move standalone SVG document layout handling out of BFC 2026-03-31 10:49:15 +02:00
SVGFormattingContext.h LibWeb: Compute SVG mask/clip transforms using layout tree hierarchy 2026-02-05 09:00:56 +01:00
SVGGeometryBox.cpp LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
SVGGeometryBox.h LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
SVGGraphicsBox.cpp LibGC: Enforce that a Cell type must declare the allocator to use 2026-01-20 12:00:11 +01:00
SVGGraphicsBox.h LibGC: Enforce that a Cell type must declare the allocator to use 2026-01-20 12:00:11 +01:00
SVGImageBox.cpp LibGC: Enforce that a Cell type must declare the allocator to use 2026-01-20 12:00:11 +01:00
SVGImageBox.h LibGC: Enforce that a Cell type must declare the allocator to use 2026-01-20 12:00:11 +01:00
SVGMaskBox.cpp LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
SVGMaskBox.h AK+Everywhere: Rename verify_cast to as 2025-01-21 11:34:06 -05:00
SVGPatternBox.cpp LibWeb: Implement SVGPatternElement 2026-02-27 17:14:50 +01:00
SVGPatternBox.h LibWeb: Implement SVGPatternElement 2026-02-27 17:14:50 +01:00
SVGSVGBox.cpp LibWeb/Layout: Don't inject natural size in prepare_for_replaced_layout 2026-02-02 14:36:49 +00:00
SVGSVGBox.h LibWeb/Layout: Don't inject natural size in prepare_for_replaced_layout 2026-02-02 14:36:49 +00:00
SVGTextBox.cpp LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
SVGTextBox.h LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
SVGTextPathBox.cpp LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
SVGTextPathBox.h LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
TableFormattingContext.cpp LibWeb: Compute CAPMIN from caption outer widths 2026-03-29 12:05:25 +02:00
TableFormattingContext.h LibWeb: Restrict throwaway layout states to their subtree 2026-02-27 19:11:41 +01:00
TableGrid.cpp LibWeb: Use unsafe layout/paintable accessors where appropriate 2026-02-26 21:09:08 +01:00
TableGrid.h LibWeb: Avoid having the same code in two files 2025-12-24 14:10:27 +01:00
TableWrapper.cpp LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
TableWrapper.h LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
TextAreaBox.cpp LibWeb: Implement auto_content_box_size for textarea and input 2026-02-02 14:36:49 +00:00
TextAreaBox.h LibWeb: Implement auto_content_box_size for textarea and input 2026-02-02 14:36:49 +00:00
TextInputBox.cpp LibWeb: Implement auto_content_box_size for textarea and input 2026-02-02 14:36:49 +00:00
TextInputBox.h LibWeb: Implement auto_content_box_size for textarea and input 2026-02-02 14:36:49 +00:00
TextNode.cpp LibWeb: Reinitialize TextNode chunk state after collapsing whitespace 2026-03-09 15:34:34 +01:00
TextNode.h LibWeb: Implement word-break functionality using UAX#14 line breaking 2026-02-14 16:23:18 -05:00
TreeBuilder.cpp LibWeb: Replace is<T> + as<T> with as_if<T> 2026-03-10 15:17:51 +01:00
TreeBuilder.h LibWeb: Hoist fieldset contents into anonymous wrapper 2026-03-04 20:39:01 +01:00
VideoBox.cpp LibWeb: Remove ViewportClient from ImagePaintable and VideoBox 2026-02-26 09:25:25 +01:00
VideoBox.h LibWeb: Remove ViewportClient from ImagePaintable and VideoBox 2026-02-26 09:25:25 +01:00
Viewport.cpp LibWeb: Remove Document.h include from Layout/Viewport.h 2026-02-08 18:51:13 +01:00
Viewport.h LibWeb: Remove Document.h include from Layout/Viewport.h 2026-02-08 18:51:13 +01:00