Skip to main content

Module window

Module window 

Source
Expand description

Window layout management: relayout, event processing, state sync. Window layout management for solver3/text3

This module provides the high-level API for managing layout state across frames, including caching, incremental updates, and display list generation.

The main entry point is LayoutWindow, which encapsulates all the state needed to perform layout and maintain consistency across window resizes and DOM updates.

Key subsystems managed by LayoutWindow:

  • Text editing: cursor/selection management, IME preedit, undo/redo, and incremental text relayout
  • Accessibility: tree construction and incremental updates for screen readers via accesskit
  • VirtualView: callback invocation and recursive layout for virtualized scrollable content
  • Scrolling: scroll state, scrollbar opacity, and scroll-into-view for cursors and selections

Re-exports§

pub use crate::managers::text_input::PendingTextEdit;

Structs§

DirtyTextNode
A text node that has been edited since the last full layout. This allows us to perform lightweight relayout without rebuilding the entire DOM.
DomLayoutResult
Result of a layout pass for a single DOM, before display list generation
E2eMountOverride
The E2E mount override for one window: the XML+CSS document the debug mount op installed, plus a “must be (re-)parsed” flag.
FrameReport
Per-frame observability record hung off LayoutWindow.
LayoutResult
Result of a layout operation
LayoutWindow
A window-level layout manager that encapsulates all layout state and caching.
ScrollbarDragState
State for tracking scrollbar drag interaction
TextChangesetResult
Result of applying a text changeset
TextConstraintsCache
Cached text layout constraints for a node These are the layout parameters that were used to shape the text

Enums§

CursorBlinkTimerAction
Action to take for the cursor blink timer when focus changes
FrameDamage
Outcome of a single CPU render_frame call — the seed of the unified DamageRegion type described in DAMAGE_REGION_PLAN.md.
ScrollMode
Scroll animation mode
SelectionScrollType
Type of selection bounds to scroll into view
TextEditType
TooltipTimerAction
Action for the tooltip-delay timer, returned by LayoutWindow::handle_hover_change_for_tooltip(). Platform layer translates these to start_timer / stop_timer calls on TOOLTIP_DELAY_TIMER_ID.

Constants§

MAX_EVENT_RECURSION_DEPTH
Maximum recursion depth for event processing.
MAX_LIFECYCLE_REGEN_PASSES
How many extra layout passes a single frame may run because a lifecycle callback asked for one.

Functions§

cursor_blink_timer_callback
Callback for the cursor blink timer
tooltip_delay_timer_callback
Callback for the tooltip-delay timer.