Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(701)

Issue 2572923002: AXTreeCombiner no longer needs to convert to global coordinates. (Closed)

Created:
4 years ago by dmazzoni
Modified:
4 years ago
CC:
chromium-reviews, aboxhall+watch_chromium.org, nektar+watch_chromium.org, yuzo+watch_chromium.org, je_julie, dmazzoni+watch_chromium.org, dtseng+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

AXTreeCombiner 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -71 lines) Patch
M ui/accessibility/ax_tree_combiner.h View 3 chunks +1 line, -4 lines 0 comments Download
M ui/accessibility/ax_tree_combiner.cc View 1 4 chunks +3 lines, -16 lines 0 comments Download
M ui/accessibility/ax_tree_combiner_unittest.cc View 1 chunk +0 lines, -51 lines 0 comments Download

Messages

Total messages: 21 (13 generated)
dmazzoni
4 years ago (2016-12-14 00:03:05 UTC) #2
sgurun-gerrit only
On 2016/12/14 00:03:05, dmazzoni wrote: this is failing tests. I will look after tests are ...
4 years ago (2016-12-14 03:43:19 UTC) #7
dmazzoni
The change caused a harmless arbitrary difference in the test results. I fixed it so ...
4 years ago (2016-12-14 16:30:21 UTC) #8
sgurun-gerrit only
On 2016/12/14 16:30:21, dmazzoni wrote: > The change caused a harmless arbitrary difference > in ...
4 years ago (2016-12-14 18:15:14 UTC) #13
aboxhall
LGTM 🎉
4 years ago (2016-12-14 18:58:24 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2572923002/20001
4 years ago (2016-12-14 19:03:51 UTC) #16
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years ago (2016-12-14 19:10:44 UTC) #19
commit-bot: I haz the power
4 years ago (2016-12-14 19:14:09 UTC) #21
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/cbc8b96da2d7987a42ededb8017b2f0aca445553
Cr-Commit-Position: refs/heads/master@{#438572}

Powered by Google App Engine
This is Rietveld 408576698