Age | Commit message (Collapse) | Author | |
---|---|---|---|
2020-11-22 | LibWeb: Rename LayoutNode classes and move them into Layout namespace | Andreas Kling | |
Bring the names of various boxes closer to spec language. This should hopefully make things easier to understand and hack on. :^) Some notable changes: - LayoutNode -> Layout::Node - LayoutBox -> Layout::Box - LayoutBlock -> Layout::BlockBox - LayoutReplaced -> Layout::ReplacedBox - LayoutDocument -> Layout::InitialContainingBlockBox - LayoutText -> Layout::TextNode - LayoutInline -> Layout::InlineNode Note that this is not strictly a "box tree" as we also hang inline/text nodes in the same tree, and they don't generate boxes. (Instead, they contribute line box fragments to their containing block!) | |||
2020-11-22 | LibWeb: Rename LayoutNode::node() => LayoutNode::dom_node() | Andreas Kling | |
2020-11-22 | LibWeb: Reorganize layout system in terms of formatting contexts | Andreas Kling | |
This is a first (huge) step towards modernizing the layout architecture and bringing it closer to spec language. Layout is now performed by a stack of formatting contexts, operating on the box tree (or layout tree, if you will.) There are currently three types of formatting context: - BlockFormattingContext (BFC) - InlineFormattingContext (IFC) - TableFormattingContext (TFC) Document::layout() creates the initial BlockFormattingContext (BFC) which lays out the initial containing block (ICB), and then we recurse through the tree, creating BFC, IFC or TFC as appropriate and handing over control at the context boundaries. The majority of this patch is just refactoring the old logic spread out in LayoutBlock and LayoutTableRowGroup, and turning into these context classes instead. A lot more cleanup will be needed. There are many architectural wins here, the main one being that layout is no longer performed by boxes themselves, which gives us much greater flexibility in the outer/inner layout of a given box. | |||
2020-09-12 | LibWeb: Implement <input type=submit> without using LibGUI | Andreas Kling | |
Following in the footsteps of <input type=checkbox>, this patch adds LayoutButton which implements a basic push button using LibGfx styling primitives. |