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

beidson at apple.com beidson at apple.com
Wed Dec 22 16:14:43 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 3b2e8d4b778677df264dcf48f0b6a26d56e7da24
Author: beidson at apple.com <beidson at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Nov 20 00:32:57 2010 +0000

    More of <rdar://problem/8613727> and https://bugs.webkit.org/show_bug.cgi?id=49836
    Add WebKit2 API relevant to customization of context menus
    
    Reviewed by Darin Adler.
    
    * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
    (WKBundleFrameAllowsFollowingLink):
    * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
    
    * WebProcess/WebPage/WebFrame.cpp:
    (WebKit::WebFrame::allowsFollowingLink):
    * WebProcess/WebPage/WebFrame.h:
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72451 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 06b956e..4f1d9a7 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -2,6 +2,21 @@
 
         Reviewed by Darin Adler.
 
+        More of <rdar://problem/8613727> and https://bugs.webkit.org/show_bug.cgi?id=49836
+        Add WebKit2 API relevant to customization of context menus
+
+        * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
+        (WKBundleFrameAllowsFollowingLink):
+        * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
+
+        * WebProcess/WebPage/WebFrame.cpp:
+        (WebKit::WebFrame::allowsFollowingLink):
+        * WebProcess/WebPage/WebFrame.h:
+
+2010-11-19  Brady Eidson  <beidson at apple.com>
+
+        Reviewed by Darin Adler.
+
         <rdar://problem/8613727> and https://bugs.webkit.org/show_bug.cgi?id=49836
         Add WebKit2 API relevant to customization of context menus
 
diff --git a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp
index beab29e..6738565 100644
--- a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp
+++ b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp
@@ -133,3 +133,8 @@ WKStringRef WKBundleFrameCopyLayerTreeAsText(WKBundleFrameRef frameRef)
 {
     return toCopiedAPI(toImpl(frameRef)->layerTreeAsText());
 }
+
+bool WKBundleFrameAllowsFollowingLink(WKBundleFrameRef frameRef, WKURLRef urlRef)
+{
+    return toImpl(frameRef)->allowsFollowingLink(WebCore::KURL(WebCore::KURL(), toImpl(urlRef)->string()));
+}
diff --git a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.h b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.h
index adfe224..4496b58 100644
--- a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.h
+++ b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.h
@@ -49,6 +49,8 @@ WK_EXPORT JSValueRef WKBundleFrameGetJavaScriptWrapperForRangeForWorld(WKBundleF
 
 WK_EXPORT WKBundlePageRef WKBundleFrameGetPage(WKBundleFrameRef frame);
 
+WK_EXPORT bool WKBundleFrameAllowsFollowingLink(WKBundleFrameRef frame, WKURLRef url);
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/WebKit2/WebProcess/WebPage/WebFrame.cpp b/WebKit2/WebProcess/WebPage/WebFrame.cpp
index bea53d1..1a9eb89 100644
--- a/WebKit2/WebProcess/WebPage/WebFrame.cpp
+++ b/WebKit2/WebProcess/WebPage/WebFrame.cpp
@@ -415,6 +415,14 @@ unsigned WebFrame::pendingUnloadCount() const
     return m_coreFrame->domWindow()->pendingUnloadEventListeners();
 }
 
+bool WebFrame::allowsFollowingLink(const WebCore::KURL& url) const
+{
+    if (!m_coreFrame)
+        return true;
+        
+    return m_coreFrame->document()->securityOrigin()->canDisplay(url);
+}
+
 JSGlobalContextRef WebFrame::jsContext()
 {
     return toGlobalRef(m_coreFrame->script()->globalObject(mainThreadNormalWorld())->globalExec());
diff --git a/WebKit2/WebProcess/WebPage/WebFrame.h b/WebKit2/WebProcess/WebPage/WebFrame.h
index dc16733..f69da71 100644
--- a/WebKit2/WebProcess/WebPage/WebFrame.h
+++ b/WebKit2/WebProcess/WebPage/WebFrame.h
@@ -40,6 +40,7 @@
 namespace WebCore {
     class Frame;
     class HTMLFrameOwnerElement;
+    class KURL;
 }
 
 namespace WebKit {
@@ -98,6 +99,8 @@ public:
     String layerTreeAsText() const;
     
     unsigned pendingUnloadCount() const;
+    
+    bool allowsFollowingLink(const WebCore::KURL&) const;
 
     // Simple listener class used by plug-ins to know when frames finish or fail loading.
     class LoadListener {

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list