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

Issue 1762143002: Use unique IDs for accessibility nodes on Android (Closed)

Created:
4 years, 9 months ago by dmazzoni
Modified:
4 years, 7 months ago
Reviewers:
nektarios, nasko
CC:
aboxhall+watch_chromium.org, chromium-reviews, darin-cc_chromium.org, dmazzoni+watch_chromium.org, dtseng+watch_chromium.org, jam, je_julie, nektar+watch_chromium.org, yuzo+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use unique IDs for accessibility nodes on Android Shortly we're going to switch to having a separate accessibility tree for each frame. That would break Android because Android only has a single virtual view hierarchy, and we were using node IDs as the virtual view IDs, which are only unique relative to one tree. We already had unique accessibility IDs for Windows, so refactor that code into a cross-platform unique ID per accessibility node, both in the Views code and Content code, and then switch Android to use those unique IDs instead of node IDs. BUG=532249 TBR=nasko Committed: https://crrev.com/7324d7f6bd40b3d60bc71610494abcca22cf6a69 Cr-Commit-Position: refs/heads/master@{#379775}

Patch Set 1 #

Patch Set 2 : Try to fix browser_accessibility_win_unittest.cc #

Patch Set 3 : Address feedback from Nektarios #

Patch Set 4 : Use [] operator for hash_map #

Patch Set 5 : Fix all ToBrowserAccessibilityXXX methods to avoid null pointer derefs #

Patch Set 6 : Fix compile #

Patch Set 7 : More compile errors #

Patch Set 8 : Fix compile again #

Patch Set 9 : Add CONTENT_EXPORT #

Patch Set 10 : Add CONTENT_EXPORT (2) #

Patch Set 11 : Fix null obj deref in DCHECK #

Unified diffs Side-by-side diffs Delta from patch set Stats (+354 lines, -334 lines) Patch
M content/browser/accessibility/accessibility_event_recorder_win.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M content/browser/accessibility/accessibility_tree_formatter_auralinux.cc View 1 2 3 4 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/accessibility/accessibility_tree_formatter_mac.mm View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
M content/browser/accessibility/accessibility_tree_formatter_win.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/accessibility/browser_accessibility.h View 1 2 3 4 4 chunks +6 lines, -11 lines 0 comments Download
M content/browser/accessibility/browser_accessibility.cc View 3 chunks +27 lines, -1 line 0 comments Download
M content/browser/accessibility/browser_accessibility_auralinux.h View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -0 lines 0 comments Download
M content/browser/accessibility/browser_accessibility_auralinux.cc View 1 2 3 4 5 6 7 8 9 10 6 chunks +17 lines, -16 lines 0 comments Download
M content/browser/accessibility/browser_accessibility_cocoa.mm View 1 2 3 4 5 19 chunks +23 lines, -23 lines 0 comments Download
M content/browser/accessibility/browser_accessibility_mac.h View 1 2 3 4 5 6 7 8 9 1 chunk +8 lines, -0 lines 0 comments Download
M content/browser/accessibility/browser_accessibility_mac.mm View 1 2 3 4 5 6 1 chunk +9 lines, -5 lines 0 comments Download
M content/browser/accessibility/browser_accessibility_mac_unittest.mm View 1 2 3 4 5 6 7 2 chunks +2 lines, -1 line 0 comments Download
M content/browser/accessibility/browser_accessibility_manager_android.h View 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/accessibility/browser_accessibility_manager_android.cc View 23 chunks +38 lines, -41 lines 0 comments Download
M content/browser/accessibility/browser_accessibility_manager_mac.mm View 1 2 3 4 4 chunks +5 lines, -5 lines 0 comments Download
M content/browser/accessibility/browser_accessibility_manager_win.h View 1 chunk +0 lines, -4 lines 0 comments Download
M content/browser/accessibility/browser_accessibility_manager_win.cc View 1 2 3 4 5 9 chunks +10 lines, -27 lines 0 comments Download
M content/browser/accessibility/browser_accessibility_win.h View 1 2 3 4 5 6 7 8 4 chunks +6 lines, -12 lines 0 comments Download
M content/browser/accessibility/browser_accessibility_win.cc View 1 2 3 4 5 6 7 8 9 10 38 chunks +52 lines, -64 lines 0 comments Download
M content/browser/accessibility/browser_accessibility_win_unittest.cc View 1 2 3 4 21 chunks +65 lines, -66 lines 0 comments Download
M content/browser/renderer_host/legacy_render_widget_host_win.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.mm View 1 2 3 4 5 6 7 8 5 chunks +6 lines, -5 lines 0 comments Download
M ui/accessibility/platform/ax_platform_node.h View 1 2 2 chunks +13 lines, -1 line 0 comments Download
M ui/accessibility/platform/ax_platform_node.cc View 1 2 3 2 chunks +41 lines, -1 line 0 comments Download
M ui/accessibility/platform/ax_platform_node_base.cc View 1 chunk +1 line, -0 lines 0 comments Download
M ui/accessibility/platform/ax_platform_node_win.h View 1 chunk +0 lines, -10 lines 0 comments Download
M ui/accessibility/platform/ax_platform_node_win.cc View 6 chunks +7 lines, -31 lines 0 comments Download

Messages

Total messages: 24 (7 generated)
dmazzoni
4 years, 9 months ago (2016-03-03 23:56:59 UTC) #2
nektarios
1. Why is the hashtable with the IDs stored in BrowserAccessibility and not in BrowserAccessibilityManager? ...
4 years, 9 months ago (2016-03-07 16:03:14 UTC) #3
dmazzoni
On 2016/03/07 16:03:14, nektarios wrote: > 1. Why is the hashtable with the IDs stored ...
4 years, 9 months ago (2016-03-07 16:33:12 UTC) #4
dmazzoni
On 2016/03/07 16:33:12, dmazzoni wrote: > Not exactly. BrowserAccessibilityManager stores information about one frame > ...
4 years, 9 months ago (2016-03-07 16:37:59 UTC) #5
chromium-reviews
Android doesn't have Views at all, so there's no conflict. On Windows they > share ...
4 years, 9 months ago (2016-03-07 16:42:47 UTC) #6
dmazzoni
On Mon, Mar 7, 2016 at 8:42 AM Nektarios Paisios <nektar@google.com> wrote: > Android doesn't ...
4 years, 9 months ago (2016-03-07 17:11:49 UTC) #7
chromium-reviews
> Yep, it really is safe. You can cast a null pointer. It's only unsafe ...
4 years, 9 months ago (2016-03-07 17:25:08 UTC) #8
dmazzoni
On Mon, Mar 7, 2016 at 9:25 AM 'Nektarios Paisios' via Chromium-reviews < chromium-reviews@chromium.org> wrote: ...
4 years, 9 months ago (2016-03-07 17:56:14 UTC) #9
chromium-reviews
LGTM On Monday, March 7, 2016, Dominic Mazzoni <dmazzoni@chromium.org> wrote: > On Mon, Mar 7, ...
4 years, 9 months ago (2016-03-07 18:29:13 UTC) #10
dmazzoni
Thanks for the review! I replaced all of the ToBrowserAccessibilityXXX methods with global functions across ...
4 years, 9 months ago (2016-03-07 19:00:05 UTC) #11
nektarios
lgtm
4 years, 9 months ago (2016-03-07 19:06:53 UTC) #12
dmazzoni
+tbr:nasko for trivial changes to content/browser/renderer_host
4 years, 9 months ago (2016-03-08 07:09:08 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1762143002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1762143002/200001
4 years, 9 months ago (2016-03-08 07:09:27 UTC) #18
commit-bot: I haz the power
Committed patchset #11 (id:200001)
4 years, 9 months ago (2016-03-08 07:36:43 UTC) #20
commit-bot: I haz the power
Patchset 11 (id:??) landed as https://crrev.com/7324d7f6bd40b3d60bc71610494abcca22cf6a69 Cr-Commit-Position: refs/heads/master@{#379775}
4 years, 9 months ago (2016-03-08 07:37:51 UTC) #22
dmazzoni
Great fix, I think that would explain the behavior you're seeing. Thanks. I've asked for ...
4 years, 7 months ago (2016-05-17 16:37:15 UTC) #23
dmazzoni
4 years, 7 months ago (2016-05-17 16:37:52 UTC) #24
Message was sent while issue was closed.
Oops, that last comment was intended for:
https://codereview.chromium.org/1978223002/

Powered by Google App Engine
This is Rietveld 408576698