Do not fire children-changed on all anonymous block children
When AXObjectCacheImpl::ChildrenChanged() is called on an anonymous block, both the anonymous block's parent and all of its children processed the child change. This can be non-performant. For instance, when an anonymous block level child is inserted into a parent that only has inline level children, layout block flow tries to make all the inline level children non-inline. To do this, it creates an anonymous block and moves the inline level children to the anonymous block one-by-one. For the every inline level child, AXObjectCache tries to call AXObjectCacheImpl::ChildrenChanged(AXObject*) for all children of the parent. This commit stops firing children-changed on all the children of the anonymous block, which no longer appears to be necessary given other changes in the accessibility code. AX-Relnotes: Significant performance improvement when elements are added or removed to anonymous blocks with many children. Bug: 1293714 Change-Id: I5f9668cae2d2b450bc7f32a31265d93c65bca893 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3488063 Commit-Queue: Joanmarie Diggs <jdiggs@igalia.com> Reviewed-by:Aaron Leventhal <aleventhal@chromium.org> Commit-Queue: Aaron Leventhal <aleventhal@chromium.org> Cr-Commit-Position: refs/heads/main@{#978766}
Loading
Please register or sign in to comment