diff options
author | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2013-09-13 12:51:20 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-19 20:50:05 +0200 |
commit | d441d6f39bb846989d95bcf5caf387b42414718d (patch) | |
tree | e367e64a75991c554930278175d403c072de6bb8 /Source/WebKit2/UIProcess/API/gtk/WebKitHitTestResult.cpp | |
parent | 0060b2994c07842f4c59de64b5e3e430525c4b90 (diff) | |
download | qtwebkit-d441d6f39bb846989d95bcf5caf387b42414718d.tar.gz |
Import Qt5x2 branch of QtWebkit for Qt 5.2
Importing a new snapshot of webkit.
Change-Id: I2d01ad12cdc8af8cb015387641120a9d7ea5f10c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Diffstat (limited to 'Source/WebKit2/UIProcess/API/gtk/WebKitHitTestResult.cpp')
-rw-r--r-- | Source/WebKit2/UIProcess/API/gtk/WebKitHitTestResult.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitHitTestResult.cpp b/Source/WebKit2/UIProcess/API/gtk/WebKitHitTestResult.cpp index 8df293cba..918d316c0 100644 --- a/Source/WebKit2/UIProcess/API/gtk/WebKitHitTestResult.cpp +++ b/Source/WebKit2/UIProcess/API/gtk/WebKitHitTestResult.cpp @@ -240,6 +240,9 @@ WebKitHitTestResult* webkitHitTestResultCreate(WebHitTestResult* hitTestResult) if (hitTestResult->isContentEditable()) context |= WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE; + if (hitTestResult->isScrollbar()) + context |= WEBKIT_HIT_TEST_RESULT_CONTEXT_SCROLLBAR; + const String& linkTitle = hitTestResult->linkTitle(); const String& linkLabel = hitTestResult->linkLabel(); @@ -262,6 +265,7 @@ bool webkitHitTestResultCompare(WebKitHitTestResult* hitTestResult, WebHitTestRe { WebKitHitTestResultPrivate* priv = hitTestResult->priv; return webHitTestResult->isContentEditable() == webkit_hit_test_result_context_is_editable(hitTestResult) + && webHitTestResult->isScrollbar() == webkit_hit_test_result_context_is_scrollbar(hitTestResult) && stringIsEqualToCString(webHitTestResult->absoluteLinkURL(), priv->linkURI) && stringIsEqualToCString(webHitTestResult->linkTitle(), priv->linkTitle) && stringIsEqualToCString(webHitTestResult->linkLabel(), priv->linkLabel) @@ -433,3 +437,20 @@ const gchar* webkit_hit_test_result_get_media_uri(WebKitHitTestResult* hitTestRe return hitTestResult->priv->mediaURI.data(); } + +/** + * webkit_hit_test_result_context_is_scrollbar: + * @hit_test_result: a #WebKitHitTestResult + * + * Gets whether %WEBKIT_HIT_TEST_RESULT_CONTEXT_SCROLLBAR flag is present in + * #WebKitHitTestResult:context. + * + * Returns: %TRUE if there's a scrollbar element at the coordinates of the @hit_test_result, + * or %FALSE otherwise + */ +gboolean webkit_hit_test_result_context_is_scrollbar(WebKitHitTestResult* hitTestResult) +{ + g_return_val_if_fail(WEBKIT_IS_HIT_TEST_RESULT(hitTestResult), FALSE); + + return hitTestResult->priv->context & WEBKIT_HIT_TEST_RESULT_CONTEXT_SCROLLBAR; +} |