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

Unified Diff: third_party/WebKit/Source/web/WebAXObject.cpp

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
Index: third_party/WebKit/Source/web/WebAXObject.cpp
diff --git a/third_party/WebKit/Source/web/WebAXObject.cpp b/third_party/WebKit/Source/web/WebAXObject.cpp
index 18b82a2567520e7fe9342e589acb7d8b3358b80f..186799b8ec0ec2334bff654503d7ba31b7e4551e 100644
--- a/third_party/WebKit/Source/web/WebAXObject.cpp
+++ b/third_party/WebKit/Source/web/WebAXObject.cpp
@@ -49,6 +49,7 @@
#include "modules/accessibility/AXTableColumn.h"
#include "modules/accessibility/AXTableRow.h"
#include "platform/PlatformKeyboardEvent.h"
+#include "public/platform/WebFloatRect.h"
#include "public/platform/WebPoint.h"
#include "public/platform/WebRect.h"
#include "public/platform/WebString.h"
@@ -1527,6 +1528,22 @@ void WebAXObject::setScrollOffset(const WebPoint& offset) const
m_private->setScrollOffset(offset);
}
+void WebAXObject::getRelativeBounds(WebAXObject& offsetContainer, WebFloatRect& boundsInContainer, SkMatrix44& containerTransform) const
+{
+ if (isDetached())
+ return;
+
+#if DCHECK_IS_ON()
+ DCHECK(isLayoutClean(m_private->getDocument()));
+#endif
+
+ AXObject* container = nullptr;
+ FloatRect bounds;
+ m_private->getRelativeBounds(&container, bounds, containerTransform);
+ offsetContainer = WebAXObject(container);
+ boundsInContainer = WebFloatRect(bounds);
+}
+
void WebAXObject::scrollToMakeVisible() const
{
if (!isDetached())
« no previous file with comments | « third_party/WebKit/Source/modules/accessibility/AXObject.cpp ('k') | third_party/WebKit/public/web/WebAXObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698