[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 11:28:23 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 5c1fdf14a00afd2968d5db8c7840b2b0ea348367
Author: beidson at apple.com <beidson at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Jul 26 20:37:56 2010 +0000

    2010-07-26  Brady Eidson  <beidson at apple.com>
    
            Reviewed by Sam Weinig.
    
            Add ability for WK2 to register a scheme to always be displayed as an empty document
            https://bugs.webkit.org/show_bug.cgi?id=42995
    
            No new tests. (Currently not possible to test in WebKit1 DRT, can be testing in future WK2 tester)
    
            * WebCore.exp.in:
    
            * loader/MainResourceLoader.cpp:
            (WebCore::shouldLoadAsEmptyDocument):
    
            * platform/SchemeRegistry.cpp:
            (WebCore::emptyDocumentSchemes):
            (WebCore::SchemeRegistry::registerURLSchemeAsEmptyDocument):
            (WebCore::SchemeRegistry::shouldLoadURLSchemeAsEmptyDocument):
            * platform/SchemeRegistry.h:
    2010-07-26  Brady Eidson  <beidson at apple.com>
    
            Reviewed by Sam Weinig.
    
            Add ability for WK2 to register a scheme to always be displayed as an empty document
            https://bugs.webkit.org/show_bug.cgi?id=42995
    
            * Shared/CoreIPCSupport/WebProcessMessageKinds.h:
            (WebProcessMessage::):
    
            * UIProcess/API/C/WKContext.cpp:
            (_WKContextRegisterURLSchemeAsEmptyDocument):
            * UIProcess/API/C/WKContextPrivate.h:
    
            * UIProcess/WebContext.cpp:
            (WebKit::WebContext::registerURLSchemeAsEmptyDocument):
            * UIProcess/WebContext.h:
    
            * WebProcess/WebProcess.cpp:
            (WebKit::WebProcess::registerURLSchemeAsEmptyDocument):
            (WebKit::WebProcess::didReceiveMessage):
            * WebProcess/WebProcess.h:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64070 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index d6425d1..3b80304 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,23 @@
+2010-07-26  Brady Eidson  <beidson at apple.com>
+
+        Reviewed by Sam Weinig.
+
+        Add ability for WK2 to register a scheme to always be displayed as an empty document
+        https://bugs.webkit.org/show_bug.cgi?id=42995
+
+        No new tests. (Currently not possible to test in WebKit1 DRT, can be testing in future WK2 tester)
+
+        * WebCore.exp.in:
+        
+        * loader/MainResourceLoader.cpp:
+        (WebCore::shouldLoadAsEmptyDocument):
+        
+        * platform/SchemeRegistry.cpp:
+        (WebCore::emptyDocumentSchemes):
+        (WebCore::SchemeRegistry::registerURLSchemeAsEmptyDocument):
+        (WebCore::SchemeRegistry::shouldLoadURLSchemeAsEmptyDocument):
+        * platform/SchemeRegistry.h:
+
 2010-07-26  Patrick Gansterer  <paroga at paroga.com>
 
         Reviewed by Kent Tamura.
diff --git a/WebCore/WebCore.exp.in b/WebCore/WebCore.exp.in
index 7128264..580f4f7 100644
--- a/WebCore/WebCore.exp.in
+++ b/WebCore/WebCore.exp.in
@@ -312,6 +312,7 @@ __ZN7WebCore14ResourceLoader19setShouldBufferDataEb
 __ZN7WebCore14SVGSMILElement13isSMILElementEPNS_4NodeE
 __ZN7WebCore14SchemeRegistry24registerURLSchemeAsLocalERKNS_6StringE
 __ZN7WebCore14SchemeRegistry25registerURLSchemeAsSecureERKNS_6StringE
+__ZN7WebCore14SchemeRegistry32registerURLSchemeAsEmptyDocumentERKNS_6StringE
 __ZN7WebCore14SecurityOrigin16createFromStringERKNS_6StringE
 __ZN7WebCore14SecurityOrigin18setLocalLoadPolicyENS0_15LocalLoadPolicyE
 __ZN7WebCore14SecurityOrigin18shouldHideReferrerERKNS_4KURLERKNS_6StringE
diff --git a/WebCore/loader/MainResourceLoader.cpp b/WebCore/loader/MainResourceLoader.cpp
index 0308056..c03f9ca 100644
--- a/WebCore/loader/MainResourceLoader.cpp
+++ b/WebCore/loader/MainResourceLoader.cpp
@@ -44,6 +44,7 @@
 #endif
 #include "ResourceError.h"
 #include "ResourceHandle.h"
+#include "SchemeRegistry.h"
 #include "Settings.h"
 #include <wtf/CurrentTime.h>
 
@@ -206,7 +207,7 @@ static bool shouldLoadAsEmptyDocument(const KURL& url)
 #if PLATFORM(TORCHMOBILE)
     return url.isEmpty() || (url.protocolIs("about") && equalIgnoringRef(url, blankURL()));
 #else 
-    return url.isEmpty() || url.protocolIs("about");
+    return url.isEmpty() || SchemeRegistry::shouldLoadURLSchemeAsEmptyDocument(url.protocol());
 #endif
 }
 
diff --git a/WebCore/platform/SchemeRegistry.cpp b/WebCore/platform/SchemeRegistry.cpp
index 0498462..0423236 100644
--- a/WebCore/platform/SchemeRegistry.cpp
+++ b/WebCore/platform/SchemeRegistry.cpp
@@ -70,6 +70,16 @@ static URLSchemesMap& schemesWithUniqueOrigins()
     return schemesWithUniqueOrigins;
 }
 
+static URLSchemesMap& emptyDocumentSchemes()
+{
+    DEFINE_STATIC_LOCAL(URLSchemesMap, emptyDocumentSchemes, ());
+
+    if (emptyDocumentSchemes.isEmpty())
+        emptyDocumentSchemes.add("about");
+
+    return emptyDocumentSchemes;
+}
+
 void SchemeRegistry::registerURLSchemeAsLocal(const String& scheme)
 {
     WebCore::localURLSchemes().add(scheme);
@@ -149,4 +159,14 @@ bool SchemeRegistry::shouldTreatURLSchemeAsSecure(const String& scheme)
     return secureSchemes().contains(scheme);
 }
 
+void SchemeRegistry::registerURLSchemeAsEmptyDocument(const String& scheme)
+{
+    emptyDocumentSchemes().add(scheme);
+}
+
+bool SchemeRegistry::shouldLoadURLSchemeAsEmptyDocument(const String& scheme)
+{
+    return emptyDocumentSchemes().contains(scheme);
+}
+
 } // namespace WebCore
diff --git a/WebCore/platform/SchemeRegistry.h b/WebCore/platform/SchemeRegistry.h
index 48b4255..d92ec4e 100644
--- a/WebCore/platform/SchemeRegistry.h
+++ b/WebCore/platform/SchemeRegistry.h
@@ -51,6 +51,9 @@ public:
 
     static void registerURLSchemeAsNoAccess(const String&);
     static bool shouldTreatURLSchemeAsNoAccess(const String&);
+    
+    static void registerURLSchemeAsEmptyDocument(const String&);
+    static bool shouldLoadURLSchemeAsEmptyDocument(const String&);
 };
 
 } // namespace WebCore
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 57dd8f2..c4d88fa 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,26 @@
+2010-07-26  Brady Eidson  <beidson at apple.com>
+
+        Reviewed by Sam Weinig.
+
+        Add ability for WK2 to register a scheme to always be displayed as an empty document
+        https://bugs.webkit.org/show_bug.cgi?id=42995
+
+        * Shared/CoreIPCSupport/WebProcessMessageKinds.h:
+        (WebProcessMessage::):
+        
+        * UIProcess/API/C/WKContext.cpp:
+        (_WKContextRegisterURLSchemeAsEmptyDocument):
+        * UIProcess/API/C/WKContextPrivate.h:
+        
+        * UIProcess/WebContext.cpp:
+        (WebKit::WebContext::registerURLSchemeAsEmptyDocument):
+        * UIProcess/WebContext.h:
+        
+        * WebProcess/WebProcess.cpp:
+        (WebKit::WebProcess::registerURLSchemeAsEmptyDocument):
+        (WebKit::WebProcess::didReceiveMessage):
+        * WebProcess/WebProcess.h:
+
 2010-07-26  Anders Carlsson  <andersca at apple.com>
 
         Reviewed by Adam Roben.
diff --git a/WebKit2/Shared/CoreIPCSupport/WebProcessMessageKinds.h b/WebKit2/Shared/CoreIPCSupport/WebProcessMessageKinds.h
index d09a043..77fa5a7 100644
--- a/WebKit2/Shared/CoreIPCSupport/WebProcessMessageKinds.h
+++ b/WebKit2/Shared/CoreIPCSupport/WebProcessMessageKinds.h
@@ -37,6 +37,7 @@ enum Kind {
     SetApplicationCacheDirectory,
     Create,
     PostMessage,
+    RegisterURLSchemeAsEmptyDocument,
 #if PLATFORM(MAC)
     SetupAcceleratedCompositingPort
 #endif
diff --git a/WebKit2/UIProcess/API/C/WKContext.cpp b/WebKit2/UIProcess/API/C/WKContext.cpp
index 7308fee..2a67000 100644
--- a/WebKit2/UIProcess/API/C/WKContext.cpp
+++ b/WebKit2/UIProcess/API/C/WKContext.cpp
@@ -98,3 +98,8 @@ void _WKContextSetAdditionalPluginPath(WKContextRef contextRef, WKStringRef plug
 {
     toWK(contextRef)->setAdditionalPluginPath(toWK(pluginPath));
 }
+
+void _WKContextRegisterURLSchemeAsEmptyDocument(WKContextRef contextRef, WKStringRef urlScheme)
+{
+    toWK(contextRef)->registerURLSchemeAsEmptyDocument(toWK(urlScheme));
+}
diff --git a/WebKit2/UIProcess/API/C/WKContextPrivate.h b/WebKit2/UIProcess/API/C/WKContextPrivate.h
index c99a140..e06434d 100644
--- a/WebKit2/UIProcess/API/C/WKContextPrivate.h
+++ b/WebKit2/UIProcess/API/C/WKContextPrivate.h
@@ -46,6 +46,8 @@ WK_EXPORT WKContextRef WKContextGetSharedThreadContext();
 
 WK_EXPORT void _WKContextSetAdditionalPluginPath(WKContextRef context, WKStringRef pluginPath);
 
+WK_EXPORT void _WKContextRegisterURLSchemeAsEmptyDocument(WKContextRef context, WKStringRef urlScheme);
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/WebKit2/UIProcess/WebContext.cpp b/WebKit2/UIProcess/WebContext.cpp
index 5403cbb..58b3d8c 100644
--- a/WebKit2/UIProcess/WebContext.cpp
+++ b/WebKit2/UIProcess/WebContext.cpp
@@ -180,4 +180,11 @@ void WebContext::setAdditionalPluginPath(const WebCore::String& pluginPath)
     m_pluginInfoStore.setAdditionalPluginPaths(pluginPaths);
 }
 
+void WebContext::registerURLSchemeAsEmptyDocument(WebCore::StringImpl* urlScheme)
+{
+    ensureWebProcess();
+
+    m_process->send(WebProcessMessage::RegisterURLSchemeAsEmptyDocument, 0, CoreIPC::In(String(urlScheme)));
+}
+
 } // namespace WebKit
diff --git a/WebKit2/UIProcess/WebContext.h b/WebKit2/UIProcess/WebContext.h
index 5aef0c1..521ab1c 100644
--- a/WebKit2/UIProcess/WebContext.h
+++ b/WebKit2/UIProcess/WebContext.h
@@ -85,6 +85,8 @@ public:
 
     PluginInfoStore* pluginInfoStore() { return &m_pluginInfoStore; }
     WebCore::String applicationCacheDirectory();
+    
+    void registerURLSchemeAsEmptyDocument(WebCore::StringImpl*);
 
 private:
     WebContext(ProcessModel, const WebCore::String& injectedBundlePath);
diff --git a/WebKit2/WebProcess/WebProcess.cpp b/WebKit2/WebProcess/WebProcess.cpp
index fa5dbb2..34b9911 100644
--- a/WebKit2/WebProcess/WebProcess.cpp
+++ b/WebKit2/WebProcess/WebProcess.cpp
@@ -37,6 +37,7 @@
 #include "WebPreferencesStore.h"
 #include "WebProcessMessageKinds.h"
 #include <WebCore/ApplicationCacheStorage.h>
+#include <WebCore/SchemeRegistry.h>
 #include <wtf/PassRefPtr.h>
 
 #ifndef NDEBUG
@@ -109,6 +110,11 @@ void WebProcess::forwardMessageToInjectedBundle(const String& message)
     m_injectedBundle->didReceiveMessage(message);
 }
 
+void WebProcess::registerURLSchemeAsEmptyDocument(const WebCore::String& urlScheme)
+{
+    SchemeRegistry::registerURLSchemeAsEmptyDocument(urlScheme);
+}
+
 WebPage* WebProcess::webPage(uint64_t pageID) const
 {
     return m_pageMap.get(pageID).get();
@@ -210,6 +216,14 @@ void WebProcess::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::Mes
                 forwardMessageToInjectedBundle(message);
                 return;
             }
+            case WebProcessMessage::RegisterURLSchemeAsEmptyDocument: {
+                String message;
+                if (!arguments->decode(CoreIPC::Out(message)))
+                    return;
+
+                registerURLSchemeAsEmptyDocument(message);
+                return;
+            }
 #if USE(ACCELERATED_COMPOSITING) && PLATFORM(MAC)
             case WebProcessMessage::SetupAcceleratedCompositingPort: {
                 CoreIPC::MachPort port;
diff --git a/WebKit2/WebProcess/WebProcess.h b/WebKit2/WebProcess/WebProcess.h
index 8867851..216c85f 100644
--- a/WebKit2/WebProcess/WebProcess.h
+++ b/WebKit2/WebProcess/WebProcess.h
@@ -73,6 +73,7 @@ private:
 #endif
     void setApplicationCacheDirectory(const WebCore::String&);
     void forwardMessageToInjectedBundle(const WebCore::String&);
+    void registerURLSchemeAsEmptyDocument(const WebCore::String&);
 
     // CoreIPC::Connection::Client
     void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list