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

paroga at webkit.org paroga at webkit.org
Wed Dec 22 14:18:13 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 14933c5e5bdc9cd1ca3d7d3171cd621823be22cc
Author: paroga at webkit.org <paroga at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Oct 6 15:58:21 2010 +0000

    2010-10-06  Patrick Gansterer  <paroga at webkit.org>
    
            Reviewed by Darin Adler.
    
            Add KURL::protocolIsData()
            https://bugs.webkit.org/show_bug.cgi?id=47219
    
            * page/Page.cpp:
            (WebCore::Page::userStyleSheetLocationChanged):
            * page/SecurityOrigin.cpp:
            (WebCore::SecurityOrigin::taintsCanvas):
            * page/XSSAuditor.cpp:
            (WebCore::XSSAuditor::findInRequest):
            * platform/KURL.h:
            (WebCore::KURL::protocolIsData):
            * platform/network/curl/ResourceHandleManager.cpp:
            (WebCore::ResourceHandleManager::dispatchSynchronousJob):
            (WebCore::ResourceHandleManager::startJob):
            * platform/network/win/ResourceHandleWin.cpp:
            (WebCore::ResourceHandle::start):
            (WebCore::ResourceHandle::fileLoadTimer):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69197 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 14fcc32..b850b40 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,25 @@
+2010-10-06  Patrick Gansterer  <paroga at webkit.org>
+
+        Reviewed by Darin Adler.
+
+        Add KURL::protocolIsData()
+        https://bugs.webkit.org/show_bug.cgi?id=47219
+
+        * page/Page.cpp:
+        (WebCore::Page::userStyleSheetLocationChanged):
+        * page/SecurityOrigin.cpp:
+        (WebCore::SecurityOrigin::taintsCanvas):
+        * page/XSSAuditor.cpp:
+        (WebCore::XSSAuditor::findInRequest):
+        * platform/KURL.h:
+        (WebCore::KURL::protocolIsData):
+        * platform/network/curl/ResourceHandleManager.cpp:
+        (WebCore::ResourceHandleManager::dispatchSynchronousJob):
+        (WebCore::ResourceHandleManager::startJob):
+        * platform/network/win/ResourceHandleWin.cpp:
+        (WebCore::ResourceHandle::start):
+        (WebCore::ResourceHandle::fileLoadTimer):
+
 2010-10-06  Alexander Pavlov  <apavlov at chromium.org>
 
         Reviewed by Pavel Feldman.
diff --git a/WebCore/page/Page.cpp b/WebCore/page/Page.cpp
index fb0a9c9..9a3d3d7 100644
--- a/WebCore/page/Page.cpp
+++ b/WebCore/page/Page.cpp
@@ -638,7 +638,7 @@ void Page::userStyleSheetLocationChanged()
 
     // Data URLs with base64-encoded UTF-8 style sheets are common. We can process them
     // synchronously and avoid using a loader. 
-    if (url.protocolIs("data") && url.string().startsWith("data:text/css;charset=utf-8;base64,")) {
+    if (url.protocolIsData() && url.string().startsWith("data:text/css;charset=utf-8;base64,")) {
         m_didLoadUserStyleSheet = true;
 
         Vector<char> styleSheetAsUTF8;
diff --git a/WebCore/page/SecurityOrigin.cpp b/WebCore/page/SecurityOrigin.cpp
index 6001983..f0e999f 100644
--- a/WebCore/page/SecurityOrigin.cpp
+++ b/WebCore/page/SecurityOrigin.cpp
@@ -267,7 +267,7 @@ bool SecurityOrigin::taintsCanvas(const KURL& url) const
     // we special case data URLs below. If we change to match HTML5 w.r.t.
     // data URL security, then we can remove this function in favor of
     // !canRequest.
-    if (url.protocolIs("data"))
+    if (url.protocolIsData())
         return false;
 
     return true;
diff --git a/WebCore/page/XSSAuditor.cpp b/WebCore/page/XSSAuditor.cpp
index 1a6ff02..f0e74ea 100644
--- a/WebCore/page/XSSAuditor.cpp
+++ b/WebCore/page/XSSAuditor.cpp
@@ -392,7 +392,7 @@ bool XSSAuditor::findInRequest(Frame* frame, const FindTask& task) const
     } else
         canonicalizedString = task.string;
 
-    if (frame->document()->url().protocolIs("data"))
+    if (frame->document()->url().protocolIsData())
         return false;
 
     canonicalizedString = canonicalize(canonicalizedString);
diff --git a/WebCore/platform/KURL.h b/WebCore/platform/KURL.h
index e5e8ec4..aca1aba 100644
--- a/WebCore/platform/KURL.h
+++ b/WebCore/platform/KURL.h
@@ -141,6 +141,7 @@ public:
     // Returns true if the current URL's protocol is the same as the null-
     // terminated ASCII argument. The argument must be lower-case.
     bool protocolIs(const char*) const;
+    bool protocolIsData() const { return protocolIs("data"); }
     bool protocolInHTTPFamily() const;
     bool isLocalFile() const;
 
diff --git a/WebCore/platform/network/curl/ResourceHandleManager.cpp b/WebCore/platform/network/curl/ResourceHandleManager.cpp
index f0de23e..2e4259c 100644
--- a/WebCore/platform/network/curl/ResourceHandleManager.cpp
+++ b/WebCore/platform/network/curl/ResourceHandleManager.cpp
@@ -576,7 +576,7 @@ void ResourceHandleManager::dispatchSynchronousJob(ResourceHandle* job)
 {
     KURL kurl = job->firstRequest().url();
 
-    if (kurl.protocolIs("data")) {
+    if (kurl.protocolIsData()) {
         handleDataURL(job);
         return;
     }
@@ -607,7 +607,7 @@ void ResourceHandleManager::startJob(ResourceHandle* job)
 {
     KURL kurl = job->firstRequest().url();
 
-    if (kurl.protocolIs("data")) {
+    if (kurl.protocolIsData()) {
         handleDataURL(job);
         return;
     }
diff --git a/WebCore/platform/network/win/ResourceHandleWin.cpp b/WebCore/platform/network/win/ResourceHandleWin.cpp
index 511da88..28035b9 100644
--- a/WebCore/platform/network/win/ResourceHandleWin.cpp
+++ b/WebCore/platform/network/win/ResourceHandleWin.cpp
@@ -260,7 +260,7 @@ bool ResourceHandle::onRequestComplete()
 
 bool ResourceHandle::start(NetworkingContext* context)
 {
-    if (firstRequest().url().isLocalFile() || firstRequest().url().protocolIs("data")) {
+    if (firstRequest().url().isLocalFile() || firstRequest().url().protocolIsData()) {
         ref(); // balanced by deref in fileLoadTimer
         if (d->m_loadSynchronously)
             fileLoadTimer(0);
@@ -350,7 +350,7 @@ void ResourceHandle::fileLoadTimer(Timer<ResourceHandle>*)
     RefPtr<ResourceHandle> protector(this);
     deref(); // balances ref in start
 
-    if (firstRequest().url().protocolIs("data")) {
+    if (firstRequest().url().protocolIsData()) {
         handleDataURL(this);
         return;
     }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list