ladybird/Userland/Libraries/LibWeb/Layout
Aliaksandr Kalenik 9ee64b5694 LibWeb: Prevent margin double-counting with "collapse through" boxes
If there is a remaining margin-bottom in margin collapsing state
tracker after laying out all boxes in the current BFC, it must be
assigned to the last in-flow child since margin collapsing cannot
occur across a formatting context boundary.

The current issue where margin-bottom may be counted twice due to
"collapse through" margins in the last in-flow child box is addressed
with this fix by excluding such boxes during the search for a box to
assign the remaining margin.

Test case coming with this fix has a layout bug with incorrectly
computed line height.
2023-04-27 07:52:12 +02:00
..
AvailableSpace.cpp
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: Prevent margin double-counting with "collapse through" boxes 2023-04-27 07:52:12 +02:00
BlockFormattingContext.h LibWeb: Let FormattingContext decide the automatic width of its root 2023-03-20 17:57:58 +01: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
BoxModelMetrics.h
BreakNode.cpp
BreakNode.h
ButtonBox.cpp
ButtonBox.h
CanvasBox.cpp
CanvasBox.h
CheckBox.cpp
CheckBox.h
FlexFormattingContext.cpp LibWeb: Treat unresolvable percentage flex-basis values as 'content' 2023-04-18 10:06:02 +02:00
FlexFormattingContext.h LibWeb: Honor column-gap and row-gap CSS properties in flex layout 2023-04-14 13:22:07 +02:00
FormAssociatedLabelableNode.h
FormattingContext.cpp LibWeb: Use intrinsic aspect ratio when calculating max content height 2023-04-05 16:23:56 +02:00
FormattingContext.h LibWeb: Let FormattingContext decide the automatic width of its root 2023-03-20 17:57:58 +01:00
FrameBox.cpp LibWeb/Layout: Rename Box::{paint => paintable}_box() 2023-04-20 20:43:30 +02:00
FrameBox.h
GridFormattingContext.cpp LibWeb: Fix grid size when intrinsically sized 2023-04-24 07:55:40 +02:00
GridFormattingContext.h LibWeb: Add borders functionality to CSS Grid 2023-04-02 19:08:04 +02:00
ImageBox.cpp LibWeb/Layout: Rename Box::{paint => paintable}_box() 2023-04-20 20:43:30 +02:00
ImageBox.h
InlineFormattingContext.cpp LibWeb: Whine instead of dying on unexpected box during line layout 2023-04-13 14:30:16 +02:00
InlineFormattingContext.h
InlineLevelIterator.cpp LibJS+LibWeb: Wrap raw JS::Cell*/& fields in GCPtr/NonnullGCPtr 2023-03-15 08:48:49 +01:00
InlineLevelIterator.h LibJS+LibWeb: Wrap raw JS::Cell*/& fields in GCPtr/NonnullGCPtr 2023-03-15 08:48:49 +01:00
InlineNode.cpp
InlineNode.h
Label.cpp LibWeb/Layout: Rename BlockContainer::paint{_box => able_with_lines}() 2023-04-20 20:43:30 +02:00
Label.h
LabelableNode.cpp
LabelableNode.h
LayoutState.cpp LibWeb/Layout: Rename BlockContainer::paint{_box => able_with_lines}() 2023-04-20 20:43:30 +02:00
LayoutState.h LibWeb: Make box content sizes indefinite before intrinsic sizing 2023-03-27 23:28:07 +02:00
LineBox.cpp
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
ListItemBox.cpp
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
ListItemMarkerBox.h
Node.cpp LibWeb/Layout: Rename Box::{paint => paintable}_box() 2023-04-20 20:43:30 +02:00
Node.h LibWeb: Add .scaled_font() helper to Layout::Node 2023-04-01 22:39:47 +01:00
Progress.cpp
Progress.h
RadioButton.cpp
RadioButton.h
ReplacedBox.cpp
ReplacedBox.h
SVGBox.cpp
SVGBox.h
SVGFormattingContext.cpp LibWeb: Layout <svg> nested inside <svg> 2023-04-19 07:52:26 +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: Support more length types in SVG width/height attributes 2023-03-20 23:45:01 +01: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
TableBox.h
TableCellBox.cpp
TableCellBox.h
TableFormattingContext.cpp LibWeb: Use max-width property in table formatting 2023-04-07 10:42:26 +02:00
TableFormattingContext.h LibWeb: Let FormattingContext decide the automatic width of its root 2023-03-20 17:57:58 +01:00
TableRowBox.cpp
TableRowBox.h
TableRowGroupBox.cpp
TableRowGroupBox.h
TableWrapper.cpp
TableWrapper.h
TextNode.cpp
TextNode.h
TreeBuilder.cpp LibWeb: Don't put abspos grid/flex items in anonymous wrapper 2023-04-07 10:15:16 +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