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

Issue 2762373002: Fix computation of Automation API location offsets in WebViews. (Closed)

Created:
3 years, 9 months ago by dmazzoni
Modified:
3 years, 8 months ago
Reviewers:
Tom Sepez, David Tseng
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix computation of Automation API location offsets in WebViews. The user-visible error here was that when ChromeVox was enabled, the orange highlight around an object was sometimes wrong when inside a <webview>, like in the new OOBE. Previously, to get the global bounds of an object, we'd figure out the global bounds relative to the top frame, then use a location offset to convert from frame-relative coordinates to global screen coordinates. This wasn't correct for WebViews, because a WebView has its own frame tree and its own location offset, so the location offset was essentially being counted twice. It turns out that now that http://crbug.com/618120 is fixed, we don't need the location offset. Instead we should just walk up from any node all the way to the desktop root node, applying offsets and transforms as we go. That way there's a single consistent way to compute global bounding boxes that's the same everywhere, with no special cases for webview. This required a small fix to GetParent() to search the desktop tree if an explicit parent tree ID wasn't found. Includes a new location test with a WebView. BUG=658947, 618120 Review-Url: https://codereview.chromium.org/2762373002 Cr-Commit-Position: refs/heads/master@{#460412} Committed: https://chromium.googlesource.com/chromium/src/+/c7c9e55f9f13ae947e938b8a4c929fefdeffe397

Patch Set 1 #

Patch Set 2 : Make test more robust #

Patch Set 3 : Rebase #

Total comments: 3

Patch Set 4 : More robust #

Patch Set 5 : Only run new test on chromeos because of required perms #

Messages

Total messages: 33 (19 generated)
dmazzoni
3 years, 9 months ago (2017-03-21 22:40:52 UTC) #2
dmazzoni
Friendly ping
3 years, 9 months ago (2017-03-23 17:07:23 UTC) #7
David Tseng
https://codereview.chromium.org/2762373002/diff/40001/chrome/renderer/extensions/automation_internal_custom_bindings.cc File chrome/renderer/extensions/automation_internal_custom_bindings.cc (left): https://codereview.chromium.org/2762373002/diff/40001/chrome/renderer/extensions/automation_internal_custom_bindings.cc#oldcode1016 chrome/renderer/extensions/automation_internal_custom_bindings.cc:1016: int parent_tree_id = (*in_out_cache)->tree.data().parent_tree_id; Can you check the js ...
3 years, 9 months ago (2017-03-23 17:58:29 UTC) #12
dmazzoni
https://codereview.chromium.org/2762373002/diff/40001/chrome/renderer/extensions/automation_internal_custom_bindings.cc File chrome/renderer/extensions/automation_internal_custom_bindings.cc (left): https://codereview.chromium.org/2762373002/diff/40001/chrome/renderer/extensions/automation_internal_custom_bindings.cc#oldcode1016 chrome/renderer/extensions/automation_internal_custom_bindings.cc:1016: int parent_tree_id = (*in_out_cache)->tree.data().parent_tree_id; On 2017/03/23 17:58:29, David Tseng ...
3 years, 9 months ago (2017-03-23 22:02:33 UTC) #13
David Tseng
lgtm https://codereview.chromium.org/2762373002/diff/40001/chrome/renderer/extensions/automation_internal_custom_bindings.cc File chrome/renderer/extensions/automation_internal_custom_bindings.cc (left): https://codereview.chromium.org/2762373002/diff/40001/chrome/renderer/extensions/automation_internal_custom_bindings.cc#oldcode1016 chrome/renderer/extensions/automation_internal_custom_bindings.cc:1016: int parent_tree_id = (*in_out_cache)->tree.data().parent_tree_id; On 2017/03/23 22:02:33, dmazzoni ...
3 years, 9 months ago (2017-03-24 21:49:07 UTC) #14
dmazzoni
On 2017/03/24 21:49:07, David Tseng wrote: > lgtm > > https://codereview.chromium.org/2762373002/diff/40001/chrome/renderer/extensions/automation_internal_custom_bindings.cc > File chrome/renderer/extensions/automation_internal_custom_bindings.cc (left): ...
3 years, 9 months ago (2017-03-27 17:33:27 UTC) #15
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/2762373002/60001
3 years, 9 months ago (2017-03-27 17:34:40 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/395452)
3 years, 9 months ago (2017-03-27 17:44:56 UTC) #20
dmazzoni
+tsepez for chrome_extension_messages
3 years, 8 months ago (2017-03-28 17:33:47 UTC) #22
Tom Sepez
lgtm
3 years, 8 months ago (2017-03-28 17:49:54 UTC) #23
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/2762373002/80001
3 years, 8 months ago (2017-03-29 06:24:40 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/393890)
3 years, 8 months ago (2017-03-29 07:04:41 UTC) #28
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/2762373002/80001
3 years, 8 months ago (2017-03-29 15:17:38 UTC) #30
commit-bot: I haz the power
3 years, 8 months ago (2017-03-29 16:22:42 UTC) #33
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/c7c9e55f9f13ae947e938b8a4c92...

Powered by Google App Engine
This is Rietveld 408576698