struct AccessibilityUpdate<'update> {
changed_nodes: FxHashSet<NodeId>,
tree_changes: FxHashMap<NodeId, TreeChange>,
counters: UpdateCounters,
damage_map: FxHashMap<NodeId, AccessibilityDamage>,
dom_node_map: RefCell<FxHashMap<NodeId, ServoLayoutNode<'update>>>,
rooted_nodes: Option<FxHashSet<OpaqueNode>>,
}Expand description
Changes which have occurred during the current update, and data required to process the update.
Fields§
§changed_nodes: FxHashSet<NodeId>Nodes whose internal data has changed within the current update.
tree_changes: FxHashMap<NodeId, TreeChange>Nodes that changed their relation to the tree within the current update.
counters: UpdateCountersCounters to track how many nodes we’ve checked for changes or updated in this tree update.
damage_map: FxHashMap<NodeId, AccessibilityDamage>Map of NodeId to the AccessibilityDamage which was passed in for that node.
dom_node_map: RefCell<FxHashMap<NodeId, ServoLayoutNode<'update>>>Map of NodeId to the corresponding ServoLayoutNode. This is populated for nodes
which have damage, including nodes which are newly added to the accessibility tree.
rooted_nodes: Option<FxHashSet<OpaqueNode>>Nodes which were removed from the DOM tree since the last reflow, which were rooted in
AccessibilityData. Only set if pref::expensive_accessibility_test_assertions_enabled
is set.
Implementations§
Source§impl<'update> AccessibilityUpdate<'update>
impl<'update> AccessibilityUpdate<'update>
fn new( dom_damage: FxHashMap<OpaqueNode, (ServoLayoutNode<'update>, AccessibilityDamage)>, rooted_nodes: Option<FxHashSet<OpaqueNode>>, tree: &AccessibilityTree, ) -> Self
fn add(&mut self, node: &mut AccessibilityNode)
fn set_tree_state_change(&mut self, node_id: NodeId, change: TreeChange)
fn is_new(&mut self, node_id: &NodeId) -> bool
Sourcefn finalize(
self,
tree: &mut AccessibilityTree,
) -> (Option<TreeUpdate>, UpdateCounters)
fn finalize( self, tree: &mut AccessibilityTree, ) -> (Option<TreeUpdate>, UpdateCounters)
Consume this AccessibilityUpdate, producing an accesskit::TreeUpdate if there have
been any changes to tree.
This will pass self into [AccessibilityTree::remove_stale_nodes()] to consume
Self::tree_changes.
fn clear_damage(&mut self)
fn insert_damage(&mut self, node_id: NodeId, damage: AccessibilityDamage)
fn insert_dom_node(&self, node_id: NodeId, dom_node: ServoLayoutNode<'update>)
fn take_damage(&mut self, node_id: &NodeId) -> AccessibilityDamage
fn take_dom_node( &mut self, node_id: &NodeId, ) -> Option<ServoLayoutNode<'update>>
fn collect_dom_node_ancestors(&self, node_id: &NodeId, tree: &AccessibilityTree)
Auto Trait Implementations§
impl<'update> !Freeze for AccessibilityUpdate<'update>
impl<'update> !RefUnwindSafe for AccessibilityUpdate<'update>
impl<'update> Send for AccessibilityUpdate<'update>
impl<'update> !Sync for AccessibilityUpdate<'update>
impl<'update> Unpin for AccessibilityUpdate<'update>
impl<'update> UnsafeUnpin for AccessibilityUpdate<'update>
impl<'update> !UnwindSafe for AccessibilityUpdate<'update>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more