From 49233e234e5c787396cadb2cea33b31ae0cd65c1 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 20 Jun 2012 13:01:08 +0200 Subject: Imported WebKit commit 3a8c29f35d00659d2ce7a0ccdfa8304f14e82327 (http://svn.webkit.org/repository/webkit/trunk@120813) New snapshot with Windows build fixes --- .../UIProcess/API/gtk/WebKitHitTestResult.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'Source/WebKit2/UIProcess/API/gtk/WebKitHitTestResult.cpp') 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(); @@ -347,6 +350,23 @@ gboolean webkit_hit_test_result_context_is_media(WebKitHitTestResult* hitTestRes return hitTestResult->priv->context & WEBKIT_HIT_TEST_RESULT_CONTEXT_MEDIA; } +/** + * 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 -- cgit v1.2.1