properties
Structs
ExpandedNodeIdentifier
Stable runtime identifier assigned to an expanded node.
Properties
0
Type: u32
Implementations
to_u32
pub fn to_u32(&self) -> u32
Convert to the integer id passed across chassis message boundaries.
ExpressionContext
Data structure used for dynamic injection of values into Expressions, maintaining a pointer e.g. to the current stack frame to enable evaluation of properties & dependencies
Properties
stack_frame
Type: Rc<RuntimePropertiesStackFrame>
RuntimeContext
Shared context for properties pass recursion
Properties
layer_count
Type: Cell<usize>
dirty_canvases
Type: Rc<RefCell<Vec<bool>>>
Implementations
add_to_cache
pub fn add_to_cache(&self, node: &Rc<ExpandedNode>)
Add a node to runtime lookup caches.
canvas_node_light_mask
pub fn canvas_node_light_mask(&self, id: ExpandedNodeIdentifier) -> u32
Return the direct-light membership mask resolved for a retained canvas node.
capture_touch_target
pub fn capture_touch_target(&self, identifier: i64, target: ExpandedNodeIdentifier)
Route a touch sequence to the node hit at touch-down, even after the finger moves away.
captured_touch_target
pub fn captured_touch_target(&self, identifier: i64) -> Option<Rc<ExpandedNode>>
Resolve the node captured for an active touch sequence.
clear_all_dirty_canvases
pub fn clear_all_dirty_canvases(&self)
Mark every canvas layer clean.
clear_layer_scroller_owners
pub fn clear_layer_scroller_owners(&self)
Clear render-layer-to-scroller ownership before recomputing occlusion.
clear_root_expanded_node
pub fn clear_root_expanded_node(&self)
Clear the registered root expanded node.
clear_visual_viewport_state
pub fn clear_visual_viewport_state(&self)
Clear cached visual viewport state.
get_elements_beneath_ray
pub fn get_elements_beneath_ray(&self, root: Option<Rc<ExpandedNode>>, ray: Point2<Window>, limit_one: bool, accum: Vec<Rc<ExpandedNode>>, hit_invisible: bool) -> Vec<Rc<ExpandedNode>>
Simple 2D raycasting: the coordinates of the ray represent a
ray running orthogonally to the view plane, intersecting at
the specified point ray. Areas outside of clipping bounds will
not register a hit, nor will elements that suppress input events.
get_expanded_node_by_eid
pub fn get_expanded_node_by_eid(&self, id: ExpandedNodeIdentifier) -> Option<Rc<ExpandedNode>>
Look up an expanded node by runtime id.
get_expanded_nodes_by_global_ids
pub fn get_expanded_nodes_by_global_ids(&self, uni: &UniqueTemplateNodeIdentifier) -> Vec<Rc<ExpandedNode>>
Finds all ExpandedNodes with corresponding UniqueTemplateNodeIdentifier
get_expanded_nodes_by_id
pub fn get_expanded_nodes_by_id(&self, id: &str) -> Vec<Rc<ExpandedNode>>
Finds all ExpandedNodes with the CommonProperty#id matching the provided string
get_layer_scroller_owner
pub fn get_layer_scroller_owner(&self, layer_id: usize) -> Option<ExpandedNodeIdentifier>
Find the scroller that owns a render layer, when one exists.
get_root_scroller_id
pub fn get_root_scroller_id(&self) -> Option<u32>
Current page-scroll-backed root scroller id.
get_screenshot_map
pub fn get_screenshot_map(&self) -> Rc<RefCell<HashMap<u32, ScreenshotData>>>
Shared screenshot capture map keyed by request id.
get_scroller_surface_scroll
pub fn get_scroller_surface_scroll(&self, id: u32) -> Option<(f64, f64)>
Fetch the presentation scroll offset for a native scroller surface, falling back to the authoritative scroll position when presentation scroll is unavailable.
get_scroller_surface_state
pub fn get_scroller_surface_state(&self, id: u32) -> Option<ScrollerSurfaceState>
Fetch cached scroller surface state by node id.
get_topmost_element_beneath_ray
pub fn get_topmost_element_beneath_ray(self: &Rc<Self>, ray: Point2<Window>) -> Option<Rc<ExpandedNode>>
Alias for get_elements_beneath_ray with limit_one = true
get_visual_viewport_state
pub fn get_visual_viewport_state(&self) -> Option<VisualViewportState>
Return cached browser visual viewport state, if available.
is_canvas_dirty
pub fn is_canvas_dirty(&self, id: &usize) -> bool
Check whether a canvas layer needs redraw.
layer_has_canvas_drawables
pub fn layer_has_canvas_drawables(&self, layer: usize) -> bool
Return whether a render layer currently has canvas work to paint.
load_screenshot
pub fn load_screenshot(&self, id: u32, data: ScreenshotData) -> bool
Store a screenshot payload delivered by the chassis.
new
pub fn new(globals: Globals) -> Self
Create a runtime context for normal app execution.
register_layer_scroller_owner
pub fn register_layer_scroller_owner(&self, layer_id: usize, scroller_id: ExpandedNodeIdentifier)
Record that a render layer is owned by a particular scroller.
register_root_expanded_node
pub fn register_root_expanded_node(&self, root: &Rc<ExpandedNode>)
Store the root expanded node after it has been initialized.
release_touch_target
pub fn release_touch_target(&self, identifier: i64) -> Option<Rc<ExpandedNode>>
Release and resolve the node captured for a completed touch sequence.
remove_from_cache
pub fn remove_from_cache(&self, node: &Rc<ExpandedNode>)
Remove a node from runtime lookup caches.
remove_scroller_surface_state
pub fn remove_scroller_surface_state(&self, id: u32)
Remove cached scroller surface state.
resize_canvas_layers_to
pub fn resize_canvas_layers_to(&self, id: usize)
Ensure the dirty-canvas table has entries up to the requested layer count.
set_canvas_dirty
pub fn set_canvas_dirty(&self, id: usize)
Mark a canvas layer dirty.
set_canvas_drawable_layers
pub fn set_canvas_drawable_layers(&self, layers: HashSet<usize>)
Replace the set of render layers that currently contain canvas drawables.
set_root_scroller_id
pub fn set_root_scroller_id(&self, id: Option<u32>)
Mark which node currently delegates root scrolling behavior to the page.
set_scroller_surface_state
pub fn set_scroller_surface_state(&self, id: u32, state: ScrollerSurfaceState) -> ScrollerSurfaceStateChange
Remember browser-owned scroller state for native compositing and scroll transforms.
set_visual_viewport_state
pub fn set_visual_viewport_state(&self, state: VisualViewportState)
Cache the browser visual viewport state for root scroller math.
update_scroller_surface_scroll
pub fn update_scroller_surface_scroll(&self, id: u32, scroll_x: f64, scroll_y: f64, presentation_scroll_x: f64, presentation_scroll_y: f64) -> ScrollerSurfaceStateChange
Update hot scroll offsets for an existing native scroller surface without touching structural state.
RuntimePropertiesStackFrame
Data structure for a single frame of our runtime stack, including
a reference to its parent frame and properties for
runtime evaluation, e.g. of Expressions. RuntimePropertiesStackFrames also track
timeline playhead position.
Components push RuntimePropertiesStackFrames before computing properties and pop them after computing, thus providing a
hierarchical store of node-relevant data that can be bound to symbols in expressions.
ScrollerSurfaceState
Last-known scroll state for a native or browser-owned scroller surface.
Properties
viewport_width
Type: f64
viewport_height
Type: f64
content_width
Type: f64
content_height
Type: f64
scroll_x
Type: f64
scroll_y
Type: f64
presentation_scroll_x
Type: f64
presentation_scroll_y
Type: f64
clip_content
Type: bool
VisualViewportState
Browser visual viewport state used when page scrolling participates in root scroller behavior.
Properties
width
Type: f64
height
Type: f64
offset_x
Type: f64
offset_y
Type: f64
page_scroll_x
Type: f64
page_scroll_y
Type: f64
Enums
ScrollerSurfaceStateChange
Coarse classification of changes to a native or browser-owned scroller surface.