summaryrefslogtreecommitdiff
path: root/Source/WebKit2/UIProcess/API/gtk/WebKitHitTestResult.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit2/UIProcess/API/gtk/WebKitHitTestResult.cpp')
-rw-r--r--Source/WebKit2/UIProcess/API/gtk/WebKitHitTestResult.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitHitTestResult.cpp b/Source/WebKit2/UIProcess/API/gtk/WebKitHitTestResult.cpp
index 928b4dc42..034768cb0 100644
--- a/Source/WebKit2/UIProcess/API/gtk/WebKitHitTestResult.cpp
+++ b/Source/WebKit2/UIProcess/API/gtk/WebKitHitTestResult.cpp
@@ -253,6 +253,9 @@ WebKitHitTestResult* webkitHitTestResultCreate(WKHitTestResultRef wkHitTestResul
if (!mediaURL.isEmpty())
context |= WEBKIT_HIT_TEST_RESULT_CONTEXT_MEDIA;
+ if (WKHitTestResultIsContentEditable(wkHitTestResult))
+ context |= WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE;
+
const String& linkTitle = toImpl(wkHitTestResult)->linkTitle();
const String& linkLabel = toImpl(wkHitTestResult)->linkLabel();
@@ -348,6 +351,23 @@ gboolean webkit_hit_test_result_context_is_media(WebKitHitTestResult* hitTestRes
}
/**
+ * webkit_hit_test_result_context_is_editable:
+ * @hit_test_result: a #WebKitHitTestResult
+ *
+ * Gets whether %WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE flag is present in
+ * #WebKitHitTestResult:context.
+ *
+ * Returns: %TRUE if there's an editable element at the coordinates of the @hit_test_result,
+ * or %FALSE otherwise
+ */
+gboolean webkit_hit_test_result_context_is_editable(WebKitHitTestResult* hitTestResult)
+{
+ g_return_val_if_fail(WEBKIT_IS_HIT_TEST_RESULT(hitTestResult), FALSE);
+
+ return hitTestResult->priv->context & WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE;
+}
+
+/**
* webkit_hit_test_result_get_link_uri:
* @hit_test_result: a #WebKitHitTestResult
*