Layout input constraints passed from parent to child during layout computation.
Layout input encapsulates the sizing constraints, hints, and execution mode that govern how a child node computes its layout. Parent nodes construct layout inputs based on their own constraints, available space, and the child's position in the layout tree, then pass them down when invoking child layout algorithms.
Key components include execution mode (full layout vs. size-only computation), sizing mode (whether to apply style constraints), requested axes, known dimensions for constraint solving, parent size for percentage resolution, available space for wrapping decisions, and margin collapsibility flags for CSS Block layout.
Fixed dimensions acting as hard constraints during layout.
When width is Some w, layout treats the width as fixed at w and computes the height accordingly. When both are Some, this represents final layout with exact dimensions, and the node performs positioning without further size computation.
hidden is a layout input for nodes with Display.None.
Sets run_mode to Perform_hidden_layout, which causes the node to receive a zero-sized layout without computing children. Other fields are set to defaults: Inherent_size sizing mode, Both axis, no known dimensions or parent size, Max_content available space, and non-collapsible margins.
compare a b compares layout inputs lexicographically.
Compares fields in order: run_mode, sizing_mode, axis, known_dimensions, parent_size, available_space, and vertical_margins_are_collapsible. Returns a negative integer if a < b, zero if a = b, and a positive integer if a > b.