Chromium Code Reviews
DescriptionAXTreeCombiner no longer needs to convert to global coordinates.
AXTreeCombiner is used to combine accessibility trees from multiple frames
in order to create a single accessibility tree, used to provide information
about a web page to the Android assist API, used by features like Now-on-Tap.
Prior to change https://codereview.chromium.org/2217363002, only the root
frame of an accessibility tree was allowed to have a transformation matrix.
So in order to combine frames, AXTreeCombiner had to apply transformation
matrices manually, and make all coordinates global, otherwise the downstream
consumer of the accessibility tree wouldn't apply transformation matrices
from subframes.
That worked, but then in change 2217363002, we made all accessibility
coordinates relative, by allowing transformation matrices anywhere in the
tree. This eliminated the need for AXTreeCombiner to make all
coordinates global, but AXTreeCombiner was improperly updated in
this change, and in many circumstances it was pretending to return
global coordinates but not actually fully implement the new local-to-global
protocol as documented in ax_relative_bounds.h.
The proper fix is to simplify AXTreeCombiner. It's no longer necessary for it
to modify coordinates and apply transformation matrices at all. Just leaving
the coordinates alone now works correctly.
More end-to-end testing is needed. ax_tree_combiner_unittest only tests the
tree combining, and now that coordinates are passed through unmodified, there's
nothing really to test. We need a test of
Java_WebContentsImpl_onAccessibilitySnapshot that tests the resulting
coordinates passed to Java.
BUG=673935
Committed: https://crrev.com/cbc8b96da2d7987a42ededb8017b2f0aca445553
Cr-Commit-Position: refs/heads/master@{#438572}
Patch Set 1 #Patch Set 2 : Fixed unittests #
Messages
Total messages: 21 (13 generated)
|
|||||||||||||||||||||||||||||||||||||