Update accessibility subtree when an event listener is removed #33991
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If an object was included in the accessibility tree solely due to an
event listener which was just removed, that object will be marked as
dirty and subsequently as ignored. When BlinkAXTreeSource::GetChildren
is then called due to serialization of updates and events, the parent of
that now-ignored object will have a child it should not and a DCHECK
will fail.
This commit solves that problem by calling ChildrenChangedOnAncestorOf
if the event listener was removed on an existing AXObject. Doing so
causes the accessibility tree to be updated prior to serialization of
updates and events. It includes an additional change and test from
crrev.com/c/3608668.
AX-Relnotes: N/A
Bug: 1319933
Change-Id: Ibb4b78d480d940c8274db75b3739cda0e253933e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3614009
Reviewed-by: Aaron Leventhal <aleventhal@chromium.org>
Reviewed-by: Mason Freed <masonf@chromium.org>
Commit-Queue: Joanmarie Diggs <jdiggs@igalia.com>
Cr-Commit-Position: refs/heads/main@{#997215}