ladybird/Userland/Libraries/LibWeb/Layout
Andreas Kling a4d51b3dc2 LibWeb: Add Painting::Box and move things from Layout::Box into it
The "paintable" state in Layout::Box was actually not safe to access
until after layout had been performed.

As a first step towards making this harder to mess up accidentally,
this patch moves painting information from Layout::Box to a new class:
Painting::Box. Every layout can have a corresponding paint box, and
it holds the final used metrics determined by layout.

The paint box is created and populated by FormattingState::commit().

I've also added DOM::Node::paint_box() as a convenient way to access
the paint box (if available) of a given DOM node.

Going forward, I believe this will allow us to better separate data
that belongs to layout vs painting, and also open up opportunities
for naturally invalidating caches in the paint box (since it's
reconstituted by every layout.)
2022-03-11 00:21:49 +01:00
..
BlockContainer.cpp LibWeb: Add Painting::Box and move things from Layout::Box into it 2022-03-11 00:21:49 +01:00
BlockContainer.h LibWeb: Add Painting::Box and move things from Layout::Box into it 2022-03-11 00:21:49 +01:00
BlockFormattingContext.cpp LibWeb: Measure intrinsic block width *around* children's border edge 2022-03-04 12:34:26 +01:00
BlockFormattingContext.h LibWeb: Create list-item markers during layout tree construction 2022-02-21 18:35:12 +01:00
Box.cpp LibWeb: Add Painting::Box and move things from Layout::Box into it 2022-03-11 00:21:49 +01:00
Box.h LibWeb: Add Painting::Box and move things from Layout::Box into it 2022-03-11 00:21:49 +01:00
BoxModelMetrics.cpp
BoxModelMetrics.h
BreakNode.cpp LibWeb: Remove old Layout::Node::split_into_lines() API 2022-01-23 01:22:41 +01:00
BreakNode.h LibWeb: Remove old Layout::Node::split_into_lines() API 2022-01-23 01:22:41 +01:00
ButtonBox.cpp LibWeb: Add Painting::Box and move things from Layout::Box into it 2022-03-11 00:21:49 +01:00
ButtonBox.h
CanvasBox.cpp LibWeb: Add Painting::Box and move things from Layout::Box into it 2022-03-11 00:21:49 +01:00
CanvasBox.h
CheckBox.cpp LibWeb: Add Painting::Box and move things from Layout::Box into it 2022-03-11 00:21:49 +01:00
CheckBox.h
FlexFormattingContext.cpp LibWeb: Rename FormattingState::ensure() -> get_mutable() 2022-02-21 18:35:12 +01:00
FlexFormattingContext.h LibWeb: Start making our layout system "transactional" 2022-02-21 18:35:12 +01:00
FormattingContext.cpp LibWeb: Improve height:auto for position:absolute blocks 2022-03-05 21:26:19 +01:00
FormattingContext.h LibWeb: Handle height:auto separately for BFC root vs other block boxes 2022-03-01 23:26:35 +01:00
FormattingState.cpp LibWeb: Add Painting::Box and move things from Layout::Box into it 2022-03-11 00:21:49 +01:00
FormattingState.h LibWeb: Add Painting::Box and move things from Layout::Box into it 2022-03-11 00:21:49 +01:00
FrameBox.cpp LibWeb: Add Painting::Box and move things from Layout::Box into it 2022-03-11 00:21:49 +01:00
FrameBox.h
ImageBox.cpp LibWeb: Add Painting::Box and move things from Layout::Box into it 2022-03-11 00:21:49 +01:00
ImageBox.h
InitialContainingBlock.cpp LibWeb: Add Painting::Box and move things from Layout::Box into it 2022-03-11 00:21:49 +01:00
InitialContainingBlock.h
InlineFormattingContext.cpp LibWeb: Respect inline-axis margins between line box fragments :^) 2022-03-09 18:47:32 +01:00
InlineFormattingContext.h LibWeb: Start making our layout system "transactional" 2022-02-21 18:35:12 +01:00
InlineLevelIterator.cpp LibWeb: Make InlineLevelIterator emit absolutely positioned items 2022-03-08 00:19:49 +01:00
InlineLevelIterator.h LibWeb: Make InlineLevelIterator emit absolutely positioned items 2022-03-08 00:19:49 +01:00
InlineNode.cpp LibWeb: Add Painting::Box and move things from Layout::Box into it 2022-03-11 00:21:49 +01:00
InlineNode.h LibWeb: Make display: foo box constructors take the Element by pointer 2022-02-25 19:35:34 +01:00
Label.cpp LibWeb: Add Painting::Box and move things from Layout::Box into it 2022-03-11 00:21:49 +01:00
Label.h LibWeb: Support implicit <label> targets 2022-02-15 23:24:41 +01:00
LabelableNode.h Everywhere: Update copyrights with my new serenityos.org e-mail :^) 2022-01-31 18:23:22 +00:00
LayoutPosition.cpp
LayoutPosition.h
LineBox.cpp LibWeb: Respect inline-axis margins between line box fragments :^) 2022-03-09 18:47:32 +01:00
LineBox.h LibWeb: Respect inline-axis margins between line box fragments :^) 2022-03-09 18:47:32 +01:00
LineBoxFragment.cpp LibWeb: Add Painting::Box and move things from Layout::Box into it 2022-03-11 00:21:49 +01:00
LineBoxFragment.h LibWeb: Use coordinate instead of WeakPtr for box->fragment connection 2022-02-28 14:17:44 +01:00
LineBuilder.cpp LibWeb: Respect inline-axis margins between line box fragments :^) 2022-03-09 18:47:32 +01:00
LineBuilder.h LibWeb: Respect inline-axis margins between line box fragments :^) 2022-03-09 18:47:32 +01:00
ListItemBox.cpp LibWeb: Make display: foo box constructors take the Element by pointer 2022-02-25 19:35:34 +01:00
ListItemBox.h LibWeb: Make display: foo box constructors take the Element by pointer 2022-02-25 19:35:34 +01:00
ListItemMarkerBox.cpp LibWeb: Add Painting::Box and move things from Layout::Box into it 2022-03-11 00:21:49 +01:00
ListItemMarkerBox.h LibWeb: Create list-item markers during layout tree construction 2022-02-21 18:35:12 +01:00
Node.cpp LibWeb: Add Painting::Box and move things from Layout::Box into it 2022-03-11 00:21:49 +01:00
Node.h LibWeb: Start making our layout system "transactional" 2022-02-21 18:35:12 +01:00
Progress.cpp LibWeb: Add Painting::Box and move things from Layout::Box into it 2022-03-11 00:21:49 +01:00
Progress.h LibWeb: Add basic implementation of progress bar element 2022-02-16 15:34:08 -05:00
RadioButton.cpp LibWeb: Add Painting::Box and move things from Layout::Box into it 2022-03-11 00:21:49 +01:00
RadioButton.h Everywhere: Update copyrights with my new serenityos.org e-mail :^) 2022-01-31 18:23:22 +00:00
ReplacedBox.cpp LibWeb: Remove old Layout::Node::split_into_lines() API 2022-01-23 01:22:41 +01:00
ReplacedBox.h LibWeb: Remove old Layout::Node::split_into_lines() API 2022-01-23 01:22:41 +01:00
SVGBox.cpp LibWeb: Stop treating all SVG elements as inline 2022-02-16 21:47:53 +01:00
SVGBox.h LibWeb: Add const versions of SVGBox::dom_node() and friends 2022-02-11 21:38:27 +01:00
SVGFormattingContext.cpp LibWeb: Add support for 'view-box' attribute to SVGs 2022-02-28 16:49:24 +01:00
SVGFormattingContext.h LibWeb: Start making our layout system "transactional" 2022-02-21 18:35:12 +01:00
SVGGeometryBox.cpp LibWeb: Add Painting::Box and move things from Layout::Box into it 2022-03-11 00:21:49 +01:00
SVGGeometryBox.h LibWeb: Add support for 'view-box' attribute to SVGs 2022-02-28 16:49:24 +01:00
SVGGraphicsBox.cpp
SVGGraphicsBox.h LibWeb: Add const versions of SVGBox::dom_node() and friends 2022-02-11 21:38:27 +01:00
SVGSVGBox.cpp LibWeb: Add Painting::Box and move things from Layout::Box into it 2022-03-11 00:21:49 +01:00
SVGSVGBox.h
TableBox.cpp
TableBox.h
TableCellBox.cpp
TableCellBox.h
TableFormattingContext.cpp LibWeb: Compute table cell height after doing its inside layout 2022-02-21 18:35:12 +01:00
TableFormattingContext.h LibWeb: Start making our layout system "transactional" 2022-02-21 18:35:12 +01:00
TableRowBox.cpp
TableRowBox.h
TableRowGroupBox.cpp LibWeb: Make display: foo box constructors take the Element by pointer 2022-02-25 19:35:34 +01:00
TableRowGroupBox.h LibWeb: Make display: foo box constructors take the Element by pointer 2022-02-25 19:35:34 +01:00
TextNode.cpp LibWeb: Make TextNode::ChunkIterator::try_commit_chunk() const 2022-03-07 21:49:36 +01:00
TextNode.h LibWeb: Make TextNode::ChunkIterator::try_commit_chunk() const 2022-03-07 21:49:36 +01:00
TreeBuilder.cpp LibWeb: Display pseudo-elements in the DOM inspector 2022-03-10 17:30:09 +01:00
TreeBuilder.h