Visual formatting model implementation. See https://www.w3.org/TR/CSS22/visuren.html for more information.
WebCore
- recursive layout
- layout logic lives in the renderers mixing block with inline etc.
- No clear separation of logic and state.
LayoutReloaded
- Iterative layout within a formatting context, recursive across nested formatting contexts
- Formatting context is responsible for computing size/positions for all the boxes that live in the context including in/out-of-flow and floating boxes
- Layout state is stored in dedicated FormattingState objects.
- Initial containing block creates the top level (initial) block formatting context
- Floats are resitriced to their formatting contexts.
- Boxes, including inline tree are generated while laying out the content. LayoutTree -> BoxTree.
Instructions:
- apply ./misc/LayoutReloadedWebKit.patch
- compile WebKit
- load ./test/index.html
Partially done: Block formatting context:
- static, relative and out of flow positioning
- margin collapsing
- floats
Missing:
- Inline formatting context
- Everything else