Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[A11y] Better identification of parents for pseudo element descendants
This CL changes how parents are identified for descendants of pseudo elements, such that they are never computed. Instead, they only set when the pseudo element subtree is built from the top down, by passing the object adding children as the parent. Because having a parent is a requirement for creating an AXObject, s a result of this, AXObjects for pseudo element descendants will no longer be created when requested randomly in the middle of the tree -- they will only be created as the tree is explored from an element with a node. These rules help ensure that in certain edge cases involving pseudo elements, objects will not be created with the wrong parent or no parent. Examples of such edge cases are ::first-letter inside of a ::before. In addition, this enables removal 50 lines of special case code in this CL, while enabling more cleanups in downstream CLs. Otherwise, the changes mostly move things around (one method had to become static, another had to move to another class). This helps simplify for CL:4027071, stable ids, by removing some messy workarounds in AXObjectCacheImpl::CreateAndInit(). Bug: none Change-Id: Iac87e490e96cdd2fa2bd021355e5c5565389d6b1 Cq-Do-Not-Cancel-Tryjobs: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4107969 Commit-Queue: Benjamin Beaudry <benjamin.beaudry@microsoft.com> Reviewed-by: David Tseng <dtseng@chromium.org> Reviewed-by: Benjamin Beaudry <benjamin.beaudry@microsoft.com> Auto-Submit: Aaron Leventhal <aleventhal@chromium.org> Cr-Commit-Position: refs/heads/main@{#1084524}
- Loading branch information
1 parent
4a8f95e
commit 6c017a1
Showing
6 changed files
with
240 additions
and
238 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.