[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

bweinstein at apple.com bweinstein at apple.com
Wed Apr 7 23:35:15 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 1abf02c8183ca93d4d94d3cf78a3208c8a37b113
Author: bweinstein at apple.com <bweinstein at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Nov 12 22:24:26 2009 +0000

    Fixes <http://webkit.org/b/31260>.
    Web Inspector: Main Resources Other than HTML are mis-detected.
    
    Reviewed by Tim Hatcher.
    
    Even if the resource is a main resource, look at its CachedResource type,
    because it might be an image, stylesheet, or JavaScript file, and we
    want to show them all correctly.
    
    * inspector/InspectorResource.cpp:
    (WebCore::InspectorResource::cachedResourceType): Move this method out so it can be called in multiple places.
    (WebCore::InspectorResource::type):
    * inspector/InspectorResource.h:
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50905 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index c3b63d4..aea4b6d 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2009-11-12  Brian Weinstein  <bweinstein at apple.com>
+
+        Reviewed by Tim Hatcher.
+
+        Fixes <http://webkit.org/b/31260>.
+        Web Inspector: Main Resources Other than HTML are mis-detected.
+        
+        Even if the resource is a main resource, look at its CachedResource type, 
+        because it might be an image, stylesheet, or JavaScript file, and we
+        want to show them all correctly.
+
+        * inspector/InspectorResource.cpp:
+        (WebCore::InspectorResource::cachedResourceType): Move this method out so it can be called in multiple places.
+        (WebCore::InspectorResource::type): 
+        * inspector/InspectorResource.h:
+
 2009-11-12  Jens Alfke  <snej at chromium.org>
 
         Reviewed by Dimitri Glazkov.
diff --git a/WebCore/inspector/InspectorResource.cpp b/WebCore/inspector/InspectorResource.cpp
index b8bb22b..fe1522e 100644
--- a/WebCore/inspector/InspectorResource.cpp
+++ b/WebCore/inspector/InspectorResource.cpp
@@ -240,18 +240,10 @@ CachedResource* InspectorResource::cachedResource() const
     return cachedResource;
 }
 
-InspectorResource::Type InspectorResource::type() const
+InspectorResource::Type InspectorResource::cachedResourceType() const
 {
-    if (!m_xmlHttpResponseText.isNull())
-        return XHR;
-
-    if (m_requestURL == m_loader->requestURL())
-        return Doc;
-
-    if (m_loader->frameLoader() && m_requestURL == m_loader->frameLoader()->iconURL())
-        return Image;
-
     CachedResource* cachedResource = this->cachedResource();
+
     if (!cachedResource)
         return Other;
 
@@ -272,6 +264,26 @@ InspectorResource::Type InspectorResource::type() const
     }
 }
 
+InspectorResource::Type InspectorResource::type() const
+{
+    if (!m_xmlHttpResponseText.isNull())
+        return XHR;
+
+    if (m_requestURL == m_loader->requestURL()) {
+        InspectorResource::Type resourceType = cachedResourceType();
+        if (resourceType == Other)
+            return Doc;
+
+        return resourceType;
+    }
+
+    if (m_loader->frameLoader() && m_requestURL == m_loader->frameLoader()->iconURL())
+        return Image;
+    
+    return cachedResourceType();
+    
+}
+
 void InspectorResource::setXMLHttpResponseText(const ScriptString& data)
 {
     m_xmlHttpResponseText = data;
diff --git a/WebCore/inspector/InspectorResource.h b/WebCore/inspector/InspectorResource.h
index 8aad900..7ee1966 100644
--- a/WebCore/inspector/InspectorResource.h
+++ b/WebCore/inspector/InspectorResource.h
@@ -148,6 +148,7 @@ namespace WebCore {
         InspectorResource(long long identifier, DocumentLoader*);
         Type type() const;
 
+        Type cachedResourceType() const;
         CachedResource* cachedResource() const;
 
         long long m_identifier;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list