[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:56:07 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit a7f58d7c0b8f4d748cf67b3992d0b04a7d96ddd2
Author: weinig at apple.com <weinig at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Oct 25 18:22:40 2010 +0000

    Need WebKit2 API to figure out if a frame can provide source
    <rdar://problem/8424632>
    https://bugs.webkit.org/show_bug.cgi?id=48252
    
    Reviewed by Anders Carlsson.
    
    * UIProcess/API/C/WKFrame.cpp:
    (WKFrameCanProvideSource):
    * UIProcess/API/C/WKFrame.h:
    * UIProcess/WebFrameProxy.cpp:
    (WebKit::WebFrameProxy::canProvideSource):
    * UIProcess/WebFrameProxy.h:
    Add API to figure out if a frame can provide source based on its
    MIME type.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70466 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 7fd84ca..8813f51 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,20 @@
+2010-10-25  Sam Weinig  <sam at webkit.org>
+
+        Reviewed by Anders Carlsson.
+
+        Need WebKit2 API to figure out if a frame can provide source
+        <rdar://problem/8424632>
+        https://bugs.webkit.org/show_bug.cgi?id=48252
+
+        * UIProcess/API/C/WKFrame.cpp:
+        (WKFrameCanProvideSource):
+        * UIProcess/API/C/WKFrame.h:
+        * UIProcess/WebFrameProxy.cpp:
+        (WebKit::WebFrameProxy::canProvideSource):
+        * UIProcess/WebFrameProxy.h:
+        Add API to figure out if a frame can provide source based on its
+        MIME type.
+
 2010-10-25  Anders Carlsson  <andersca at apple.com>
 
         Reviewed by Dan Bernstein.
diff --git a/WebKit2/UIProcess/API/C/WKFrame.cpp b/WebKit2/UIProcess/API/C/WKFrame.cpp
index f73ef08..5456836 100644
--- a/WebKit2/UIProcess/API/C/WKFrame.cpp
+++ b/WebKit2/UIProcess/API/C/WKFrame.cpp
@@ -85,3 +85,8 @@ WKCertificateInfoRef WKFrameGetCertificateInfo(WKFrameRef frameRef)
 {
     return toAPI(toImpl(frameRef)->certificateInfo());
 }
+
+bool WKFrameCanProvideSource(WKFrameRef frameRef)
+{
+    return toImpl(frameRef)->canProvideSource();
+}
diff --git a/WebKit2/UIProcess/API/C/WKFrame.h b/WebKit2/UIProcess/API/C/WKFrame.h
index 4dfeb9c..75ecf69 100644
--- a/WebKit2/UIProcess/API/C/WKFrame.h
+++ b/WebKit2/UIProcess/API/C/WKFrame.h
@@ -58,6 +58,8 @@ WK_EXPORT WKPageRef WKFrameGetPage(WKFrameRef frame);
 
 WK_EXPORT WKCertificateInfoRef WKFrameGetCertificateInfo(WKFrameRef frame);
 
+WK_EXPORT bool WKFrameCanProvideSource(WKFrameRef frame);
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/WebKit2/UIProcess/WebFrameProxy.cpp b/WebKit2/UIProcess/WebFrameProxy.cpp
index 0ba95fc..96a47e8 100644
--- a/WebKit2/UIProcess/WebFrameProxy.cpp
+++ b/WebKit2/UIProcess/WebFrameProxy.cpp
@@ -29,6 +29,7 @@
 #include "WebFormSubmissionListenerProxy.h"
 #include "WebFramePolicyListenerProxy.h"
 #include "WebPageProxy.h"
+#include <WebCore/DOMImplementation.h>
 #include <wtf/text/WTFString.h>
 
 using namespace WebCore;
@@ -68,6 +69,14 @@ void WebFrameProxy::setCertificateInfo(PassRefPtr<WebCertificateInfo> certificat
     m_certificateInfo = certificateInfo;
 }
 
+bool WebFrameProxy::canProvideSource() const
+{
+    // FIXME: This check should be moved to somewhere in WebCore. 
+    if (m_MIMEType == "text/html" || m_MIMEType == "image/svg+xml" || DOMImplementation::isXMLMIMEType(m_MIMEType))
+        return true;
+    return false;
+}
+
 void WebFrameProxy::didStartProvisionalLoad(const String& url)
 {
     // FIXME: Add assertions.
diff --git a/WebKit2/UIProcess/WebFrameProxy.h b/WebKit2/UIProcess/WebFrameProxy.h
index 15f61dc..16225f2 100644
--- a/WebKit2/UIProcess/WebFrameProxy.h
+++ b/WebKit2/UIProcess/WebFrameProxy.h
@@ -83,6 +83,8 @@ public:
     void setCertificateInfo(PassRefPtr<WebCertificateInfo>);
     WebCertificateInfo* certificateInfo() const { return m_certificateInfo.get(); }
 
+    bool canProvideSource() const;
+
     void didStartProvisionalLoad(const String& url);
     void didReceiveServerRedirectForProvisionalLoad(const String& url);
     void didFailProvisionalLoad();

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list