tree: 29e55ecf2c589649dfe6b93a516f69149bb0b027 [path history] [tgz]
  1. DisplayTree/
  2. FormattingContext/
  3. FormattingState/
  4. Layout.js
  5. LayoutReloaded.xcworkspace/
  6. LayoutState.js
  7. LayoutTree/
  8. README.md
  9. TreeBuilder.js
  10. Utils.js
  11. misc/
  12. test/
Tools/LayoutReloaded/README.md

Visual formatting model implementation. See https://www.w3.org/TR/CSS22/visuren.html for more information.

WebCore

  1. recursive layout
  2. layout logic lives in the renderers mixing block with inline etc.
  3. No clear separation of logic and state.

LayoutReloaded

  1. Iterative layout within a formatting context, recursive across nested formatting contexts
  2. 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
  3. Layout state is stored in dedicated FormattingState objects.
  4. Initial containing block creates the top level (initial) block formatting context
  5. Floats are resitriced to their formatting contexts.
  6. Boxes, including inline tree are generated while laying out the content. LayoutTree -> BoxTree.

Instructions:

  1. apply ./misc/LayoutReloadedWebKit.patch
  2. compile WebKit
  3. 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