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.
Comment 1 by bugdroid1@chromium.org
, Jun 10 2016