summaryrefslogtreecommitdiff
path: root/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp')
-rw-r--r--Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp b/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp
index 60a4c68b0..2f6d2d04c 100644
--- a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp
+++ b/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp
@@ -30,6 +30,7 @@
#include "InjectedBundleNodeHandle.h"
#include "WKAPICast.h"
#include "WKBundleAPICast.h"
+#include "WebFrame.h"
using namespace WebKit;
@@ -41,7 +42,13 @@ WKTypeID WKBundleHitTestResultGetTypeID()
WKBundleNodeHandleRef WKBundleHitTestResultCopyNodeHandle(WKBundleHitTestResultRef hitTestResultRef)
{
RefPtr<InjectedBundleNodeHandle> nodeHandle = toImpl(hitTestResultRef)->nodeHandle();
- return toAPI(nodeHandle.release().leakRef());
+ return toAPI(nodeHandle.leakRef());
+}
+
+WKBundleNodeHandleRef WKBundleHitTestResultCopyURLElementHandle(WKBundleHitTestResultRef hitTestResultRef)
+{
+ RefPtr<InjectedBundleNodeHandle> urlElementNodeHandle = toImpl(hitTestResultRef)->urlElementHandle();
+ return toAPI(urlElementNodeHandle.leakRef());
}
WKBundleFrameRef WKBundleHitTestResultGetFrame(WKBundleHitTestResultRef hitTestResultRef)
@@ -84,6 +91,11 @@ bool WKBundleHitTestResultMediaHasAudio(WKBundleHitTestResultRef hitTestResultRe
return toImpl(hitTestResultRef)->mediaHasAudio();
}
+bool WKBundleHitTestResultIsDownloadableMedia(WKBundleHitTestResultRef hitTestResultRef)
+{
+ return toImpl(hitTestResultRef)->isDownloadableMedia();
+}
+
WKBundleHitTestResultMediaType WKBundleHitTestResultGetMediaType(WKBundleHitTestResultRef hitTestResultRef)
{
return toAPI(toImpl(hitTestResultRef)->mediaType());
@@ -108,3 +120,8 @@ WKStringRef WKBundleHitTestResultCopyLinkTitle(WKBundleHitTestResultRef hitTestR
{
return toCopiedAPI(toImpl(hitTestResultRef)->linkTitle());
}
+
+WKStringRef WKBundleHitTestResultCopyLinkSuggestedFilename(WKBundleHitTestResultRef hitTestResultRef)
+{
+ return toCopiedAPI(toImpl(hitTestResultRef)->linkSuggestedFilename());
+}