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

Issue 667713006: Implement automatic load of composed/embedded automation trees (Closed)

Created:
6 years, 1 month ago by David Tseng
Modified:
6 years, 1 month ago
CC:
chromium-reviews, extensions-reviews_chromium.org, sadrul, plundblad+watch_chromium.org, aboxhall+watch_chromium.org, tfarina, creis+watch_chromium.org, nasko+codewatch_chromium.org, jam, yuzo+watch_chromium.org, darin-cc_chromium.org, dmazzoni+watch_chromium.org, dtseng+watch_chromium.org, kalyank, chromium-apps-reviews_chromium.org, ben+ash_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@lkcr
Project:
chromium
Visibility:
Public.

Description

Implement automatic load of composed/embedded automation trees Introduces the metadata required to link together the desktop tree and a views::WebView. Additionally, implements the js side logic to resolve these links. A views::WebView now gets assigned an AXRole of webView and its immediate child resolves to the rootWebArea it hosts. This resolution is done dynamically at runtime using the underlying AX tree id which itself is mapped using AXTreeIDRegistry back in the browser. If the hosting webView has yet to load its child rootWebArea, enableFrame will be called to and a callback waiting for the subroot's data; this auto load occurs as soon as a webView is seen during a tree update and results in a childrenChanged event once its child rootWebArea is available. When a caller asks for the parent of a rootWebArea, a dynamic lookup is also performed to retrieve a hosting webView, if any. Committed: https://crrev.com/ad8ae0f7f45d921efd8da77ffecbcd7253c87870 Cr-Commit-Position: refs/heads/master@{#302648}

Patch Set 1 #

Total comments: 18

Patch Set 2 : Address comments. #

Patch Set 3 : #

Total comments: 15

Patch Set 4 : Address comments. #

Patch Set 5 : Variant with load() and AutomationnRootNode interface intact. #

Patch Set 6 : #

Total comments: 1

Patch Set 7 : Get test to pass. #

Total comments: 7

Patch Set 8 : #

Total comments: 6

Patch Set 9 : indent, rename, map win role #

Patch Set 10 : #

Total comments: 26

Patch Set 11 : indexInParent #

Patch Set 12 : #

Patch Set 13 : #

Total comments: 1

Patch Set 14 : #

Patch Set 15 : json #

Patch Set 16 : bad export #

Patch Set 17 : Fix UAF #

Unified diffs Side-by-side diffs Delta from patch set Stats (+401 lines, -145 lines) Patch
A chrome/browser/accessibility/ax_tree_id_registry.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +50 lines, -0 lines 0 comments Download
A chrome/browser/accessibility/ax_tree_id_registry.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +52 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/automation/automation_apitest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +10 lines, -6 lines 0 comments Download
M chrome/browser/extensions/api/automation_internal/automation_internal_api.h View 1 2 3 4 5 6 7 1 chunk +9 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/automation_internal/automation_internal_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 6 chunks +36 lines, -11 lines 0 comments Download
M chrome/browser/extensions/api/automation_internal/automation_util.cc View 1 2 3 4 5 6 7 8 3 chunks +8 lines, -4 lines 0 comments Download
M chrome/browser/ui/ash/accessibility/automation_manager_ash.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/ash/accessibility/automation_manager_ash.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/ui/ash/accessibility/ax_tree_source_ash.cc View 1 2 3 4 5 6 7 8 2 chunks +21 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/extensions/api/automation.idl View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +5 lines, -34 lines 0 comments Download
M chrome/common/extensions/api/automation_internal.idl View 1 2 3 4 5 6 7 4 chunks +11 lines, -12 lines 0 comments Download
M chrome/renderer/resources/extensions/automation/automation_node.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 11 chunks +42 lines, -27 lines 0 comments Download
M chrome/renderer/resources/extensions/automation_custom_bindings.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +36 lines, -36 lines 0 comments Download
M chrome/test/data/extensions/api_test/automation/tests/desktop/common.js View 1 chunk +26 lines, -4 lines 0 comments Download
A + chrome/test/data/extensions/api_test/automation/tests/desktop/load_tabs.html View 1 chunk +1 line, -1 line 0 comments Download
A chrome/test/data/extensions/api_test/automation/tests/desktop/load_tabs.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +60 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/automation/tests/unit/test.js View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M ui/accessibility/ax_enums.idl View 1 2 3 4 5 6 7 2 chunks +8 lines, -1 line 0 comments Download
M ui/accessibility/ax_node_data.cc View 1 2 3 4 5 6 7 1 chunk +6 lines, -0 lines 0 comments Download
M ui/views/accessibility/ax_view_obj_wrapper.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M ui/views/accessibility/ax_view_obj_wrapper.cc View 1 2 3 4 5 6 7 2 chunks +8 lines, -4 lines 0 comments Download
M ui/views/accessibility/native_view_accessibility_win.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M ui/views/controls/webview/webview.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 65 (25 generated)
David Tseng
WIP. Some illegal includes ui -> content in here which I'd like some feedback on/suggestions ...
6 years, 1 month ago (2014-10-28 23:59:52 UTC) #2
dmazzoni
Great first draft! More comments coming. https://codereview.chromium.org/667713006/diff/1/ui/views/accessibility/ax_view_obj_wrapper.cc File ui/views/accessibility/ax_view_obj_wrapper.cc (right): https://codereview.chromium.org/667713006/diff/1/ui/views/accessibility/ax_view_obj_wrapper.cc#newcode52 ui/views/accessibility/ax_view_obj_wrapper.cc:52: view_data.role = ui::AX_ROLE_WEB_AREA; ...
6 years, 1 month ago (2014-10-29 00:14:11 UTC) #3
dmazzoni
https://codereview.chromium.org/667713006/diff/1/chrome/browser/extensions/api/automation_internal/automation_internal_api.cc File chrome/browser/extensions/api/automation_internal/automation_internal_api.cc (right): https://codereview.chromium.org/667713006/diff/1/chrome/browser/extensions/api/automation_internal/automation_internal_api.cc#newcode179 chrome/browser/extensions/api/automation_internal/automation_internal_api.cc:179: content::RenderFrameHost::FromID(params->process_id, I think this is what we want eventually, ...
6 years, 1 month ago (2014-10-29 06:53:31 UTC) #4
David Tseng
Also, added a test to demonstrate events work across trees. On Tue 28 Oct 2014 ...
6 years, 1 month ago (2014-10-29 16:02:19 UTC) #5
David Tseng
PTAL On Tue 28 Oct 2014 11:53:30 PM PDT, dmazzoni@chromium.org wrote: > > https://codereview.chromium.org/667713006/diff/1/chrome/browser/extensions/api/automation_internal/automation_internal_api.cc > ...
6 years, 1 month ago (2014-10-29 18:14:42 UTC) #6
David Tseng
PTAL On Tue 28 Oct 2014 11:53:30 PM PDT, dmazzoni@chromium.org wrote: > > https://codereview.chromium.org/667713006/diff/1/chrome/browser/extensions/api/automation_internal/automation_internal_api.cc > ...
6 years, 1 month ago (2014-10-29 18:31:57 UTC) #7
chromium-reviews
Looking - sorry for slowness, still feeling a bit under the weather and trying to ...
6 years, 1 month ago (2014-10-29 18:47:05 UTC) #8
aboxhall
First thoughts. This is generally very exciting, but I wonder if we can do things ...
6 years, 1 month ago (2014-10-29 19:29:11 UTC) #9
David Tseng
https://codereview.chromium.org/667713006/diff/1/ui/accessibility/ax_enums.idl File ui/accessibility/ax_enums.idl (right): https://codereview.chromium.org/667713006/diff/1/ui/accessibility/ax_enums.idl#newcode299 ui/accessibility/ax_enums.idl:299: // Internal only; do not expose to platform APIs. ...
6 years, 1 month ago (2014-10-29 20:35:31 UTC) #10
aboxhall
https://codereview.chromium.org/667713006/diff/1/ui/accessibility/ax_enums.idl File ui/accessibility/ax_enums.idl (right): https://codereview.chromium.org/667713006/diff/1/ui/accessibility/ax_enums.idl#newcode299 ui/accessibility/ax_enums.idl:299: // Internal only; do not expose to platform APIs. ...
6 years, 1 month ago (2014-10-29 20:53:30 UTC) #11
David Tseng
https://codereview.chromium.org/667713006/diff/100001/chrome/renderer/resources/extensions/automation/automation_node.js File chrome/renderer/resources/extensions/automation/automation_node.js (right): https://codereview.chromium.org/667713006/diff/100001/chrome/renderer/resources/extensions/automation/automation_node.js#newcode136 chrome/renderer/resources/extensions/automation/automation_node.js:136: automationUtil.onTreeLoaded(this.processID, this.routingID, function(root) { On 2014/10/29 20:53:29, aboxhall wrote: ...
6 years, 1 month ago (2014-10-29 21:05:39 UTC) #12
David Tseng
As a general comment, I'm not sure we actually need the loaded attribute to be ...
6 years, 1 month ago (2014-10-29 21:25:05 UTC) #13
aboxhall
On 2014/10/29 21:25:05, David Tseng wrote: > As a general comment, I'm not sure we ...
6 years, 1 month ago (2014-10-29 21:31:38 UTC) #17
aboxhall
https://codereview.chromium.org/667713006/diff/100001/chrome/renderer/resources/extensions/automation/automation_node.js File chrome/renderer/resources/extensions/automation/automation_node.js (right): https://codereview.chromium.org/667713006/diff/100001/chrome/renderer/resources/extensions/automation/automation_node.js#newcode136 chrome/renderer/resources/extensions/automation/automation_node.js:136: automationUtil.onTreeLoaded(this.processID, this.routingID, function(root) { On 2014/10/29 21:05:39, David Tseng ...
6 years, 1 month ago (2014-10-29 21:33:08 UTC) #18
David Tseng
On Wed, Oct 29, 2014 at 2:31 PM, <aboxhall@chromium.org> wrote: > On 2014/10/29 21:25:05, David ...
6 years, 1 month ago (2014-10-29 21:43:44 UTC) #19
David Tseng
https://codereview.chromium.org/667713006/diff/100001/chrome/renderer/resources/extensions/automation/automation_node.js File chrome/renderer/resources/extensions/automation/automation_node.js (right): https://codereview.chromium.org/667713006/diff/100001/chrome/renderer/resources/extensions/automation/automation_node.js#newcode136 chrome/renderer/resources/extensions/automation/automation_node.js:136: automationUtil.onTreeLoaded(this.processID, this.routingID, function(root) { On 2014/10/29 21:33:08, aboxhall wrote: ...
6 years, 1 month ago (2014-10-29 21:47:48 UTC) #20
David Tseng
Taking offline :). To unsubscribe from this group and stop receiving emails from it, send ...
6 years, 1 month ago (2014-10-29 21:53:32 UTC) #21
dmazzoni
On Wed, Oct 29, 2014 at 12:29 PM, <aboxhall@chromium.org> wrote: > https://codereview.chromium.org/667713006/diff/1/ui/ > accessibility/ax_enums.idl#newcode299 > ...
6 years, 1 month ago (2014-10-29 22:17:31 UTC) #22
dmazzoni
On Wed, Oct 29, 2014 at 1:53 PM, <aboxhall@chromium.org> wrote: > I find this really ...
6 years, 1 month ago (2014-10-29 22:21:33 UTC) #23
aboxhall
David, thanks so much for exploring this. I like the look of this, but what ...
6 years, 1 month ago (2014-10-29 23:32:25 UTC) #24
aboxhall
David, thanks so much for exploring this. I like the look of this, but what ...
6 years, 1 month ago (2014-10-29 23:32:29 UTC) #25
David Tseng
Just got the tests to pass. It's a bit messier than the other strategy but ...
6 years, 1 month ago (2014-10-29 23:54:40 UTC) #26
David Tseng
On 2014/10/29 22:21:33, dmazzoni wrote: > On Wed, Oct 29, 2014 at 1:53 PM, <mailto:aboxhall@chromium.org> ...
6 years, 1 month ago (2014-10-31 16:08:57 UTC) #27
dmazzoni
https://codereview.chromium.org/667713006/diff/300001/chrome/browser/ui/ash/accessibility/ax_tree_source_ash.cc File chrome/browser/ui/ash/accessibility/ax_tree_source_ash.cc (right): https://codereview.chromium.org/667713006/diff/300001/chrome/browser/ui/ash/accessibility/ax_tree_source_ash.cc#newcode99 chrome/browser/ui/ash/accessibility/ax_tree_source_ash.cc:99: if (out_data->role == ui::AX_ROLE_GROUP) { I still think it'd ...
6 years, 1 month ago (2014-10-31 18:28:35 UTC) #28
David Tseng
PTAL. Made major changes; please take a fresh look.
6 years, 1 month ago (2014-10-31 18:43:11 UTC) #29
dmazzoni
Great! Almost there! https://codereview.chromium.org/667713006/diff/450001/chrome/test/data/extensions/api_test/automation/tests/unit/test.js File chrome/test/data/extensions/api_test/automation/tests/unit/test.js (right): https://codereview.chromium.org/667713006/diff/450001/chrome/test/data/extensions/api_test/automation/tests/unit/test.js#newcode9 chrome/test/data/extensions/api_test/automation/tests/unit/test.js:9: // Unused. Nit: indentation https://codereview.chromium.org/667713006/diff/450001/ui/accessibility/ax_tree_id_registry.h File ...
6 years, 1 month ago (2014-10-31 22:20:26 UTC) #30
David Tseng
https://codereview.chromium.org/667713006/diff/450001/chrome/test/data/extensions/api_test/automation/tests/unit/test.js File chrome/test/data/extensions/api_test/automation/tests/unit/test.js (right): https://codereview.chromium.org/667713006/diff/450001/chrome/test/data/extensions/api_test/automation/tests/unit/test.js#newcode9 chrome/test/data/extensions/api_test/automation/tests/unit/test.js:9: // Unused. On 2014/10/31 22:20:26, dmazzoni wrote: > Nit: ...
6 years, 1 month ago (2014-11-03 15:45:08 UTC) #44
David Tseng
+ kalman for automation*idl + sky for webview.cc
6 years, 1 month ago (2014-11-03 16:03:03 UTC) #46
dmazzoni
lgtm
6 years, 1 month ago (2014-11-03 16:03:57 UTC) #47
sky
webview LGTM
6 years, 1 month ago (2014-11-03 16:42:43 UTC) #48
not at google - send to devlin
extension IDLs lgtm
6 years, 1 month ago (2014-11-03 16:55:59 UTC) #49
aboxhall
Apologies for my slowness, and what may (hopefully won't) amount to another bikeshed on the ...
6 years, 1 month ago (2014-11-03 17:15:49 UTC) #50
David Tseng
https://codereview.chromium.org/667713006/diff/490001/chrome/browser/extensions/api/automation/automation_apitest.cc File chrome/browser/extensions/api/automation/automation_apitest.cc (right): https://codereview.chromium.org/667713006/diff/490001/chrome/browser/extensions/api/automation/automation_apitest.cc#newcode344 chrome/browser/extensions/api/automation/automation_apitest.cc:344: // TODO(dtseng): Need to rewrite this test in terms ...
6 years, 1 month ago (2014-11-03 19:31:53 UTC) #51
aboxhall
lgtm https://codereview.chromium.org/667713006/diff/490001/chrome/renderer/resources/extensions/automation/automation_node.js File chrome/renderer/resources/extensions/automation/automation_node.js (right): https://codereview.chromium.org/667713006/diff/490001/chrome/renderer/resources/extensions/automation/automation_node.js#newcode515 chrome/renderer/resources/extensions/automation/automation_node.js:515: automationUtil.storeTreeCallback(nodeImpl.childTreeID, function(root) { On 2014/11/03 19:31:52, David Tseng ...
6 years, 1 month ago (2014-11-03 19:40:19 UTC) #52
David Tseng
 https://codereview.chromium.org/667713006/diff/490001/chrome/test/data/extensions/api_test/automation/tests/desktop/load_tabs.js File chrome/test/data/extensions/api_test/automation/tests/desktop/load_tabs.js (right): https://codereview.chromium.org/667713006/diff/490001/chrome/test/data/extensions/api_test/automation/tests/desktop/load_tabs.js#newcode32 chrome/test/data/extensions/api_test/automation/tests/desktop/load_tabs.js:32: assertEq(evt.target, subroot.parent()); On 2014/11/03 19:40:18, aboxhall wrote: > ...
6 years, 1 month ago (2014-11-03 19:55:51 UTC) #53
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/667713006/650001
6 years, 1 month ago (2014-11-03 21:35:33 UTC) #59
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel/builds/8315)
6 years, 1 month ago (2014-11-04 16:42:53 UTC) #61
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/667713006/670001
6 years, 1 month ago (2014-11-04 18:46:14 UTC) #63
commit-bot: I haz the power
Committed patchset #17 (id:670001)
6 years, 1 month ago (2014-11-04 19:56:35 UTC) #64
commit-bot: I haz the power
6 years, 1 month ago (2014-11-04 19:57:11 UTC) #65
Message was sent while issue was closed.
Patchset 17 (id:??) landed as
https://crrev.com/ad8ae0f7f45d921efd8da77ffecbcd7253c87870
Cr-Commit-Position: refs/heads/master@{#302648}

Powered by Google App Engine
This is Rietveld 408576698