Expose ElementBoundingBox on WKHitTestResult
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Dec 2014 00:13:48 +0000 (00:13 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Dec 2014 00:13:48 +0000 (00:13 +0000)
https://bugs.webkit.org/show_bug.cgi?id=139895
<rdar://problem/19333075>

Reviewed by Dan Bernstein.

* UIProcess/API/C/WKHitTestResult.cpp:
(WKHitTestResultGetElementBoundingBox):
* UIProcess/API/C/WKHitTestResult.h:
Expose the rect.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177704 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/C/WKHitTestResult.cpp
Source/WebKit2/UIProcess/API/C/WKHitTestResult.h

index ab3e0e30ec07ee2ba2361eef7f15eeb3803d212b..724d79d56ffc58e1471c89639c37d7cd8c3b9744 100644 (file)
@@ -1,3 +1,16 @@
+2014-12-23  Timothy Horton  <timothy_horton@apple.com>
+
+        Expose ElementBoundingBox on WKHitTestResult
+        https://bugs.webkit.org/show_bug.cgi?id=139895
+        <rdar://problem/19333075>
+
+        Reviewed by Dan Bernstein.
+
+        * UIProcess/API/C/WKHitTestResult.cpp:
+        (WKHitTestResultGetElementBoundingBox):
+        * UIProcess/API/C/WKHitTestResult.h:
+        Expose the rect.
+
 2014-12-23  Timothy Horton  <timothy_horton@apple.com>
 
         Remove the custom web page preview code
index 5949091bb5c8ad639f85c7b0257fb5a7159313c4..e746fdaeef2a641f78b403b9dd007cdbed7899f7 100644 (file)
@@ -71,3 +71,8 @@ bool WKHitTestResultIsContentEditable(WKHitTestResultRef hitTestResultRef)
 {
     return toImpl(hitTestResultRef)->isContentEditable();
 }
+
+WKRect WKHitTestResultGetElementBoundingBox(WKHitTestResultRef hitTestResultRef)
+{
+    return toAPI(toImpl(hitTestResultRef)->elementBoundingBox());
+}
index beb48ac41c806700e171655f1d795d33875cc246..f9819648f9f1559117cea93b1805d9401a8900b3 100644 (file)
@@ -28,6 +28,7 @@
 #define WKHitTestResult_h
 
 #include <WebKit/WKBase.h>
+#include <WebKit/WKGeometry.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -45,6 +46,8 @@ WK_EXPORT WKStringRef WKHitTestResultCopyLinkTitle(WKHitTestResultRef hitTestRes
 
 WK_EXPORT bool WKHitTestResultIsContentEditable(WKHitTestResultRef hitTestResult);
 
+WK_EXPORT WKRect WKHitTestResultGetElementBoundingBox(WKHitTestResultRef hitTestResultRef);
+
 #ifdef __cplusplus
 }
 #endif