alice
changed the title
Add logic to track new, stale and moved nodes.
layout: Prune stale accessibility nodes from the cache after each update.
alice marked this pull request as ready for review
May 15, 2026 13:55
alice
mentioned this pull request
Merged
alice and others added 15 commits
May 20, 2026 10:33Also, remove stale/fresh logic from get_or_create_node(), and add an integrity check for disjointness of new_nodes and stale_nodes. Signed-off-by: Alice Boxhall <alice@igalia.com>
- TreeStateChange::Stale -> Removed - TreeStateChange::Fresh -> Moved - drain_tree_state_changes() -> finalize_tree_state_changes() Signed-off-by: Alice Boxhall <alice@igalia.com>
Previously, we detected an "impossible" New->Moved TreeStateChange update, because we were updating the state of all newly added children to be "Moved". Now, we filter out newly-created nodes when updating the subtree TreeStateChange. This change also introduces a `MoveState` enum for moved nodes, allowing us to assert that every moved node is removed exactly once. Co-authored-by: delan azabani <dazabani@igalia.com> Signed-off-by: Alice Boxhall <alice@igalia.com>
- Document `TreeChangeState`, `MoveState` and `set_subtree_state_change()` - Panic when attempting to pass `New` or `Moved(Complete)` to set_subtree_state_change() - Remove redundant integrity check at the beginning of the tree update - `use` `TreeStateChange` and `MoveState` in `update_descendants()`. Co-authored-by: delan azabani <dazabani@igalia.com> Signed-off-by: Alice Boxhall <alice@igalia.com>
- TreeStateChange -> TreeChange - MoveState -> Move - get_node_by_dom_node() -> node_for_dom_node() - assert_node_by_dom_node() -> assert_node_for_dom_node() - assert_node_by_id() -> assert_node_for_id() Also: - don't `use` enums except in `set_subtree_state_change()` - don't redundantly declare the type for `newly_created` Co-authored-by: delan azabani <dazabani@igalia.com> Signed-off-by: Alice Boxhall <alice@igalia.com>
Also rename finalize_tree_state_changes to finalize_tree_changes. Also add doc comment for tree_changes. Also update uses of `TreeStateChange` and `MoveState` in doc comments. Signed-off-by: Alice Boxhall <alice@igalia.com>
auto-merge was automatically disabled
May 20, 2026 08:47Head branch was pushed to by a user without write access
delan deleted the accessibility-prune-stale-children branch
May 20, 2026 10:03