New issue
Advanced search Search tips

Issue 618120 link

Starred by 0 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2016
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug

Blocking:
issue 403200
issue 459381
issue 631923



Sign in to add a comment

Accessibility object bounding rects should be relative coordinates and transforms

Project Member Reported by dmazz...@chromium.org, Jun 7 2016

Issue description

Currently accessibility bounding box rects are absolute coordinates within their frames. There are several downsides to this approach:

* We have to handle nontrivial frame offsets specially, i.e. when an iframe has a CSS transformation on it.
* When part of a page scrolls (but not the whole page) we have to recompute the bounding box of the whole subtree that scrolled, because their coordinates were frame-relative rather than relative to their scroll container
* Similarly CSS animation and transforms requires recomputing bounding boxes, which is expensive and results in a large IPC from the renderer

To fix it, instead of an absolute frame-relative bounding box, each AXObject from Blink will report:

* Its "container" (which can be any ancestor, but typically an ancestor that scrolls or has a paint layer for some other reason)
* Its bounding box relative to its container
* Optionally, its matrix transform relative to its container

To compute the absolute bounding box of an object, the client just needs to walk up the "container" chain recursively, applying bounding box offsets and matrix transforms.

This will help performance on slower systems like Android, especially when scrolling portions of a large webpage when the whole page doesn't scrole.

 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 10 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e51c64c415fe268350cb451e4678284ae5c8433f

commit e51c64c415fe268350cb451e4678284ae5c8433f
Author: dmazzoni <dmazzoni@chromium.org>
Date: Fri Jun 10 18:11:12 2016

Add interface to get relative bounding box rect of AX objects.

Currently accessibility bounding box rects are absolute coordinates
within their frames. This means we have to recompute the bounding box
of every AX object when part of the page scrolls or animates.

To improve efficiency, this patch adds a new interface that returns
the relative bounds of an object, consisting of three pieces:

* Its "container" (an ancestor that scrolls or has a paint layer)
* Its bounding box relative to its container
* Optionally, its matrix transform relative to its container

This patch just implements the new interface and tests it.
Adds test_runner interfaces to access this interface at a
low level (relative bounds) and high level (computed bounds)
plus interfaces for accessing the scroll position.
This will be followed up with a patch to use this interface instead
throughout the rest of Chrome, and then delete the old interface.

BUG= 618120 

Review-Url: https://codereview.chromium.org/2047873002
Cr-Commit-Position: refs/heads/master@{#399230}

[modify] https://crrev.com/e51c64c415fe268350cb451e4678284ae5c8433f/components/test_runner/web_ax_object_proxy.cc
[modify] https://crrev.com/e51c64c415fe268350cb451e4678284ae5c8433f/components/test_runner/web_ax_object_proxy.h
[add] https://crrev.com/e51c64c415fe268350cb451e4678284ae5c8433f/third_party/WebKit/LayoutTests/accessibility/bounds-calc.html
[modify] https://crrev.com/e51c64c415fe268350cb451e4678284ae5c8433f/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp
[modify] https://crrev.com/e51c64c415fe268350cb451e4678284ae5c8433f/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.h
[modify] https://crrev.com/e51c64c415fe268350cb451e4678284ae5c8433f/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
[modify] https://crrev.com/e51c64c415fe268350cb451e4678284ae5c8433f/third_party/WebKit/Source/modules/accessibility/AXObject.h
[modify] https://crrev.com/e51c64c415fe268350cb451e4678284ae5c8433f/third_party/WebKit/Source/web/WebAXObject.cpp
[modify] https://crrev.com/e51c64c415fe268350cb451e4678284ae5c8433f/third_party/WebKit/public/web/WebAXObject.h

Project Member

Comment 2 by bugdroid1@chromium.org, Jun 15 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e51c64c415fe268350cb451e4678284ae5c8433f

commit e51c64c415fe268350cb451e4678284ae5c8433f
Author: dmazzoni <dmazzoni@chromium.org>
Date: Fri Jun 10 18:11:12 2016

Add interface to get relative bounding box rect of AX objects.

Currently accessibility bounding box rects are absolute coordinates
within their frames. This means we have to recompute the bounding box
of every AX object when part of the page scrolls or animates.

To improve efficiency, this patch adds a new interface that returns
the relative bounds of an object, consisting of three pieces:

* Its "container" (an ancestor that scrolls or has a paint layer)
* Its bounding box relative to its container
* Optionally, its matrix transform relative to its container

This patch just implements the new interface and tests it.
Adds test_runner interfaces to access this interface at a
low level (relative bounds) and high level (computed bounds)
plus interfaces for accessing the scroll position.
This will be followed up with a patch to use this interface instead
throughout the rest of Chrome, and then delete the old interface.

BUG= 618120 

Review-Url: https://codereview.chromium.org/2047873002
Cr-Commit-Position: refs/heads/master@{#399230}

[modify] https://crrev.com/e51c64c415fe268350cb451e4678284ae5c8433f/components/test_runner/web_ax_object_proxy.cc
[modify] https://crrev.com/e51c64c415fe268350cb451e4678284ae5c8433f/components/test_runner/web_ax_object_proxy.h
[add] https://crrev.com/e51c64c415fe268350cb451e4678284ae5c8433f/third_party/WebKit/LayoutTests/accessibility/bounds-calc.html
[modify] https://crrev.com/e51c64c415fe268350cb451e4678284ae5c8433f/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp
[modify] https://crrev.com/e51c64c415fe268350cb451e4678284ae5c8433f/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.h
[modify] https://crrev.com/e51c64c415fe268350cb451e4678284ae5c8433f/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
[modify] https://crrev.com/e51c64c415fe268350cb451e4678284ae5c8433f/third_party/WebKit/Source/modules/accessibility/AXObject.h
[modify] https://crrev.com/e51c64c415fe268350cb451e4678284ae5c8433f/third_party/WebKit/Source/web/WebAXObject.cpp
[modify] https://crrev.com/e51c64c415fe268350cb451e4678284ae5c8433f/third_party/WebKit/public/web/WebAXObject.h

Project Member

Comment 3 by bugdroid1@chromium.org, Jun 16 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a84253852b14fb4089913834b5af83634eaac2a0

commit a84253852b14fb4089913834b5af83634eaac2a0
Author: dmazzoni <dmazzoni@chromium.org>
Date: Thu Jun 16 18:12:12 2016

Accessibility objects with layers shouldn't be ignored.

This is a companion to http://crrev.com/2047873002/
that makes it possible to express AX object bounds
relative to paint containers. We don't want to ignore
an accessibility object if it's a paint container
that might be useful for those relative bounds.

BUG= 618120 
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2052783002
Cr-Commit-Position: refs/heads/master@{#400206}

[modify] https://crrev.com/a84253852b14fb4089913834b5af83634eaac2a0/chrome/browser/resources/chromeos/chromevox/cvox2/background/output_test.extjs
[modify] https://crrev.com/a84253852b14fb4089913834b5af83634eaac2a0/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp

Project Member

Comment 4 by sheriffbot@chromium.org, Jul 6 2016

Labels: -M-53 M-54 MovedFrom-53
Moving this nonessential bug to the next milestone.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 5 by bugdroid1@chromium.org, Jul 21 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7535c4d868bff31a671bfe956c08cf3a7c381109

commit 7535c4d868bff31a671bfe956c08cf3a7c381109
Author: dmazzoni <dmazzoni@chromium.org>
Date: Thu Jul 21 22:12:39 2016

Replace gfx::Rect with gfx::RectF in ui::AXNodeData

This is a mechanical change to switch to using floating-point rects internally
for accessible bounding boxes.  In cases where we need to convert back to
a gfx::Rect, we use gfx::ToEnclosingRect.

This change is necessary so that in the future we can use relative
bounding boxes and transformation matrices in the accessibility tree.
In isolation this change should have no effect except that objects might
be off by one pixel due to differences in when rounding happens.

BUG= 618120 

Review-Url: https://codereview.chromium.org/2154213007
Cr-Commit-Position: refs/heads/master@{#406963}

[modify] https://crrev.com/7535c4d868bff31a671bfe956c08cf3a7c381109/chrome/renderer/extensions/automation_internal_custom_bindings.cc
[modify] https://crrev.com/7535c4d868bff31a671bfe956c08cf3a7c381109/components/pdf/renderer/pdf_accessibility_tree.cc
[modify] https://crrev.com/7535c4d868bff31a671bfe956c08cf3a7c381109/content/browser/accessibility/accessibility_tree_formatter_blink.cc
[modify] https://crrev.com/7535c4d868bff31a671bfe956c08cf3a7c381109/content/browser/accessibility/browser_accessibility.cc
[modify] https://crrev.com/7535c4d868bff31a671bfe956c08cf3a7c381109/content/browser/accessibility/browser_accessibility_manager_unittest.cc
[modify] https://crrev.com/7535c4d868bff31a671bfe956c08cf3a7c381109/content/common/accessibility_messages.h
[modify] https://crrev.com/7535c4d868bff31a671bfe956c08cf3a7c381109/content/renderer/accessibility/blink_ax_tree_source.cc
[modify] https://crrev.com/7535c4d868bff31a671bfe956c08cf3a7c381109/content/renderer/accessibility/render_accessibility_impl.cc
[modify] https://crrev.com/7535c4d868bff31a671bfe956c08cf3a7c381109/content/renderer/accessibility/render_accessibility_impl.h
[modify] https://crrev.com/7535c4d868bff31a671bfe956c08cf3a7c381109/ui/accessibility/ax_node.cc
[modify] https://crrev.com/7535c4d868bff31a671bfe956c08cf3a7c381109/ui/accessibility/ax_node.h
[modify] https://crrev.com/7535c4d868bff31a671bfe956c08cf3a7c381109/ui/accessibility/ax_node_data.h
[modify] https://crrev.com/7535c4d868bff31a671bfe956c08cf3a7c381109/ui/accessibility/ax_tree_combiner.cc
[modify] https://crrev.com/7535c4d868bff31a671bfe956c08cf3a7c381109/ui/accessibility/ax_tree_combiner_unittest.cc
[modify] https://crrev.com/7535c4d868bff31a671bfe956c08cf3a7c381109/ui/accessibility/ax_tree_unittest.cc
[modify] https://crrev.com/7535c4d868bff31a671bfe956c08cf3a7c381109/ui/accessibility/platform/ax_platform_node_auralinux.cc
[modify] https://crrev.com/7535c4d868bff31a671bfe956c08cf3a7c381109/ui/accessibility/platform/ax_platform_node_base.cc
[modify] https://crrev.com/7535c4d868bff31a671bfe956c08cf3a7c381109/ui/accessibility/platform/ax_platform_node_win.cc
[modify] https://crrev.com/7535c4d868bff31a671bfe956c08cf3a7c381109/ui/accessibility/platform/ax_platform_node_win_unittest.cc
[modify] https://crrev.com/7535c4d868bff31a671bfe956c08cf3a7c381109/ui/views/accessibility/ax_view_obj_wrapper.cc
[modify] https://crrev.com/7535c4d868bff31a671bfe956c08cf3a7c381109/ui/views/accessibility/ax_widget_obj_wrapper.cc
[modify] https://crrev.com/7535c4d868bff31a671bfe956c08cf3a7c381109/ui/views/accessibility/ax_window_obj_wrapper.cc
[modify] https://crrev.com/7535c4d868bff31a671bfe956c08cf3a7c381109/ui/views/accessibility/native_view_accessibility.cc
[modify] https://crrev.com/7535c4d868bff31a671bfe956c08cf3a7c381109/ui/views/accessibility/native_view_accessibility_unittest.cc

Project Member

Comment 6 by bugdroid1@chromium.org, Aug 1 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ff627eb09af66b38346b18b03591e07ae9e0f41a

commit ff627eb09af66b38346b18b03591e07ae9e0f41a
Author: dmazzoni <dmazzoni@chromium.org>
Date: Mon Aug 01 22:38:13 2016

Switch all LayoutTests to use new accessibility relative bounding box API.

This change switches test_runner to use only the new relative bounding box
API to get bounding boxes of accessibility elements.

I made a few fixes in order to get existing tests to pass:

* Support explicit element rects inside a canvas
* Implement bounding boxes for inline text boxes
* Bounding box for LayoutText needs to clip to ellipses
* Bounding box for LayoutInline needs to include continuations

The next step will be to switch Chrome to use the new API, then we can
delete the old bounding box code from blink.

BUG= 618120 

Review-Url: https://codereview.chromium.org/2169273004
Cr-Commit-Position: refs/heads/master@{#409079}

[modify] https://crrev.com/ff627eb09af66b38346b18b03591e07ae9e0f41a/components/test_runner/web_ax_object_proxy.cc
[modify] https://crrev.com/ff627eb09af66b38346b18b03591e07ae9e0f41a/third_party/WebKit/LayoutTests/accessibility/bounds-calc.html
[modify] https://crrev.com/ff627eb09af66b38346b18b03591e07ae9e0f41a/third_party/WebKit/LayoutTests/accessibility/dimensions-include-descendants.html
[modify] https://crrev.com/ff627eb09af66b38346b18b03591e07ae9e0f41a/third_party/WebKit/LayoutTests/accessibility/draw-focus-if-needed-expected.txt
[modify] https://crrev.com/ff627eb09af66b38346b18b03591e07ae9e0f41a/third_party/WebKit/LayoutTests/accessibility/draw-focus-if-needed.html
[modify] https://crrev.com/ff627eb09af66b38346b18b03591e07ae9e0f41a/third_party/WebKit/LayoutTests/accessibility/svg-bounds-expected.txt
[modify] https://crrev.com/ff627eb09af66b38346b18b03591e07ae9e0f41a/third_party/WebKit/LayoutTests/accessibility/svg-bounds.html
[modify] https://crrev.com/ff627eb09af66b38346b18b03591e07ae9e0f41a/third_party/WebKit/LayoutTests/fast/canvas/canvas-hit-regions-accessibility-test-expected.txt
[modify] https://crrev.com/ff627eb09af66b38346b18b03591e07ae9e0f41a/third_party/WebKit/LayoutTests/fast/canvas/canvas-hit-regions-accessibility-test.html
[modify] https://crrev.com/ff627eb09af66b38346b18b03591e07ae9e0f41a/third_party/WebKit/Source/core/dom/AXObjectCache.h
[modify] https://crrev.com/ff627eb09af66b38346b18b03591e07ae9e0f41a/third_party/WebKit/Source/core/layout/LayoutText.cpp
[modify] https://crrev.com/ff627eb09af66b38346b18b03591e07ae9e0f41a/third_party/WebKit/Source/core/layout/LayoutText.h
[modify] https://crrev.com/ff627eb09af66b38346b18b03591e07ae9e0f41a/third_party/WebKit/Source/core/layout/line/AbstractInlineTextBox.cpp
[modify] https://crrev.com/ff627eb09af66b38346b18b03591e07ae9e0f41a/third_party/WebKit/Source/core/layout/line/AbstractInlineTextBox.h
[modify] https://crrev.com/ff627eb09af66b38346b18b03591e07ae9e0f41a/third_party/WebKit/Source/modules/accessibility/AXInlineTextBox.cpp
[modify] https://crrev.com/ff627eb09af66b38346b18b03591e07ae9e0f41a/third_party/WebKit/Source/modules/accessibility/AXInlineTextBox.h
[modify] https://crrev.com/ff627eb09af66b38346b18b03591e07ae9e0f41a/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp
[modify] https://crrev.com/ff627eb09af66b38346b18b03591e07ae9e0f41a/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.h
[modify] https://crrev.com/ff627eb09af66b38346b18b03591e07ae9e0f41a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
[modify] https://crrev.com/ff627eb09af66b38346b18b03591e07ae9e0f41a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.h
[modify] https://crrev.com/ff627eb09af66b38346b18b03591e07ae9e0f41a/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
[modify] https://crrev.com/ff627eb09af66b38346b18b03591e07ae9e0f41a/third_party/WebKit/Source/modules/accessibility/AXObject.h
[modify] https://crrev.com/ff627eb09af66b38346b18b03591e07ae9e0f41a/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp
[modify] https://crrev.com/ff627eb09af66b38346b18b03591e07ae9e0f41a/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.h
[modify] https://crrev.com/ff627eb09af66b38346b18b03591e07ae9e0f41a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
[modify] https://crrev.com/ff627eb09af66b38346b18b03591e07ae9e0f41a/third_party/WebKit/Source/platform/geometry/FloatRect.h

Blocking: 631923
Project Member

Comment 8 by bugdroid1@chromium.org, Aug 15 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/051715aa0384587adcb0614e5404720ad75757ca

commit 051715aa0384587adcb0614e5404720ad75757ca
Author: dmazzoni <dmazzoni@chromium.org>
Date: Mon Aug 15 21:36:58 2016

Use relative bounding boxes throughout Chrome accessibility

After a series of changes that added support in Blink for relative bounding
boxes for accessible objects, this change switches all of the code in Chrome
to use these relative bounding boxes.

This significantly cleans up the code to convert from local to global
coordinates. Instead of a complicated loop with lots of special cases
for things like out-of-process iframes, it's now a pretty straightforward
process of walking up the tree and applying offsets and transforms.

After this change lands successfully, we can delete the old absolute bounds
computation code from Blink.

BUG= 618120 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2217363002
Cr-Commit-Position: refs/heads/master@{#412054}

[modify] https://crrev.com/051715aa0384587adcb0614e5404720ad75757ca/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs
[modify] https://crrev.com/051715aa0384587adcb0614e5404720ad75757ca/chrome/common/extensions/chrome_extension_messages.h
[modify] https://crrev.com/051715aa0384587adcb0614e5404720ad75757ca/chrome/renderer/extensions/automation_internal_custom_bindings.cc
[modify] https://crrev.com/051715aa0384587adcb0614e5404720ad75757ca/content/browser/accessibility/accessibility_tree_formatter_blink.cc
[modify] https://crrev.com/051715aa0384587adcb0614e5404720ad75757ca/content/browser/accessibility/browser_accessibility.cc
[modify] https://crrev.com/051715aa0384587adcb0614e5404720ad75757ca/content/browser/accessibility/browser_accessibility.h
[modify] https://crrev.com/051715aa0384587adcb0614e5404720ad75757ca/content/browser/accessibility/browser_accessibility_android.cc
[modify] https://crrev.com/051715aa0384587adcb0614e5404720ad75757ca/content/browser/accessibility/browser_accessibility_auralinux.cc
[modify] https://crrev.com/051715aa0384587adcb0614e5404720ad75757ca/content/browser/accessibility/browser_accessibility_cocoa.mm
[modify] https://crrev.com/051715aa0384587adcb0614e5404720ad75757ca/content/browser/accessibility/browser_accessibility_manager.cc
[modify] https://crrev.com/051715aa0384587adcb0614e5404720ad75757ca/content/browser/accessibility/browser_accessibility_manager.h
[modify] https://crrev.com/051715aa0384587adcb0614e5404720ad75757ca/content/browser/accessibility/browser_accessibility_manager_android.cc
[modify] https://crrev.com/051715aa0384587adcb0614e5404720ad75757ca/content/browser/accessibility/browser_accessibility_manager_unittest.cc
[modify] https://crrev.com/051715aa0384587adcb0614e5404720ad75757ca/content/browser/accessibility/browser_accessibility_win.cc
[modify] https://crrev.com/051715aa0384587adcb0614e5404720ad75757ca/content/browser/web_contents/web_contents_android.cc
[modify] https://crrev.com/051715aa0384587adcb0614e5404720ad75757ca/content/common/accessibility_messages.h
[modify] https://crrev.com/051715aa0384587adcb0614e5404720ad75757ca/content/renderer/accessibility/blink_ax_tree_source.cc
[modify] https://crrev.com/051715aa0384587adcb0614e5404720ad75757ca/content/renderer/accessibility/render_accessibility_impl.cc
[modify] https://crrev.com/051715aa0384587adcb0614e5404720ad75757ca/content/renderer/accessibility/render_accessibility_impl.h
[modify] https://crrev.com/051715aa0384587adcb0614e5404720ad75757ca/content/test/data/accessibility/html/iframe-transform-cross-process-expected-blink.txt
[modify] https://crrev.com/051715aa0384587adcb0614e5404720ad75757ca/content/test/data/accessibility/html/iframe-transform-expected-blink.txt
[modify] https://crrev.com/051715aa0384587adcb0614e5404720ad75757ca/content/test/data/accessibility/html/iframe-transform-nested-cross-process-expected-blink.txt
[modify] https://crrev.com/051715aa0384587adcb0614e5404720ad75757ca/content/test/data/accessibility/html/iframe-transform-nested-expected-blink.txt
[modify] https://crrev.com/051715aa0384587adcb0614e5404720ad75757ca/content/test/data/accessibility/html/iframe-transform-scrolled-expected-blink.txt
[modify] https://crrev.com/051715aa0384587adcb0614e5404720ad75757ca/ui/accessibility/BUILD.gn
[modify] https://crrev.com/051715aa0384587adcb0614e5404720ad75757ca/ui/accessibility/accessibility.gyp
[modify] https://crrev.com/051715aa0384587adcb0614e5404720ad75757ca/ui/accessibility/ax_node.cc
[modify] https://crrev.com/051715aa0384587adcb0614e5404720ad75757ca/ui/accessibility/ax_node.h
[modify] https://crrev.com/051715aa0384587adcb0614e5404720ad75757ca/ui/accessibility/ax_node_data.cc
[modify] https://crrev.com/051715aa0384587adcb0614e5404720ad75757ca/ui/accessibility/ax_node_data.h
[add] https://crrev.com/051715aa0384587adcb0614e5404720ad75757ca/ui/accessibility/ax_relative_bounds.cc
[add] https://crrev.com/051715aa0384587adcb0614e5404720ad75757ca/ui/accessibility/ax_relative_bounds.h
[modify] https://crrev.com/051715aa0384587adcb0614e5404720ad75757ca/ui/accessibility/ax_tree_combiner.cc

Project Member

Comment 9 by bugdroid1@chromium.org, Aug 30 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d748f22c6fa57ce44370686d816500f8cc9cb2aa

commit d748f22c6fa57ce44370686d816500f8cc9cb2aa
Author: dmazzoni <dmazzoni@chromium.org>
Date: Tue Aug 30 22:05:37 2016

Clean up: Accessibility no longer needs site instance or transforms

For a while, BrowserAccessibilityManager needed a way to check whether
two frames were in the same site instance, and transform a frame's
coordinates from frame-relative coordinates to page-relative coordinates
if not.

These APIs are no longer necessary because that information is now
captured in the accessibility tree. See bug for details.

This change just deletes code that's now unused.

BUG= 618120 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation

Review-Url: https://codereview.chromium.org/2279413002
Cr-Commit-Position: refs/heads/master@{#415451}

[modify] https://crrev.com/d748f22c6fa57ce44370686d816500f8cc9cb2aa/content/browser/accessibility/browser_accessibility_manager.h
[modify] https://crrev.com/d748f22c6fa57ce44370686d816500f8cc9cb2aa/content/browser/accessibility/browser_accessibility_manager_unittest.cc
[modify] https://crrev.com/d748f22c6fa57ce44370686d816500f8cc9cb2aa/content/browser/frame_host/render_frame_host_impl.cc
[modify] https://crrev.com/d748f22c6fa57ce44370686d816500f8cc9cb2aa/content/browser/frame_host/render_frame_host_impl.h

Status: Fixed (was: Started)
This work is done, marking the bug as fixed.

Any new bugs or regressions found should get their own bug rather than piling onto this one.

Project Member

Comment 11 by bugdroid1@chromium.org, Sep 7 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1da67644e2628c06055962acb243c3c058b68c20

commit 1da67644e2628c06055962acb243c3c058b68c20
Author: dmazzoni <dmazzoni@chromium.org>
Date: Wed Sep 07 19:34:21 2016

Get rid of remaining uses of AXObject::elementRect

This change is mostly refactoring and deleting with just a bit of new code.

There were a few places we were still using AXObject::elementRect inside of
Blink. Fix those and replace them with the new AXObject::getRelativeBounds or
a new function AXObject::getBoundsInFrameCoordinates for cases where we do
need absolute frame-relative coordates.

There were a few subclasses of AXMockObject that didn't support
getRelativeBounds yet but weren't migrated earlier because they had no
test coverage for their bounding rects. Fix those and add new tests to
cover them.

To make it easier to implement those, I moved the implementation of
getRelativeBounds from AXLayoutObject to AXObject, and made it dependent
on a new protected virtual method layoutObjectForRelativeBounds().
If a subclass of AXObject wants its bounds computed all it needs to
do is implement layoutObjectForRelativeBounds() and the rest is done
for it.

BUG= 618120 

Review-Url: https://codereview.chromium.org/2287433003
Cr-Commit-Position: refs/heads/master@{#417028}

[modify] https://crrev.com/1da67644e2628c06055962acb243c3c058b68c20/components/test_runner/web_ax_object_proxy.cc
[add] https://crrev.com/1da67644e2628c06055962acb243c3c058b68c20/third_party/WebKit/LayoutTests/accessibility/image-map-bounds.html
[add] https://crrev.com/1da67644e2628c06055962acb243c3c058b68c20/third_party/WebKit/LayoutTests/accessibility/slider-thumb-bounds.html
[add] https://crrev.com/1da67644e2628c06055962acb243c3c058b68c20/third_party/WebKit/LayoutTests/accessibility/spin-button-bounds.html
[modify] https://crrev.com/1da67644e2628c06055962acb243c3c058b68c20/third_party/WebKit/LayoutTests/accessibility/svg-bounds-expected.txt
[modify] https://crrev.com/1da67644e2628c06055962acb243c3c058b68c20/third_party/WebKit/Source/core/layout/line/AbstractInlineTextBox.cpp
[modify] https://crrev.com/1da67644e2628c06055962acb243c3c058b68c20/third_party/WebKit/Source/core/layout/line/AbstractInlineTextBox.h
[modify] https://crrev.com/1da67644e2628c06055962acb243c3c058b68c20/third_party/WebKit/Source/modules/accessibility/AXImageMapLink.cpp
[modify] https://crrev.com/1da67644e2628c06055962acb243c3c058b68c20/third_party/WebKit/Source/modules/accessibility/AXImageMapLink.h
[modify] https://crrev.com/1da67644e2628c06055962acb243c3c058b68c20/third_party/WebKit/Source/modules/accessibility/AXInlineTextBox.cpp
[modify] https://crrev.com/1da67644e2628c06055962acb243c3c058b68c20/third_party/WebKit/Source/modules/accessibility/AXInlineTextBox.h
[modify] https://crrev.com/1da67644e2628c06055962acb243c3c058b68c20/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp
[modify] https://crrev.com/1da67644e2628c06055962acb243c3c058b68c20/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.h
[modify] https://crrev.com/1da67644e2628c06055962acb243c3c058b68c20/third_party/WebKit/Source/modules/accessibility/AXMenuListOption.cpp
[modify] https://crrev.com/1da67644e2628c06055962acb243c3c058b68c20/third_party/WebKit/Source/modules/accessibility/AXMenuListOption.h
[modify] https://crrev.com/1da67644e2628c06055962acb243c3c058b68c20/third_party/WebKit/Source/modules/accessibility/AXMenuListPopup.h
[modify] https://crrev.com/1da67644e2628c06055962acb243c3c058b68c20/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
[modify] https://crrev.com/1da67644e2628c06055962acb243c3c058b68c20/third_party/WebKit/Source/modules/accessibility/AXNodeObject.h
[modify] https://crrev.com/1da67644e2628c06055962acb243c3c058b68c20/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
[modify] https://crrev.com/1da67644e2628c06055962acb243c3c058b68c20/third_party/WebKit/Source/modules/accessibility/AXObject.h
[modify] https://crrev.com/1da67644e2628c06055962acb243c3c058b68c20/third_party/WebKit/Source/modules/accessibility/AXSlider.cpp
[modify] https://crrev.com/1da67644e2628c06055962acb243c3c058b68c20/third_party/WebKit/Source/modules/accessibility/AXSlider.h
[modify] https://crrev.com/1da67644e2628c06055962acb243c3c058b68c20/third_party/WebKit/Source/modules/accessibility/AXSpinButton.cpp
[modify] https://crrev.com/1da67644e2628c06055962acb243c3c058b68c20/third_party/WebKit/Source/modules/accessibility/AXSpinButton.h
[modify] https://crrev.com/1da67644e2628c06055962acb243c3c058b68c20/third_party/WebKit/Source/modules/accessibility/AXTableColumn.cpp
[modify] https://crrev.com/1da67644e2628c06055962acb243c3c058b68c20/third_party/WebKit/Source/modules/accessibility/AXTableColumn.h
[modify] https://crrev.com/1da67644e2628c06055962acb243c3c058b68c20/third_party/WebKit/Source/modules/accessibility/AXTableHeaderContainer.cpp
[modify] https://crrev.com/1da67644e2628c06055962acb243c3c058b68c20/third_party/WebKit/Source/modules/accessibility/AXTableHeaderContainer.h
[modify] https://crrev.com/1da67644e2628c06055962acb243c3c058b68c20/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DAPITest.cpp
[modify] https://crrev.com/1da67644e2628c06055962acb243c3c058b68c20/third_party/WebKit/Source/web/WebAXObject.cpp
[modify] https://crrev.com/1da67644e2628c06055962acb243c3c058b68c20/third_party/WebKit/public/web/WebAXObject.h

Project Member

Comment 12 by bugdroid1@chromium.org, Sep 10 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/64a061448438227cdd16d73d4d6944de6c5ddfd7

commit 64a061448438227cdd16d73d4d6944de6c5ddfd7
Author: dmazzoni <dmazzoni@chromium.org>
Date: Sat Sep 10 00:21:09 2016

Move AX local bounding box calculation into LayoutObject

Minor refactoring. Now that we've successfully switched
to using relative bounding boxes in the accessibility tree,
it's cleaner to have AXObject call a single interface on
LayoutObject rather than calling different code depending
on the type of LayoutObject.

This will also help ensure this doesn't break the next
time the layout code is refactored.

This is covered by existing tests, in particular
accessibility/bounds-calc.html tests a few examples of each
of the four types of LayoutObject that need to implement
this method.

BUG= 618120 

Review-Url: https://codereview.chromium.org/2324603002
Cr-Commit-Position: refs/heads/master@{#417775}

[modify] https://crrev.com/64a061448438227cdd16d73d4d6944de6c5ddfd7/third_party/WebKit/Source/core/animation/CompositorAnimationsTest.cpp
[modify] https://crrev.com/64a061448438227cdd16d73d4d6944de6c5ddfd7/third_party/WebKit/Source/core/layout/LayoutBox.cpp
[modify] https://crrev.com/64a061448438227cdd16d73d4d6944de6c5ddfd7/third_party/WebKit/Source/core/layout/LayoutBox.h
[modify] https://crrev.com/64a061448438227cdd16d73d4d6944de6c5ddfd7/third_party/WebKit/Source/core/layout/LayoutInline.cpp
[modify] https://crrev.com/64a061448438227cdd16d73d4d6944de6c5ddfd7/third_party/WebKit/Source/core/layout/LayoutInline.h
[modify] https://crrev.com/64a061448438227cdd16d73d4d6944de6c5ddfd7/third_party/WebKit/Source/core/layout/LayoutObject.h
[modify] https://crrev.com/64a061448438227cdd16d73d4d6944de6c5ddfd7/third_party/WebKit/Source/core/layout/LayoutText.cpp
[modify] https://crrev.com/64a061448438227cdd16d73d4d6944de6c5ddfd7/third_party/WebKit/Source/core/layout/LayoutText.h
[modify] https://crrev.com/64a061448438227cdd16d73d4d6944de6c5ddfd7/third_party/WebKit/Source/core/layout/svg/LayoutSVGGradientStop.h
[modify] https://crrev.com/64a061448438227cdd16d73d4d6944de6c5ddfd7/third_party/WebKit/Source/core/layout/svg/LayoutSVGModelObject.cpp
[modify] https://crrev.com/64a061448438227cdd16d73d4d6944de6c5ddfd7/third_party/WebKit/Source/core/layout/svg/LayoutSVGModelObject.h
[modify] https://crrev.com/64a061448438227cdd16d73d4d6944de6c5ddfd7/third_party/WebKit/Source/modules/accessibility/AXObject.cpp

Project Member

Comment 13 by bugdroid1@chromium.org, Mar 29 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c7c9e55f9f13ae947e938b8a4c929fefdeffe397

commit c7c9e55f9f13ae947e938b8a4c929fefdeffe397
Author: dmazzoni <dmazzoni@chromium.org>
Date: Wed Mar 29 16:21:49 2017

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}

[modify] https://crrev.com/c7c9e55f9f13ae947e938b8a4c929fefdeffe397/chrome/browser/extensions/api/automation/automation_apitest.cc
[modify] https://crrev.com/c7c9e55f9f13ae947e938b8a4c929fefdeffe397/chrome/browser/extensions/api/automation_internal/automation_internal_api.cc
[modify] https://crrev.com/c7c9e55f9f13ae947e938b8a4c929fefdeffe397/chrome/common/extensions/chrome_extension_messages.h
[modify] https://crrev.com/c7c9e55f9f13ae947e938b8a4c929fefdeffe397/chrome/renderer/extensions/automation_internal_custom_bindings.cc
[modify] https://crrev.com/c7c9e55f9f13ae947e938b8a4c929fefdeffe397/chrome/renderer/extensions/automation_internal_custom_bindings.h
[add] https://crrev.com/c7c9e55f9f13ae947e938b8a4c929fefdeffe397/chrome/test/data/extensions/api_test/automation/tests/webview/location_in_webview.js
[add] https://crrev.com/c7c9e55f9f13ae947e938b8a4c929fefdeffe397/chrome/test/data/extensions/api_test/automation/tests/webview/manifest.json
[add] https://crrev.com/c7c9e55f9f13ae947e938b8a4c929fefdeffe397/chrome/test/data/extensions/api_test/automation/tests/webview/webview_frame.html

Blocking: -578679

Sign in to add a comment