ladybird/Libraries/LibWeb/Layout
Jelle Raaijmakers 002e79a658 LibWeb: Exclude trailing whitespace from line width when placing floats
When generating line boxes, we place floats simultaneously with the
other items on the same line. The CSS text spec requires us to trim the
whitespace at the end of each line, but we only did so after laying out
all the line boxes.

This changes the way we calculate the current line box width for floats
by subtracting the amount of pixels that the current trailing whitespace
is using.

Fixes #4050.
2025-03-26 19:35:38 +00:00
..
AudioBox.cpp LibWeb: Hide audio element when controls is not set 2025-01-04 11:47:09 +00:00
AudioBox.h LibWeb: Hide audio element when controls is not set 2025-01-04 11:47:09 +00: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: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
BlockContainer.h LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
BlockFormattingContext.cpp LibWeb: Correctly calculate static position rect when absolutely 2025-03-17 15:55:06 +01:00
BlockFormattingContext.h LibWeb: Replace 1px iteration in y_for_float_to_be_inserted_here() 2025-03-26 13:51:11 +00:00
Box.cpp LibWeb: Cache "has size containment" flag in Layout::Box 2025-03-26 17:52:02 +00:00
Box.h LibWeb: Cache "has size containment" flag in Layout::Box 2025-03-26 17:52:02 +00:00
BreakNode.cpp LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
BreakNode.h AK+Everywhere: Rename verify_cast to as 2025-01-21 11:34:06 -05:00
CanvasBox.cpp LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
CanvasBox.h LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
CheckBox.cpp LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
CheckBox.h LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
FieldSetBox.cpp Meta: Disallow links to single-page HTML spec 2025-02-05 16:04:50 -07:00
FieldSetBox.h LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
FlexFormattingContext.cpp LibWeb: Correctly calculate static position rect when absolutely 2025-03-17 15:55:06 +01:00
FlexFormattingContext.h LibWeb: Use cached UsedValues pointer in FlexFormattingContext more 2025-02-12 00:39:36 +01:00
FormAssociatedLabelableNode.h LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
FormattingContext.cpp LibWeb: Delete parent state pointer in LayoutState 2025-03-26 12:08:09 +00:00
FormattingContext.h LibWeb: Resolve "height: auto" using preferred aspect ratio if possible 2025-03-15 13:51:16 +01:00
GridFormattingContext.cpp LibWeb: Don't assume length-percentage is always a length [GFC] 2025-03-24 18:59:21 +01:00
GridFormattingContext.h LibWeb: Delete const from GridDimension function parameters in GFC 2025-03-21 15:19:39 +01:00
ImageBox.cpp AK+Everywhere: Rename verify_cast to as 2025-01-21 11:34:06 -05:00
ImageBox.h LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
ImageProvider.cpp Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
ImageProvider.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
InlineFormattingContext.cpp LibWeb: Correctly calculate static position rect when absolutely 2025-03-17 15:55:06 +01:00
InlineFormattingContext.h Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
InlineLevelIterator.cpp LibWeb: Resolve used vertical margins on inline elements 2025-02-22 20:02:16 +01:00
InlineLevelIterator.h LibWeb: Layout/Shape font-variant-* css properties 2024-12-17 19:07:13 +01:00
InlineNode.cpp LibWeb: Support inserting non-inline elements into inline elements 2025-01-23 09:33:10 +01:00
InlineNode.h LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
Label.cpp AK+Everywhere: Rename verify_cast to as 2025-01-21 11:34:06 -05:00
Label.h LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
LabelableNode.cpp Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
LabelableNode.h LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
LayoutState.cpp LibWeb: Delete parent state pointer in LayoutState 2025-03-26 12:08:09 +00:00
LayoutState.h LibWeb: Delete parent state pointer in LayoutState 2025-03-26 12:08:09 +00:00
LegendBox.cpp LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
LegendBox.h LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
LineBox.cpp LibWeb: Exclude trailing whitespace from line width when placing floats 2025-03-26 19:35:38 +00:00
LineBox.h LibWeb: Exclude trailing whitespace from line width when placing floats 2025-03-26 19:35:38 +00:00
LineBoxFragment.cpp AK+Everywhere: Rename verify_cast to as 2025-01-21 11:34:06 -05:00
LineBoxFragment.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
LineBuilder.cpp LibWeb: Exclude trailing whitespace from line width when placing floats 2025-03-26 19:35:38 +00:00
LineBuilder.h Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
ListItemBox.cpp LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
ListItemBox.h LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
ListItemMarkerBox.cpp LibWeb: Support reversed ordered lists 2025-02-21 04:23:28 +00:00
ListItemMarkerBox.h LibWeb: Support reversed ordered lists 2025-02-21 04:23:28 +00:00
NavigableContainerViewport.cpp LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
NavigableContainerViewport.h AK+Everywhere: Rename verify_cast to as 2025-01-21 11:34:06 -05:00
Node.cpp LibWeb: Generate an enum for generated pseudo-elements 2025-03-24 09:49:50 +00:00
Node.h LibWeb: Generate an enum for generated pseudo-elements 2025-03-24 09:49:50 +00:00
RadioButton.cpp LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
RadioButton.h LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
ReplacedBox.cpp LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
ReplacedBox.h AK+Everywhere: Rename verify_cast to as 2025-01-21 11:34:06 -05:00
SVGBox.cpp LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
SVGBox.h AK+Everywhere: Rename verify_cast to as 2025-01-21 11:34:06 -05:00
SVGClipBox.cpp LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
SVGClipBox.h AK+Everywhere: Rename verify_cast to as 2025-01-21 11:34:06 -05:00
SVGForeignObjectBox.cpp LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
SVGForeignObjectBox.h LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
SVGFormattingContext.cpp LibWeb: Fix layout mode propagation in SVGFormattingContext 2025-03-09 18:40:37 +01:00
SVGFormattingContext.h LibGfx: Delete DeprecatedPath 2024-11-25 21:13:53 +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 LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
SVGGraphicsBox.h AK+Everywhere: Rename verify_cast to as 2025-01-21 11:34:06 -05:00
SVGImageBox.cpp LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
SVGImageBox.h LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +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
SVGSVGBox.cpp LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
SVGSVGBox.h AK+Everywhere: Rename verify_cast to as 2025-01-21 11:34:06 -05: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: Correctly calculate static position rect when absolutely 2025-03-17 15:55:06 +01:00
TableFormattingContext.h AK+Everywhere: Rename verify_cast to as 2025-01-21 11:34:06 -05:00
TableGrid.cpp LibWeb: Handle interleaved table-row and table-row-group boxes 2025-02-26 13:50:01 +01:00
TableGrid.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +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
TextNode.cpp LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
TextNode.h LibWeb: Reduce number of recompiled files for display list headers 2025-02-23 10:14:39 -05:00
TreeBuilder.cpp LibWeb: Generate an enum for generated pseudo-elements 2025-03-24 09:49:50 +00:00
TreeBuilder.h LibWeb/CSS: Move and rename PseudoElement types to prep for code gen 2025-03-24 09:49:50 +00:00
VideoBox.cpp LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
VideoBox.h LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
Viewport.cpp LibWeb: Exclude inert elements from find in page queries 2025-02-21 12:41:57 +00:00
Viewport.h LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00