ladybird/Libraries/LibWeb/Layout
Aliaksandr Kalenik cd6672eee0 LibWeb: Fix min-content collapsing to 0 with min-width: 0 descendant
During intrinsic sizing, compute_width() ran on block descendants with
an intrinsic-sizing available space. For a non-FC-establishing block
with auto width, used_width stayed auto, and the min-width clamp then
compared AvailableSize::min-content against min-width via operator<,
which always returns true when the left side is min-content. The clamp
fired with min-width: 0 and set content_width to 0 permanently.

Skip the min-width clamp when used_width is still auto, mirroring the
max-width clamp a few lines above which already no-ops via
to_px_or_zero. The real width is then set by the IntrinsicSizing branch
in layout_block_level_children.
2026-04-24 19:08:28 +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 Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
AvailableSpace.h Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
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: Fix min-content collapsing to 0 with min-width: 0 descendant 2026-04-24 19:08:28 +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: Deduplicate gap_to_px 2026-04-09 08:33:40 -04:00
FlexFormattingContext.h LibWeb: Fix flex abspos static positions on reversed cross axes 2026-04-03 14:29:44 +02:00
FormattingContext.cpp LibWeb: Deduplicate gap_to_px 2026-04-09 08:33:40 -04:00
FormattingContext.h LibWeb: Deduplicate gap_to_px 2026-04-09 08:33:40 -04:00
GridFormattingContext.cpp LibWeb: Clamp limited grid item contributions by fixed max tracks 2026-04-23 09:23:02 +01:00
GridFormattingContext.h LibWeb: Clamp limited grid item contributions by fixed max tracks 2026-04-23 09:23:02 +01: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: Mark ellipsized fragments as hidden rather than removing them 2026-04-17 08:03:26 +02: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: Mark ellipsized fragments as hidden rather than removing them 2026-04-17 08:03:26 +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: Mark ellipsized fragments as hidden rather than removing them 2026-04-17 08:03:26 +02:00
LineBuilder.cpp LibWeb: Apply calculated vertical-align offsets in LineBuilder 2026-04-15 21:49:40 +02: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 @counter-style tree-scoped 2026-04-15 11:07:38 +01: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: Make @counter-style tree-scoped 2026-04-15 11:07:38 +01:00
Node.h LibWeb: Add method to get style scope from layout node 2026-04-15 11:07:38 +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: Use caption content width for inline layout in table captions 2026-04-22 15:35:07 +01: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: Verify whitespace font has the glyph in font_for_space() 2026-04-22 20:27:41 +02:00
TextNode.h LibWeb: Verify whitespace font has the glyph in font_for_space() 2026-04-22 20:27:41 +02: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: Update video elements' natural dimensions during playback 2026-04-21 19:11:24 -05: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