Skip to content
Commit fc2923ef authored by Joanmarie Diggs's avatar Joanmarie Diggs Committed by Chromium LUCI CQ
Browse files

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: default avatarAaron Leventhal <aleventhal@chromium.org>
Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#978766}
parent 012fd2b8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment