Module style::dom

source ·
Expand description

Types and traits used to access the DOM from style calculation.

Structs

  • An iterator over the DOM children of a node.
  • An iterator over the DOM descendants of a node in pre-order.
  • A node iterator that only returns node that don’t need layout.
  • An opaque handle to a node, which, unlike UnsafeNode, cannot be transformed back into a non-opaque representation. The only safe operation that can be performed on this node is to compare it to another opaque handle or to another OpaqueNode.
  • Same reason as for the existence of SendNode, SendElement does the proper things for a given TElement.
  • TNode and TElement aren’t Send because we want to be careful and explicit about our parallel traversal. However, there are certain situations (including but not limited to the traversal) where we need to send DOM objects to other threads.
  • Wrapper to output the subtree rather than the single node when formatting for Debug.
  • Wrapper to output the subtree along with the ElementData when formatting for Debug.
  • Wrapper to output the subtree along with the ElementData and primary ComputedValues when formatting for Debug. This is extremely verbose.

Traits

  • Simple trait to provide basic information about the type of an element.
  • The TDocument trait, to represent a document node.
  • The element trait, the main abstraction the style crate acts over.
  • The TNode trait. This is the main generic trait over which the style system can be implemented.
  • The ShadowRoot trait.

Functions