ladybird/Userland/Libraries/LibWeb/Layout
Andreas Kling 1ebae7a779 LibWeb: Stop changing width of block-level flex containers during layout
If the parent BFC can come up with a nice stretch-fit width for the flex
container, it will have already done so *before* even entering flex
layout. There's no need to do it again, midway through the flex layout
algorithm.

This wasn't just unnecessary, but we were also doing it incorrectly and
not taking margins into account when calculating the amount of available
space for stretch-fit. This led to oversized flex containers in the
presence of negative margins.

Fixes #18614
2023-05-08 15:56:00 +02:00
..
AvailableSpace.cpp LibWeb: Convert FormattingContext to new pixel units 2023-01-05 17:42:31 +01:00
AvailableSpace.h LibWeb: Add default equality operators to Available{Space,Size} 2023-03-27 23:28:07 +02:00
BlockContainer.cpp LibWeb/Layout: Rename BlockContainer::paint{_box => able_with_lines}() 2023-04-20 20:43:30 +02:00
BlockContainer.h LibWeb/Layout: Rename BlockContainer::paint{_box => able_with_lines}() 2023-04-20 20:43:30 +02:00
BlockFormattingContext.cpp LibWeb: Stop changing width of block-level flex containers during layout 2023-05-08 15:56:00 +02:00
BlockFormattingContext.h LibWeb: Rename function to find table box width inside table wrapper 2023-05-07 06:31:53 +02:00
Box.cpp LibWeb/Layout: Rename Box::{paint => paintable}_box() 2023-04-20 20:43:30 +02:00
Box.h LibWeb/Layout: Rename Box::{paint => paintable}_box() 2023-04-20 20:43:30 +02:00
BoxModelMetrics.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
BoxModelMetrics.h LibWeb+Browser+WebContent: Convert BoxModelMetrics to new pixel units 2023-01-05 17:42:31 +01:00
BreakNode.cpp LibWeb: Remove Layout::Node::set_inline() 2022-10-06 15:29:38 +02:00
BreakNode.h LibWeb: Make the layout tree GC-allocated 2022-10-20 15:16:23 +02:00
ButtonBox.cpp Userland: Use Font::pixel_size_rounded_up() instead of glyph_height() 2023-03-04 00:29:38 +01:00
ButtonBox.h LibWeb: Make a handful of layout node leaf classes final 2023-01-11 14:03:18 +01:00
CanvasBox.cpp LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
CanvasBox.h LibWeb: Make a handful of layout node leaf classes final 2023-01-11 14:03:18 +01:00
CheckBox.cpp LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
CheckBox.h LibWeb: Make a handful of layout node leaf classes final 2023-01-11 14:03:18 +01:00
FlexFormattingContext.cpp LibWeb: Use the new to_px() helpers in CSS, SVG and layout code 2023-05-06 18:41:34 +02:00
FlexFormattingContext.h LibWeb: Remove vestigial resolve_definite_width/height helper functions 2023-05-02 11:47:13 +02:00
FormAssociatedLabelableNode.h LibWeb: Make the layout tree GC-allocated 2022-10-20 15:16:23 +02:00
FormattingContext.cpp LibWeb: Enforce min/max height constraints on abspos replaced boxes 2023-05-07 06:28:47 +02:00
FormattingContext.h LibWeb: Show formatting context roots in layout tree dumps 2023-05-03 13:14:36 +02:00
FrameBox.cpp LibWeb/Layout: Rename Box::{paint => paintable}_box() 2023-04-20 20:43:30 +02:00
FrameBox.h LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
GridFormattingContext.cpp LibWeb: Use the new to_px() helpers in CSS, SVG and layout code 2023-05-06 18:41:34 +02:00
GridFormattingContext.h LibWeb: Remove resolve_size method in GFC 2023-05-06 07:01:27 +02:00
ImageBox.cpp LibWeb/Layout: Rename Box::{paint => paintable}_box() 2023-04-20 20:43:30 +02:00
ImageBox.h LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
InlineFormattingContext.cpp LibWeb: Use the new to_px() helpers in CSS, SVG and layout code 2023-05-06 18:41:34 +02:00
InlineFormattingContext.h LibWeb: Convert InlineFormattingContext to new pixel units 2023-01-05 17:42:31 +01:00
InlineLevelIterator.cpp LibWeb: Use the new to_px() helpers in CSS, SVG and layout code 2023-05-06 18:41:34 +02:00
InlineLevelIterator.h LibJS+LibWeb: Wrap raw JS::Cell*/& fields in GCPtr/NonnullGCPtr 2023-03-15 08:48:49 +01:00
InlineNode.cpp LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
InlineNode.h LibWeb: Make a handful of layout node leaf classes final 2023-01-11 14:03:18 +01:00
Label.cpp LibWeb/Layout: Rename BlockContainer::paint{_box => able_with_lines}() 2023-04-20 20:43:30 +02:00
Label.h LibWeb+WebContent+headless-browser: Use CSSPixels for PageClient events 2022-12-10 12:03:19 +00:00
LabelableNode.cpp LibWeb: Move mouse event and label logic from layout to painting tree 2022-03-11 00:21:49 +01:00
LabelableNode.h LibWeb: Make the layout tree GC-allocated 2022-10-20 15:16:23 +02:00
LayoutState.cpp LibWeb: Get rid of weird Length::resolved() usage in LayoutState 2023-05-06 21:14:38 +02:00
LayoutState.h LibWeb: Remove vestigial resolve_definite_width/height helper functions 2023-05-02 11:47:13 +02:00
LineBox.cpp LibWeb: Convert InlineLevelIterator/LineBox/LineBuilder to new px units 2023-01-05 17:42:31 +01:00
LineBox.h LibWeb: Don't drop single <br/> lines 2023-03-16 08:40:29 +00:00
LineBoxFragment.cpp LibWeb/Layout: Rename Box::{paint => paintable}_box() 2023-04-20 20:43:30 +02:00
LineBoxFragment.h LibJS+LibWeb: Wrap raw JS::Cell*/& fields in GCPtr/NonnullGCPtr 2023-03-15 08:48:49 +01:00
LineBuilder.cpp LibWeb: Resolve percentage vertical-align values against line-height 2023-03-29 18:38:29 +02:00
LineBuilder.h LibWeb: Convert InlineLevelIterator/LineBox/LineBuilder to new px units 2023-01-05 17:42:31 +01:00
ListItemBox.cpp LibWeb: Make the layout tree GC-allocated 2022-10-20 15:16:23 +02:00
ListItemBox.h LibWeb: Add fast_is<T>() for various types stood out in a profile 2023-03-11 10:46:26 +01:00
ListItemMarkerBox.cpp LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
ListItemMarkerBox.h LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
Node.cpp LibWeb: Resolve and paint SVG gradient fills 2023-04-28 09:42:28 +02:00
Node.h LibWeb: Verify that a node has styled properties in its styled accessors 2023-04-27 18:28:43 +02:00
Progress.cpp LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
Progress.h LibWeb: Make a handful of layout node leaf classes final 2023-01-11 14:03:18 +01:00
RadioButton.cpp LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
RadioButton.h LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
ReplacedBox.cpp LibWeb: Remove Layout::Node::set_inline() 2022-10-06 15:29:38 +02:00
ReplacedBox.h LibWeb: Convert Layout Boxes to new pixel units 2023-01-05 17:42:31 +01:00
SVGBox.cpp LibWeb: Make SVG <svg> elements behave as CSS replaced elements 2022-03-19 12:42:10 +01:00
SVGBox.h LibWeb: Make the layout tree GC-allocated 2022-10-20 15:16:23 +02:00
SVGFormattingContext.cpp LibWeb: Remove general SVGFormattingContext FIXME 2023-05-04 16:50:01 +02:00
SVGFormattingContext.h LibWeb: Let FormattingContext decide the automatic width of its root 2023-03-20 17:57:58 +01:00
SVGGeometryBox.cpp LibWeb/DOM: Rename Node::{paint => paintable}_box() 2023-04-20 20:43:30 +02:00
SVGGeometryBox.h LibWeb: Don't try to paint SVG elements transformed to zero size 2023-04-12 07:40:22 +02:00
SVGGraphicsBox.cpp LibWeb: Make SVG <g> elements generate a SVGGraphicsPaintable 2023-04-19 07:52:26 +02:00
SVGGraphicsBox.h LibWeb: Make SVG <g> elements generate a SVGGraphicsPaintable 2023-04-19 07:52:26 +02:00
SVGSVGBox.cpp LibWeb: Use the new to_px() helpers in CSS, SVG and layout code 2023-05-06 18:41:34 +02:00
SVGSVGBox.h LibWeb: Add fast_is<T>() for various types stood out in a profile 2023-03-11 10:46:26 +01:00
TableBox.cpp LibWeb: Remove inheritance of TableBox from BlockContainer 2023-01-09 11:47:31 +01:00
TableBox.h LibWeb: Add Layout::Node::is_table() and make is<TableBox>() fast 2023-01-24 11:44:03 +01:00
TableCellBox.cpp LibWeb: Take rowspan into account while table formatting 2022-12-05 17:47:48 +01:00
TableCellBox.h LibWeb: Support display inline-table 2023-01-17 10:18:33 +01:00
TableFormattingContext.cpp LibWeb: Use the new to_px() helpers in CSS, SVG and layout code 2023-05-06 18:41:34 +02:00
TableFormattingContext.h LibWeb: Implement "distribute height to rows" step in TFC 2023-04-29 06:46:45 +02:00
TableRowBox.cpp Libraries: Use default constructors/destructors in LibWeb 2022-03-17 17:23:49 +00:00
TableRowBox.h LibWeb: Support display inline-table 2023-01-17 10:18:33 +01:00
TableRowGroupBox.cpp LibWeb: Remove inheritance of TableRowGroupBox from BlockContainer 2023-01-09 11:47:31 +01:00
TableRowGroupBox.h LibWeb: Remove inheritance of TableRowGroupBox from BlockContainer 2023-01-09 11:47:31 +01:00
TableWrapper.cpp LibWeb: Override width calculation for table wrappers 2023-01-14 19:22:08 +01:00
TableWrapper.h LibWeb: Override width calculation for table wrappers 2023-01-14 19:22:08 +01:00
TextNode.cpp LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
TextNode.h LibWeb: Make a handful of layout node leaf classes final 2023-01-11 14:03:18 +01:00
TreeBuilder.cpp LibWeb: Don't include CSS/StyleComputer.h from Element.h and Document.h 2023-05-08 09:29:44 +02:00
TreeBuilder.h LibJS+LibWeb: Wrap raw JS::Cell*/& fields in GCPtr/NonnullGCPtr 2023-03-15 08:48:49 +01:00
VideoBox.cpp LibWeb: Create a basic layout node for HTMLVideoElement 2023-04-07 16:02:22 +02:00
VideoBox.h LibWeb: Create a basic layout node for HTMLVideoElement 2023-04-07 16:02:22 +02:00
Viewport.cpp LibWeb+WebContent: Make document background and Viewport transparent 2023-04-25 09:33:35 +02:00
Viewport.h LibWeb: Rename Layout::InitialContainingBlock to Layout::Viewport 2023-02-28 12:21:56 +01:00