[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75

bweinstein at apple.com bweinstein at apple.com
Thu Oct 29 20:49:11 UTC 2009


The following commit has been merged in the webkit-1.1 branch:
commit 99350211b90b21510975f25f0a44395ff8b26811
Author: bweinstein at apple.com <bweinstein at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Oct 20 20:50:21 2009 +0000

    Fixes <http://webkit.org/b/30421>.
    Web Inpsector: Local Files can show up on Cookies List with Cookies from other Domain.
    
    Reviewed by Alice Liu.
    
    When a page like Google generates an about:blank, it shows up as a local file on
    the list of Cookie domains, but has all of the cookies of Google. When we are adding
    cookie domains to the inspector, we should only add the domain is the URL of the resource
    is in the HTTP protocol family or a file URL.
    
    * inspector/InspectorController.cpp:
    (WebCore::InspectorController::populateScriptObjects):
    (WebCore::InspectorController::didFinishLoading):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49883 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 71b3f8e..426afb4 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2009-10-20  Brian Weinstein  <bweinstein at apple.com>
+
+        Reviewed by Alice Liu.
+
+        Fixes <http://webkit.org/b/30421>.
+        Web Inpsector: Local Files can show up on Cookies List with Cookies from other Domain.
+
+        When a page like Google generates an about:blank, it shows up as a local file on
+        the list of Cookie domains, but has all of the cookies of Google. When we are adding
+        cookie domains to the inspector, we should only add the domain is the URL of the resource
+        is in the HTTP protocol family or a file URL.
+
+        * inspector/InspectorController.cpp:
+        (WebCore::InspectorController::populateScriptObjects):
+        (WebCore::InspectorController::didFinishLoading):
+
 2009-10-20  Mark Mentovai  <mark at chromium.org>
 
         Reviewed by Darin Fisher.
diff --git a/WebCore/inspector/InspectorController.cpp b/WebCore/inspector/InspectorController.cpp
index a5b8cbf..1ea79e9 100644
--- a/WebCore/inspector/InspectorController.cpp
+++ b/WebCore/inspector/InspectorController.cpp
@@ -653,7 +653,9 @@ void InspectorController::populateScriptObjects()
     ResourcesMap::iterator resourcesEnd = m_resources.end();
     for (ResourcesMap::iterator it = m_resources.begin(); it != resourcesEnd; ++it) {
         it->second->createScriptObject(m_frontend.get());
-        m_frontend->addCookieDomain(it->second->frame()->document()->url().host());
+        KURL resourceURL = it->second->frame()->document()->url();
+        if (resourceURL.protocolInHTTPFamily() || resourceURL.protocolIs("file"))
+            m_frontend->addCookieDomain(resourceURL.host());
     }
 
     unsigned messageCount = m_consoleMessages.size();
@@ -982,7 +984,9 @@ void InspectorController::didFinishLoading(DocumentLoader*, unsigned long identi
 
     if (windowVisible()) {
         resource->updateScriptObject(m_frontend.get());
-        m_frontend->addCookieDomain(resource->frame()->document()->url().host());
+        KURL resourceURL = resource->frame()->document()->url();
+        if (resourceURL.protocolInHTTPFamily() || resourceURL.protocolIs("file"))
+            m_frontend->addCookieDomain(resourceURL.host());
     }
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list