diff options
author | Andreas Kling <kling@serenityos.org> | 2020-11-22 13:38:18 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-11-22 14:36:56 +0100 |
commit | e1a24edfa9e85213ea44b19f16f848841d1f4405 (patch) | |
tree | aa4b02976c59748540f84e77f6d48730064cea93 /Libraries/LibWeb/Layout/LayoutSVGGraphics.h | |
parent | 00aac65af54a67ec6f67f53e49aa1514496b395c (diff) | |
download | serenity-e1a24edfa9e85213ea44b19f16f848841d1f4405.zip |
LibWeb: Reorganize layout system in terms of formatting contexts
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.
Diffstat (limited to 'Libraries/LibWeb/Layout/LayoutSVGGraphics.h')
-rw-r--r-- | Libraries/LibWeb/Layout/LayoutSVGGraphics.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/Libraries/LibWeb/Layout/LayoutSVGGraphics.h b/Libraries/LibWeb/Layout/LayoutSVGGraphics.h index 36cdd8e025..a6e3352752 100644 --- a/Libraries/LibWeb/Layout/LayoutSVGGraphics.h +++ b/Libraries/LibWeb/Layout/LayoutSVGGraphics.h @@ -37,7 +37,6 @@ public: LayoutSVGGraphics(DOM::Document&, SVG::SVGGraphicsElement&, NonnullRefPtr<CSS::StyleProperties>); virtual ~LayoutSVGGraphics() override = default; - virtual void layout(LayoutMode mode) override; virtual void before_children_paint(PaintContext& context, LayoutNode::PaintPhase phase) override; private: |