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

Unified Diff: third_party/WebKit/public/web/WebAXObject.h

Issue 2047873002: Add interface to get relative bounding box rect of AX objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedback from aboxhall, add aria-owns test Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/web/WebAXObject.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/public/web/WebAXObject.h
diff --git a/third_party/WebKit/public/web/WebAXObject.h b/third_party/WebKit/public/web/WebAXObject.h
index 124f6ceffebbd699ebd7583d52a1e35aa35bb10a..afb2bb5a81d0f682783632675f1d0d4fd016b77e 100644
--- a/third_party/WebKit/public/web/WebAXObject.h
+++ b/third_party/WebKit/public/web/WebAXObject.h
@@ -53,6 +53,7 @@ class WebNode;
class WebDocument;
class WebString;
class WebURL;
+struct WebFloatRect;
struct WebPoint;
struct WebRect;
@@ -144,7 +145,6 @@ public:
BLINK_EXPORT bool isMultiline() const;
BLINK_EXPORT bool isRichlyEditable() const;
BLINK_EXPORT bool ariaOwns(WebVector<WebAXObject>& ownsElements) const;
- BLINK_EXPORT WebRect boundingBoxRect() const;
BLINK_EXPORT WebString fontFamily() const;
BLINK_EXPORT float fontSize() const;
BLINK_EXPORT bool canvasHasFallbackContent() const;
@@ -289,7 +289,21 @@ public:
BLINK_EXPORT WebPoint maximumScrollOffset() const;
BLINK_EXPORT void setScrollOffset(const WebPoint&) const;
+ // Old bounds calculation interface. DEPRECATED, to be replaced with getRelativeBounds.
+ BLINK_EXPORT WebRect boundingBoxRect() const;
+
+ // NEW bounds calculation interface. Every object's bounding box is returned
+ // relative to a container object (which is guaranteed to be an ancestor) and
+ // optionally a transformation matrix that needs to be applied too.
+ // To compute the absolute bounding box of an element, start with its
+ // boundsInContainer and apply the transform. Then as long as its container is
+ // not null, walk up to its container and offset by the container's offset from
+ // origin, the container's scroll position if any, and apply the container's transform.
+ // Do this until you reach the root of the tree.
+ BLINK_EXPORT void getRelativeBounds(WebAXObject& offsetContainer, WebFloatRect& boundsInContainer, SkMatrix44& containerTransform) const;
+
// Transformation relative to the parent frame, if local (otherwise returns identity).
+ // DEPRECATED, to be replaced with getRelativeBounds.
BLINK_EXPORT SkMatrix44 transformFromLocalParentFrame() const;
// Make this object visible by scrolling as many nested scrollable views as needed.
« no previous file with comments | « third_party/WebKit/Source/web/WebAXObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698