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

abarth at webkit.org abarth at webkit.org
Wed Dec 22 15:33:20 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 8b48cdbc656f57191a8b5cb09ee1929ffbb9d37b
Author: abarth at webkit.org <abarth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Nov 8 08:59:24 2010 +0000

    2010-11-08  Adam Barth  <abarth at webkit.org>
    
            Reviewed by Antti Koivisto.
    
            Rename CachedResourceLoader::m_doc to CachedResourceLoader::m_document
            https://bugs.webkit.org/show_bug.cgi?id=49163
    
            The usual convention is to use "document", not "doc" to refer to the
            document.
    
            * css/CSSCursorImageValue.cpp:
            (WebCore::CSSCursorImageValue::cachedImage):
            * dom/XMLDocumentParserLibxml2.cpp:
            (WebCore::shouldAllowExternalLoad):
            * loader/cache/CachedResourceLoader.cpp:
            (WebCore::CachedResourceLoader::CachedResourceLoader):
            (WebCore::CachedResourceLoader::frame):
            (WebCore::CachedResourceLoader::requestImage):
            (WebCore::CachedResourceLoader::canRequest):
            (WebCore::CachedResourceLoader::requestResource):
            (WebCore::CachedResourceLoader::printAccessDeniedMessage):
            (WebCore::CachedResourceLoader::preload):
            (WebCore::CachedResourceLoader::checkForPendingPreloads):
            (WebCore::CachedResourceLoader::requestPreload):
            * loader/cache/CachedResourceLoader.h:
            (WebCore::CachedResourceLoader::document):
            * loader/cache/MemoryCache.cpp:
            (WebCore::MemoryCache::requestResource):
            * loader/loader.cpp:
            (WebCore::Loader::load):
            (WebCore::Loader::Host::servePendingRequests):
            (WebCore::Loader::Host::didFinishLoading):
            (WebCore::Loader::Host::didFail):
            * xml/XSLTProcessorLibxslt.cpp:
            (WebCore::docLoaderFunc):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71503 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 93bf66e..879dae7 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,39 @@
+2010-11-08  Adam Barth  <abarth at webkit.org>
+
+        Reviewed by Antti Koivisto.
+
+        Rename CachedResourceLoader::m_doc to CachedResourceLoader::m_document
+        https://bugs.webkit.org/show_bug.cgi?id=49163
+
+        The usual convention is to use "document", not "doc" to refer to the
+        document.
+
+        * css/CSSCursorImageValue.cpp:
+        (WebCore::CSSCursorImageValue::cachedImage):
+        * dom/XMLDocumentParserLibxml2.cpp:
+        (WebCore::shouldAllowExternalLoad):
+        * loader/cache/CachedResourceLoader.cpp:
+        (WebCore::CachedResourceLoader::CachedResourceLoader):
+        (WebCore::CachedResourceLoader::frame):
+        (WebCore::CachedResourceLoader::requestImage):
+        (WebCore::CachedResourceLoader::canRequest):
+        (WebCore::CachedResourceLoader::requestResource):
+        (WebCore::CachedResourceLoader::printAccessDeniedMessage):
+        (WebCore::CachedResourceLoader::preload):
+        (WebCore::CachedResourceLoader::checkForPendingPreloads):
+        (WebCore::CachedResourceLoader::requestPreload):
+        * loader/cache/CachedResourceLoader.h:
+        (WebCore::CachedResourceLoader::document):
+        * loader/cache/MemoryCache.cpp:
+        (WebCore::MemoryCache::requestResource):
+        * loader/loader.cpp:
+        (WebCore::Loader::load):
+        (WebCore::Loader::Host::servePendingRequests):
+        (WebCore::Loader::Host::didFinishLoading):
+        (WebCore::Loader::Host::didFail):
+        * xml/XSLTProcessorLibxslt.cpp:
+        (WebCore::docLoaderFunc):
+
 2010-11-07  Adam Barth  <abarth at webkit.org>
 
         Unreviewed.  Remove some unneeded includes.
diff --git a/WebCore/css/CSSCursorImageValue.cpp b/WebCore/css/CSSCursorImageValue.cpp
index 2b09ab3..b0dda58 100644
--- a/WebCore/css/CSSCursorImageValue.cpp
+++ b/WebCore/css/CSSCursorImageValue.cpp
@@ -116,8 +116,8 @@ StyleCachedImage* CSSCursorImageValue::cachedImage(CachedResourceLoader* loader)
     String url = getStringValue();
 
 #if ENABLE(SVG) 
-    if (isSVGCursorIdentifier(url) && loader && loader->doc()) {
-        if (SVGCursorElement* cursorElement = resourceReferencedByCursorElement(url, loader->doc()))
+    if (isSVGCursorIdentifier(url) && loader && loader->document()) {
+        if (SVGCursorElement* cursorElement = resourceReferencedByCursorElement(url, loader->document()))
             url = cursorElement->href();
     }
 #endif
diff --git a/WebCore/dom/XMLDocumentParserLibxml2.cpp b/WebCore/dom/XMLDocumentParserLibxml2.cpp
index 5b5ac89..77b0af6 100644
--- a/WebCore/dom/XMLDocumentParserLibxml2.cpp
+++ b/WebCore/dom/XMLDocumentParserLibxml2.cpp
@@ -403,7 +403,7 @@ static bool shouldAllowExternalLoad(const KURL& url)
     // retrieved content.  If we had more context, we could potentially allow
     // the parser to load a DTD.  As things stand, we take the conservative
     // route and allow same-origin requests only.
-    if (!XMLDocumentParserScope::currentCachedResourceLoader->doc()->securityOrigin()->canRequest(url)) {
+    if (!XMLDocumentParserScope::currentCachedResourceLoader->document()->securityOrigin()->canRequest(url)) {
         XMLDocumentParserScope::currentCachedResourceLoader->printAccessDeniedMessage(url);
         return false;
     }
diff --git a/WebCore/loader/cache/CachedResourceLoader.cpp b/WebCore/loader/cache/CachedResourceLoader.cpp
index c129c3f..3d4244c 100644
--- a/WebCore/loader/cache/CachedResourceLoader.cpp
+++ b/WebCore/loader/cache/CachedResourceLoader.cpp
@@ -50,9 +50,9 @@
 
 namespace WebCore {
 
-CachedResourceLoader::CachedResourceLoader(Document* doc)
+CachedResourceLoader::CachedResourceLoader(Document* document)
     : m_cache(cache())
-    , m_doc(doc)
+    , m_document(document)
     , m_requestCount(0)
     , m_autoLoadImages(true)
     , m_loadInProgress(false)
@@ -78,7 +78,7 @@ CachedResourceLoader::~CachedResourceLoader()
 
 Frame* CachedResourceLoader::frame() const
 {
-    return m_doc->frame();
+    return m_document->frame();
 }
 
 void CachedResourceLoader::checkForReload(const KURL& fullURL)
@@ -128,7 +128,7 @@ CachedImage* CachedResourceLoader::requestImage(const String& url)
             return 0;
 
         if (f->loader()->pageDismissalEventBeingDispatched()) {
-            KURL completeURL = m_doc->completeURL(url);
+            KURL completeURL = m_document->completeURL(url);
             if (completeURL.isValid() && canRequest(CachedResource::ImageResource, completeURL))
                 PingLoader::loadImage(f, completeURL);
             return 0;
@@ -195,7 +195,7 @@ bool CachedResourceLoader::canRequest(CachedResource::Type type, const KURL& url
         break;
 #if ENABLE(XSLT)
     case CachedResource::XSLStyleSheet:
-        if (!m_doc->securityOrigin()->canRequest(url)) {
+        if (!m_document->securityOrigin()->canRequest(url)) {
             printAccessDeniedMessage(url);
             return false;
         }
@@ -220,7 +220,7 @@ bool CachedResourceLoader::canRequest(CachedResource::Type type, const KURL& url
 #endif
         // These resource can inject script into the current document.
         if (Frame* f = frame())
-            f->loader()->checkIfRunInsecureContent(m_doc->securityOrigin(), url);
+            f->loader()->checkIfRunInsecureContent(m_document->securityOrigin(), url);
         break;
     case CachedResource::ImageResource:
     case CachedResource::CSSStyleSheet:
@@ -247,7 +247,7 @@ bool CachedResourceLoader::canRequest(CachedResource::Type type, const KURL& url
 
 CachedResource* CachedResourceLoader::requestResource(CachedResource::Type type, const String& url, const String& charset, bool isPreload)
 {
-    KURL fullURL = m_doc->completeURL(url);
+    KURL fullURL = m_document->completeURL(url);
 
     if (!fullURL.isValid() || !canRequest(type, fullURL))
         return 0;
@@ -288,9 +288,9 @@ void CachedResourceLoader::printAccessDeniedMessage(const KURL& url) const
     if (!settings || settings->privateBrowsingEnabled())
         return;
 
-    String message = m_doc->url().isNull() ?
+    String message = m_document->url().isNull() ?
         makeString("Unsafe attempt to load URL ", url.string(), '.') :
-        makeString("Unsafe attempt to load URL ", url.string(), " from frame with URL ", m_doc->url().string(), ". Domains, protocols and ports must match.\n");
+        makeString("Unsafe attempt to load URL ", url.string(), " from frame with URL ", m_document->url().string(), ". Domains, protocols and ports must match.\n");
 
     // FIXME: provide a real line number and source URL.
     frame()->domWindow()->console()->addMessage(OtherMessageSource, LogMessageType, ErrorMessageLevel, message, 1, String());
@@ -376,7 +376,7 @@ int CachedResourceLoader::requestCount()
     
 void CachedResourceLoader::preload(CachedResource::Type type, const String& url, const String& charset, bool referencedFromBody)
 {
-    bool hasRendering = m_doc->body() && m_doc->body()->renderer();
+    bool hasRendering = m_document->body() && m_document->body()->renderer();
     if (!hasRendering && (referencedFromBody || type == CachedResource::ImageResource)) {
         // Don't preload images or body resources before we have something to draw. This prevents
         // preloads from body delaying first display when bandwidth is limited.
@@ -390,12 +390,12 @@ void CachedResourceLoader::preload(CachedResource::Type type, const String& url,
 void CachedResourceLoader::checkForPendingPreloads() 
 {
     unsigned count = m_pendingPreloads.size();
-    if (!count || !m_doc->body() || !m_doc->body()->renderer())
+    if (!count || !m_document->body() || !m_document->body()->renderer())
         return;
     for (unsigned i = 0; i < count; ++i) {
         PendingPreload& preload = m_pendingPreloads[i];
         // Don't request preload if the resource already loaded normally (this will result in double load if the page is being reloaded with cached results ignored).
-        if (!cachedResource(m_doc->completeURL(preload.m_url)))
+        if (!cachedResource(m_document->completeURL(preload.m_url)))
             requestPreload(preload.m_type, preload.m_url, preload.m_charset);
     }
     m_pendingPreloads.clear();
@@ -405,7 +405,7 @@ void CachedResourceLoader::requestPreload(CachedResource::Type type, const Strin
 {
     String encoding;
     if (type == CachedResource::Script || type == CachedResource::CSSStyleSheet)
-        encoding = charset.isEmpty() ? m_doc->frame()->loader()->writer()->encoding() : charset;
+        encoding = charset.isEmpty() ? m_document->frame()->loader()->writer()->encoding() : charset;
 
     CachedResource* resource = requestResource(type, url, encoding, true);
     if (!resource || (m_preloads && m_preloads->contains(resource)))
diff --git a/WebCore/loader/cache/CachedResourceLoader.h b/WebCore/loader/cache/CachedResourceLoader.h
index be2f3ae..f371a0e 100644
--- a/WebCore/loader/cache/CachedResourceLoader.h
+++ b/WebCore/loader/cache/CachedResourceLoader.h
@@ -82,7 +82,7 @@ public:
     CachePolicy cachePolicy() const;
     
     Frame* frame() const; // Can be NULL
-    Document* doc() const { return m_doc; }
+    Document* document() const { return m_document; }
 
     void removeCachedResource(CachedResource*) const;
 
@@ -112,7 +112,7 @@ private:
     MemoryCache* m_cache;
     HashSet<String> m_reloadedURLs;
     mutable DocumentResourceMap m_documentResources;
-    Document* m_doc;
+    Document* m_document;
     
     int m_requestCount;
     
diff --git a/WebCore/loader/cache/MemoryCache.cpp b/WebCore/loader/cache/MemoryCache.cpp
index 4679f06..25af774 100644
--- a/WebCore/loader/cache/MemoryCache.cpp
+++ b/WebCore/loader/cache/MemoryCache.cpp
@@ -111,10 +111,10 @@ CachedResource* MemoryCache::requestResource(CachedResourceLoader* cachedResourc
         return 0;
     }
 
-    if (!cachedResourceLoader->doc()->securityOrigin()->canDisplay(url)) {
+    if (!cachedResourceLoader->document()->securityOrigin()->canDisplay(url)) {
         LOG(ResourceLoading, "...URL was not allowed by SecurityOrigin");
         if (!requestIsPreload)
-            FrameLoader::reportLocalLoadFailed(cachedResourceLoader->doc()->frame(), url.string());
+            FrameLoader::reportLocalLoadFailed(cachedResourceLoader->document()->frame(), url.string());
         return 0;
     }
     
diff --git a/WebCore/loader/loader.cpp b/WebCore/loader/loader.cpp
index 6c1736c..bd27312 100644
--- a/WebCore/loader/loader.cpp
+++ b/WebCore/loader/loader.cpp
@@ -151,7 +151,7 @@ void Loader::load(CachedResourceLoader* cachedResourceLoader, CachedResource* re
         host->servePendingRequests(priority);
     } else {
         // Handle asynchronously so early low priority requests don't get scheduled before later high priority ones
-        InspectorInstrumentation::didScheduleResourceRequest(cachedResourceLoader->doc(), resource->url());
+        InspectorInstrumentation::didScheduleResourceRequest(cachedResourceLoader->document(), resource->url());
         scheduleServePendingRequests();
     }
 }
@@ -334,7 +334,7 @@ void Loader::Host::servePendingRequests(RequestQueue& requestsPending, bool& ser
         // For named hosts - which are only http(s) hosts - we should always enforce the connection limit.
         // For non-named hosts - everything but http(s) - we should only enforce the limit if the document isn't done parsing 
         // and we don't know all stylesheets yet.
-        bool shouldLimitRequests = !m_name.isNull() || cachedResourceLoader->doc()->parsing() || !cachedResourceLoader->doc()->haveStylesheetsLoaded();
+        bool shouldLimitRequests = !m_name.isNull() || cachedResourceLoader->document()->parsing() || !cachedResourceLoader->document()->haveStylesheetsLoaded();
         if (shouldLimitRequests && m_requestsLoading.size() + m_nonCachedRequestsInFlight >= m_maxRequestsInFlight) {
             serveLowerPriority = false;
             return;
@@ -371,7 +371,7 @@ void Loader::Host::servePendingRequests(RequestQueue& requestsPending, bool& ser
             resourceRequest.setHTTPHeaderField("Purpose", "prefetch");
 #endif
 
-        RefPtr<SubresourceLoader> loader = SubresourceLoader::create(cachedResourceLoader->doc()->frame(),
+        RefPtr<SubresourceLoader> loader = SubresourceLoader::create(cachedResourceLoader->document()->frame(),
             this, resourceRequest, request->shouldDoSecurityCheck(), request->sendResourceLoadCallbacks());
         if (loader) {
             m_requestsLoading.add(loader.release(), request);
@@ -405,7 +405,7 @@ void Loader::Host::didFinishLoading(SubresourceLoader* loader)
     CachedResourceLoader* cachedResourceLoader = request->cachedResourceLoader();
     // Prevent the document from being destroyed before we are done with
     // the cachedResourceLoader that it will delete when the document gets deleted.
-    RefPtr<Document> protector(cachedResourceLoader->doc());
+    RefPtr<Document> protector(cachedResourceLoader->document());
     if (!request->isMultipart())
         cachedResourceLoader->decrementRequestCount(request->cachedResource());
 
@@ -451,7 +451,7 @@ void Loader::Host::didFail(SubresourceLoader* loader, bool cancelled)
     CachedResourceLoader* cachedResourceLoader = request->cachedResourceLoader();
     // Prevent the document from being destroyed before we are done with
     // the cachedResourceLoader that it will delete when the document gets deleted.
-    RefPtr<Document> protector(cachedResourceLoader->doc());
+    RefPtr<Document> protector(cachedResourceLoader->document());
     if (!request->isMultipart())
         cachedResourceLoader->decrementRequestCount(request->cachedResource());
 
diff --git a/WebCore/xml/XSLTProcessorLibxslt.cpp b/WebCore/xml/XSLTProcessorLibxslt.cpp
index c2869c7..a307c21 100644
--- a/WebCore/xml/XSLTProcessorLibxslt.cpp
+++ b/WebCore/xml/XSLTProcessorLibxslt.cpp
@@ -117,10 +117,10 @@ static xmlDocPtr docLoaderFunc(const xmlChar* uri,
 
         Vector<char> data;
 
-        bool requestAllowed = globalCachedResourceLoader->frame() && globalCachedResourceLoader->doc()->securityOrigin()->canRequest(url);
+        bool requestAllowed = globalCachedResourceLoader->frame() && globalCachedResourceLoader->document()->securityOrigin()->canRequest(url);
         if (requestAllowed) {
             globalCachedResourceLoader->frame()->loader()->loadResourceSynchronously(url, AllowStoredCredentials, error, response, data);
-            requestAllowed = globalCachedResourceLoader->doc()->securityOrigin()->canRequest(response.url());
+            requestAllowed = globalCachedResourceLoader->document()->securityOrigin()->canRequest(response.url());
         }
         if (!requestAllowed) {
             data.clear();

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list