Module layout_2013::construct

source ·
Expand description

Creates flows and fragments from a DOM tree via a bottom-up, incremental traversal of the DOM.

Each step of the traversal considers the node and existing flow, if there is one. If a node is not dirty and an existing flow exists, then the traversal reuses that flow. Otherwise, it proceeds to construct either a flow or a ConstructionItem. A construction item is a piece of intermediate data that goes with a DOM node and hasn’t found its “home” yet-maybe it’s a box, maybe it’s an absolute or fixed position thing that hasn’t found its containing block yet. Construction items bubble up the tree from children to parents until they find their homes.

Structs§

  • An object that knows how to create flows.
  • Represents an {ib} split that has not yet found the containing block that it belongs to. This is somewhat tricky. An example may be helpful. For this DOM fragment:
  • Holds inline fragments that we’re gathering for children of an inline node.
  • Represents inline fragments and {ib} splits that are bubbling up from an inline.
  • Holds inline fragments and absolute descendants.
  • Legalizer 🔒
    Maintains a stack of anonymous boxes needed to ensure that the flow tree is legal. The tree is legal if it follows the rules in CSS 2.1 § 17.2.1.

Enums§

  • Represents the output of flow construction for a DOM node that has not yet resulted in a complete flow. Construction items bubble up the tree until they find a Flow to be attached to.
  • The results of flow construction for a DOM node.

Traits§

  • NodeUtils 🔒
    A utility trait with some useful methods for node queries.

Functions§