DescriptionFix 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)
|