[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

weinig at apple.com weinig at apple.com
Wed Dec 22 14:33:08 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 20115267616b47f8079c68d731a9f41c077926d7
Author: weinig at apple.com <weinig at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Oct 13 01:46:30 2010 +0000

    Add API to get the target frame from a HitTestResult.
    
    Reviewed by Gavin "Sometimes" Barraclough.
    
    * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
    (WKBundleHitTestResultGetFrame):
    (WKBundleHitTestResultGetTargetFrame):
    * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:
    * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
    (WebKit::InjectedBundleHitTestResult::frame): Rename from webFrame.
    (WebKit::InjectedBundleHitTestResult::targetFrame):
    * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69630 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 8b45846..ccfbd12 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,18 @@
+2010-10-12  Sam Weinig  <sam at webkit.org>
+
+        Reviewed by Gavin "Sometimes" Barraclough.
+
+        Add API to get the target frame from a HitTestResult.
+
+        * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
+        (WKBundleHitTestResultGetFrame):
+        (WKBundleHitTestResultGetTargetFrame):
+        * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:
+        * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
+        (WebKit::InjectedBundleHitTestResult::frame): Rename from webFrame.
+        (WebKit::InjectedBundleHitTestResult::targetFrame):
+        * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
+
 2010-10-12  Anders Carlsson  <andersca at apple.com>
 
         Reviewed by Dan Bernstein.
diff --git a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp
index d9a7c9a..78544e5 100644
--- a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp
+++ b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp
@@ -45,7 +45,12 @@ WKBundleNodeHandleRef WKBundleHitTestResultGetNodeHandle(WKBundleHitTestResultRe
 
 WKBundleFrameRef WKBundleHitTestResultGetFrame(WKBundleHitTestResultRef hitTestResultRef)
 {
-    return toAPI(toImpl(hitTestResultRef)->webFrame());
+    return toAPI(toImpl(hitTestResultRef)->frame());
+}
+
+WKBundleFrameRef WKBundleHitTestResultGetTargetFrame(WKBundleHitTestResultRef hitTestResultRef)
+{
+    return toAPI(toImpl(hitTestResultRef)->targetFrame());
 }
 
 WKURLRef WKBundleHitTestResultCopyAbsoluteLinkURL(WKBundleHitTestResultRef hitTestResultRef)
diff --git a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h
index bb02b17..88da5f5 100644
--- a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h
+++ b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h
@@ -36,6 +36,7 @@ WK_EXPORT WKTypeID WKBundleHitTestResultGetTypeID();
 
 WK_EXPORT WKBundleNodeHandleRef WKBundleHitTestResultGetNodeHandle(WKBundleHitTestResultRef hitTestResult);
 WK_EXPORT WKBundleFrameRef WKBundleHitTestResultGetFrame(WKBundleHitTestResultRef hitTestResult);
+WK_EXPORT WKBundleFrameRef WKBundleHitTestResultGetTargetFrame(WKBundleHitTestResultRef hitTestResult);
 WK_EXPORT WKURLRef WKBundleHitTestResultCopyAbsoluteLinkURL(WKBundleHitTestResultRef hitTestResult);
 
 #ifdef __cplusplus
diff --git a/WebKit2/WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp b/WebKit2/WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp
index ed3ca3c..857aa77 100644
--- a/WebKit2/WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp
+++ b/WebKit2/WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp
@@ -48,7 +48,7 @@ PassRefPtr<InjectedBundleNodeHandle> InjectedBundleHitTestResult::nodeHandle() c
     return InjectedBundleNodeHandle::getOrCreate(m_hitTestResult.innerNonSharedNode());
 }
 
-WebFrame* InjectedBundleHitTestResult::webFrame() const
+WebFrame* InjectedBundleHitTestResult::frame() const
 {
     Node* node = m_hitTestResult.innerNonSharedNode();
     if (!node)
@@ -65,6 +65,15 @@ WebFrame* InjectedBundleHitTestResult::webFrame() const
     return static_cast<WebFrameLoaderClient*>(frame->loader()->client())->webFrame();
 }
 
+WebFrame* InjectedBundleHitTestResult::targetFrame() const
+{
+    Frame* frame = m_hitTestResult.targetFrame();
+    if (!frame)
+        return 0;
+
+    return static_cast<WebFrameLoaderClient*>(frame->loader()->client())->webFrame();
+}
+
 const String& InjectedBundleHitTestResult::absoluteLinkURL() const
 {
     return m_hitTestResult.absoluteLinkURL().string();
diff --git a/WebKit2/WebProcess/InjectedBundle/InjectedBundleHitTestResult.h b/WebKit2/WebProcess/InjectedBundle/InjectedBundleHitTestResult.h
index 7065b08..bda34d6 100644
--- a/WebKit2/WebProcess/InjectedBundle/InjectedBundleHitTestResult.h
+++ b/WebKit2/WebProcess/InjectedBundle/InjectedBundleHitTestResult.h
@@ -46,7 +46,8 @@ public:
     const WebCore::HitTestResult& coreHitTestResult() const { return m_hitTestResult; }
 
     PassRefPtr<InjectedBundleNodeHandle> nodeHandle() const; 
-    WebFrame* webFrame() const;
+    WebFrame* frame() const;
+    WebFrame* targetFrame() const;
     const String& absoluteLinkURL() const;
 
 private:

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list