Module applicable_declarations

Source
Expand description

Applicable declarations management.

StructsΒ§

ApplicableDeclarationBlock
A property declaration together with its precedence among rules of equal specificity so that we can sort them.
CascadePriority
The cascade-level+layer order of this declaration.
ScopeProximity
Proximity to the scope root.

ConstantsΒ§

PROXIMITY_INFINITY πŸ”’
Sacrifice the largest possible value for infinity. This makes the comparison trivial.
SOURCE_ORDER_BITS πŸ”’
Blink uses 18 bits to store source order, and does not check overflow [1]. That’s a limit that could be reached in realistic webpages, so we use 24 bits and enforce defined behavior in the overflow case.
SOURCE_ORDER_MASK πŸ”’
SOURCE_ORDER_MAX πŸ”’

Type AliasesΒ§

ApplicableDeclarationList
List of applicable declarations. This is a transient structure that shuttles declarations between selector matching and inserting into the rule tree, and therefore we want to avoid heap-allocation where possible.