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

jberlin at webkit.org jberlin at webkit.org
Wed Dec 22 14:34:31 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit f91419d29589f10d4dcf0955d5519666bb78112e
Author: jberlin at webkit.org <jberlin at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Oct 13 14:42:35 2010 +0000

    Add ability for WK2 to set domain relaxation forbidden for a URL scheme.
    https://bugs.webkit.org/show_bug.cgi?id=47562
    
    Reviewed by Jon Honeycutt.
    
    Add the schemes for which domain relaxation is forbidden to the
    WebProcessCreationParameters.
    * Shared/WebProcessCreationParameters.cpp:
    (WebKit::WebProcessCreationParameters::encode):
    (WebKit::WebProcessCreationParameters::decode):
    * Shared/WebProcessCreationParameters.h:
    
    * UIProcess/API/C/WKContext.cpp:
    (WKContextSetDomainRelaxationForbiddenForURLScheme):
    * UIProcess/API/C/WKContextPrivate.h:
    
    * UIProcess/WebContext.cpp:
    (WebKit::WebContext::ensureWebProcess):
    Copy over the schemes for which domain relaxation is forbidden to
    WebProcessCreationParameters.
    (WebKit::WebContext::setDomainRelaxationForbiddenForURLScheme):
    Only send a message to the WebProcess if it is valid.
    * UIProcess/WebContext.h:
    
    * WebProcess/WebProcess.cpp:
    (WebKit::WebProcess::initializeWebProcess):
    Set domain relaxation forbidden for the schemes in
    WebProcesCreationParameters.urlSchemesForWhichDomainRelaxationIsForbidden.
    (WebKit::WebProcess::setDomainRelaxationForbiddenForURLScheme):
    * WebProcess/WebProcess.h:
    
    * WebProcess/WebProcess.messages.in:
    Add the SetDomainRelaxationFobiddenForURLScheme message.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69661 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index b4393c8..36eb7fd 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,39 @@
+2010-10-12  Jessie Berlin  <jberlin at apple.com>
+
+        Reviewed by Jon Honeycutt.
+
+        Add ability for WK2 to set domain relaxation forbidden for a URL scheme.
+        https://bugs.webkit.org/show_bug.cgi?id=47562
+
+        Add the schemes for which domain relaxation is forbidden to the
+        WebProcessCreationParameters.
+        * Shared/WebProcessCreationParameters.cpp:
+        (WebKit::WebProcessCreationParameters::encode):
+        (WebKit::WebProcessCreationParameters::decode):
+        * Shared/WebProcessCreationParameters.h:
+
+        * UIProcess/API/C/WKContext.cpp:
+        (WKContextSetDomainRelaxationForbiddenForURLScheme):
+        * UIProcess/API/C/WKContextPrivate.h:
+
+        * UIProcess/WebContext.cpp:
+        (WebKit::WebContext::ensureWebProcess):
+        Copy over the schemes for which domain relaxation is forbidden to
+        WebProcessCreationParameters.
+        (WebKit::WebContext::setDomainRelaxationForbiddenForURLScheme):
+        Only send a message to the WebProcess if it is valid.
+        * UIProcess/WebContext.h:
+
+        * WebProcess/WebProcess.cpp:
+        (WebKit::WebProcess::initializeWebProcess):
+        Set domain relaxation forbidden for the schemes in
+        WebProcesCreationParameters.urlSchemesForWhichDomainRelaxationIsForbidden.
+        (WebKit::WebProcess::setDomainRelaxationForbiddenForURLScheme):
+        * WebProcess/WebProcess.h:
+
+        * WebProcess/WebProcess.messages.in:
+        Add the SetDomainRelaxationFobiddenForURLScheme message.
+
 2010-10-13  Csaba Osztrogonác  <ossy at webkit.org>
 
         Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebKit2/Shared/WebProcessCreationParameters.cpp b/WebKit2/Shared/WebProcessCreationParameters.cpp
index 57f1b2b..3d24fa0 100644
--- a/WebKit2/Shared/WebProcessCreationParameters.cpp
+++ b/WebKit2/Shared/WebProcessCreationParameters.cpp
@@ -47,6 +47,7 @@ void WebProcessCreationParameters::encode(CoreIPC::ArgumentEncoder* encoder) con
     encoder->encode(applicationCacheDirectory);
     encoder->encode(urlSchemesRegistererdAsEmptyDocument);
     encoder->encode(urlSchemesRegisteredAsSecure);
+    encoder->encode(urlSchemesForWhichDomainRelaxationIsForbidden);
     encoder->encode(static_cast<uint32_t>(cacheModel));
     encoder->encode(shouldTrackVisitedLinks);
 
@@ -72,6 +73,8 @@ bool WebProcessCreationParameters::decode(CoreIPC::ArgumentDecoder* decoder, Web
         return false;
     if (!decoder->decode(parameters.urlSchemesRegisteredAsSecure))
         return false;
+    if (!decoder->decode(parameters.urlSchemesForWhichDomainRelaxationIsForbidden))
+        return false;
 
     uint32_t cacheModel;
     if (!decoder->decode(cacheModel))
diff --git a/WebKit2/Shared/WebProcessCreationParameters.h b/WebKit2/Shared/WebProcessCreationParameters.h
index a4aba7f..b524a81 100644
--- a/WebKit2/Shared/WebProcessCreationParameters.h
+++ b/WebKit2/Shared/WebProcessCreationParameters.h
@@ -55,6 +55,7 @@ struct WebProcessCreationParameters {
     String applicationCacheDirectory;
     Vector<String> urlSchemesRegistererdAsEmptyDocument;
     Vector<String> urlSchemesRegisteredAsSecure;
+    Vector<String> urlSchemesForWhichDomainRelaxationIsForbidden;
 
     CacheModel cacheModel;
     bool shouldTrackVisitedLinks;
diff --git a/WebKit2/UIProcess/API/C/WKContext.cpp b/WebKit2/UIProcess/API/C/WKContext.cpp
index b820946..e53275e 100644
--- a/WebKit2/UIProcess/API/C/WKContext.cpp
+++ b/WebKit2/UIProcess/API/C/WKContext.cpp
@@ -125,3 +125,8 @@ void WKContextRegisterURLSchemeAsSecure(WKContextRef contextRef, WKStringRef url
 {
     toImpl(contextRef)->registerURLSchemeAsSecure(toImpl(urlScheme)->string());
 }
+
+void WKContextSetDomainRelaxationForbiddenForURLScheme(WKContextRef contextRef, WKStringRef urlScheme)
+{
+    toImpl(contextRef)->setDomainRelaxationForbiddenForURLScheme(toImpl(urlScheme)->string());
+}
diff --git a/WebKit2/UIProcess/API/C/WKContextPrivate.h b/WebKit2/UIProcess/API/C/WKContextPrivate.h
index 80024f1..0151e9d 100644
--- a/WebKit2/UIProcess/API/C/WKContextPrivate.h
+++ b/WebKit2/UIProcess/API/C/WKContextPrivate.h
@@ -50,6 +50,8 @@ WK_EXPORT void _WKContextRegisterURLSchemeAsEmptyDocument(WKContextRef context,
 
 WK_EXPORT void WKContextRegisterURLSchemeAsSecure(WKContextRef context, WKStringRef urlScheme);
 
+WK_EXPORT void WKContextSetDomainRelaxationForbiddenForURLScheme(WKContextRef context, WKStringRef urlScheme);
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/WebKit2/UIProcess/WebContext.cpp b/WebKit2/UIProcess/WebContext.cpp
index 9c28232..c94c0f3 100644
--- a/WebKit2/UIProcess/WebContext.cpp
+++ b/WebKit2/UIProcess/WebContext.cpp
@@ -153,6 +153,7 @@ void WebContext::ensureWebProcess()
     
     copyToVector(m_schemesToRegisterAsEmptyDocument, parameters.urlSchemesRegistererdAsEmptyDocument);
     copyToVector(m_schemesToRegisterAsSecure, parameters.urlSchemesRegisteredAsSecure);
+    copyToVector(m_schemesToSetDomainRelaxationForbiddenFor, parameters.urlSchemesForWhichDomainRelaxationIsForbidden);
 
     // Add any platform specific parameters
     platformInitializeWebProcess(parameters);
@@ -321,6 +322,16 @@ void WebContext::registerURLSchemeAsSecure(const String& urlScheme)
     m_process->send(Messages::WebProcess::RegisterURLSchemeAsSecure(urlScheme), 0);
 }
 
+void WebContext::setDomainRelaxationForbiddenForURLScheme(const String& urlScheme)
+{
+    m_schemesToSetDomainRelaxationForbiddenFor.add(urlScheme);
+
+    if (!hasValidProcess())
+        return;
+
+    m_process->send(Messages::WebProcess::SetDomainRelaxationForbiddenForURLScheme(urlScheme), 0);
+}
+
 void WebContext::addVisitedLink(const String& visitedURL)
 {
     if (visitedURL.isEmpty())
diff --git a/WebKit2/UIProcess/WebContext.h b/WebKit2/UIProcess/WebContext.h
index 0364faf..314eb20 100644
--- a/WebKit2/UIProcess/WebContext.h
+++ b/WebKit2/UIProcess/WebContext.h
@@ -103,7 +103,8 @@ public:
     
     void registerURLSchemeAsEmptyDocument(const String&);
     void registerURLSchemeAsSecure(const String&);
-    
+    void setDomainRelaxationForbiddenForURLScheme(const String&);
+
     void addVisitedLink(const String&);
     void addVisitedLink(WebCore::LinkHash);
 
@@ -144,6 +145,8 @@ private:
         
     HashSet<String> m_schemesToRegisterAsEmptyDocument;
     HashSet<String> m_schemesToRegisterAsSecure;
+    HashSet<String> m_schemesToSetDomainRelaxationForbiddenFor;
+
     Vector<pair<String, RefPtr<APIObject> > > m_pendingMessagesToPostToInjectedBundle;
 
     CacheModel m_cacheModel;
diff --git a/WebKit2/WebProcess/WebProcess.cpp b/WebKit2/WebProcess/WebProcess.cpp
index ed9e5cb..9a7f489 100644
--- a/WebKit2/WebProcess/WebProcess.cpp
+++ b/WebKit2/WebProcess/WebProcess.cpp
@@ -41,6 +41,7 @@
 #include <WebCore/Page.h>
 #include <WebCore/PageGroup.h>
 #include <WebCore/SchemeRegistry.h>
+#include <WebCore/SecurityOrigin.h>
 #include <WebCore/Settings.h>
 #include <wtf/PassRefPtr.h>
 #include <wtf/RandomNumber.h>
@@ -139,6 +140,9 @@ void WebProcess::initializeWebProcess(const WebProcessCreationParameters& parame
     for (size_t i = 0; i < parameters.urlSchemesRegisteredAsSecure.size(); ++i)
         registerURLSchemeAsSecure(parameters.urlSchemesRegisteredAsSecure[i]);
 
+    for (size_t i = 0; i < parameters.urlSchemesForWhichDomainRelaxationIsForbidden.size(); ++i)
+        setDomainRelaxationForbiddenForURLScheme(parameters.urlSchemesForWhichDomainRelaxationIsForbidden[i]);
+
 #if USE(ACCELERATED_COMPOSITING) && PLATFORM(MAC)
     m_compositingRenderServerPort = parameters.acceleratedCompositingPort.port();
 #endif
@@ -162,6 +166,11 @@ void WebProcess::registerURLSchemeAsSecure(const String& urlScheme) const
     SchemeRegistry::registerURLSchemeAsSecure(urlScheme);
 }
 
+void WebProcess::setDomainRelaxationForbiddenForURLScheme(const String& urlScheme) const
+{
+    SecurityOrigin::setDomainRelaxationForbiddenForURLScheme(true, urlScheme);
+}
+
 void WebProcess::setVisitedLinkTable(const SharedMemory::Handle& handle)
 {
     RefPtr<SharedMemory> sharedMemory = SharedMemory::create(handle, SharedMemory::ReadOnly);
diff --git a/WebKit2/WebProcess/WebProcess.h b/WebKit2/WebProcess/WebProcess.h
index 26ff1df..b0d3703 100644
--- a/WebKit2/WebProcess/WebProcess.h
+++ b/WebKit2/WebProcess/WebProcess.h
@@ -91,6 +91,7 @@ private:
     void setShouldTrackVisitedLinks(bool);
     void registerURLSchemeAsEmptyDocument(const String&);
     void registerURLSchemeAsSecure(const String&) const;
+    void setDomainRelaxationForbiddenForURLScheme(const String&) const;
 #if PLATFORM(WIN)
     void setShouldPaintNativeControls(bool);
 #endif
diff --git a/WebKit2/WebProcess/WebProcess.messages.in b/WebKit2/WebProcess/WebProcess.messages.in
index 291e11c..50b8afb 100644
--- a/WebKit2/WebProcess/WebProcess.messages.in
+++ b/WebKit2/WebProcess/WebProcess.messages.in
@@ -37,6 +37,7 @@ messages -> WebProcess {
     SetCacheModel(uint32_t cacheModel)
     RegisterURLSchemeAsEmptyDocument(WTF::String scheme)
     RegisterURLSchemeAsSecure(WTF::String scheme)
+    SetDomainRelaxationForbiddenForURLScheme(WTF::String scheme)
 #if PLATFORM(WIN)
     SetShouldPaintNativeControls(bool shouldPaintNativeControls)
 #endif

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list