Unreviewed, rolling out r112201.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Mar 2012 10:43:36 +0000 (10:43 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Mar 2012 10:43:36 +0000 (10:43 +0000)
http://trac.webkit.org/changeset/112201
https://bugs.webkit.org/show_bug.cgi?id=82302

Breaks chromium's WebPageSerializerTest.HTMLNodes test
(Requested by pfeldman on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-03-27

* loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::error):
(WebCore):
* loader/cache/CachedCSSStyleSheet.h:
(CachedCSSStyleSheet):
* loader/cache/CachedFont.cpp:
(WebCore):
(WebCore::CachedFont::error):
* loader/cache/CachedFont.h:
(CachedFont):
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::error):
* loader/cache/CachedResource.h:
(CachedResource):
* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::error):
(WebCore):
* loader/cache/CachedScript.h:
(CachedScript):
* loader/cache/CachedXSLStyleSheet.cpp:
(WebCore::CachedXSLStyleSheet::error):
(WebCore):
* loader/cache/CachedXSLStyleSheet.h:
(CachedXSLStyleSheet):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@112245 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/loader/cache/CachedCSSStyleSheet.cpp
Source/WebCore/loader/cache/CachedCSSStyleSheet.h
Source/WebCore/loader/cache/CachedFont.cpp
Source/WebCore/loader/cache/CachedFont.h
Source/WebCore/loader/cache/CachedImage.cpp
Source/WebCore/loader/cache/CachedResource.h
Source/WebCore/loader/cache/CachedScript.cpp
Source/WebCore/loader/cache/CachedScript.h
Source/WebCore/loader/cache/CachedXSLStyleSheet.cpp
Source/WebCore/loader/cache/CachedXSLStyleSheet.h

index 986acc4..2cdc2e5 100644 (file)
@@ -1,3 +1,37 @@
+2012-03-27  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r112201.
+        http://trac.webkit.org/changeset/112201
+        https://bugs.webkit.org/show_bug.cgi?id=82302
+
+        Breaks chromium's WebPageSerializerTest.HTMLNodes test
+        (Requested by pfeldman on #webkit).
+
+        * loader/cache/CachedCSSStyleSheet.cpp:
+        (WebCore::CachedCSSStyleSheet::error):
+        (WebCore):
+        * loader/cache/CachedCSSStyleSheet.h:
+        (CachedCSSStyleSheet):
+        * loader/cache/CachedFont.cpp:
+        (WebCore):
+        (WebCore::CachedFont::error):
+        * loader/cache/CachedFont.h:
+        (CachedFont):
+        * loader/cache/CachedImage.cpp:
+        (WebCore::CachedImage::error):
+        * loader/cache/CachedResource.h:
+        (CachedResource):
+        * loader/cache/CachedScript.cpp:
+        (WebCore::CachedScript::error):
+        (WebCore):
+        * loader/cache/CachedScript.h:
+        (CachedScript):
+        * loader/cache/CachedXSLStyleSheet.cpp:
+        (WebCore::CachedXSLStyleSheet::error):
+        (WebCore):
+        * loader/cache/CachedXSLStyleSheet.h:
+        (CachedXSLStyleSheet):
+
 2012-03-27  Levi Weintraub  <leviw@chromium.org>
 
         LayoutRepainter: Remove unused constructor parameter and update to LayoutUnits
index e8f00b7..3b52cd6 100644 (file)
@@ -117,6 +117,14 @@ void CachedCSSStyleSheet::checkNotify()
         c->setCSSStyleSheet(m_resourceRequest.url(), m_response.url(), m_decoder->encoding().name(), this);
 }
 
+void CachedCSSStyleSheet::error(CachedResource::Status status)
+{
+    setStatus(status);
+    ASSERT(errorOccurred());
+    setLoading(false);
+    checkNotify();
+}
+
 bool CachedCSSStyleSheet::canUseSheet(bool enforceMIMEType, bool* hasValidMIMEType) const
 {
     if (errorOccurred())
index 1015f3d..1c0ae78 100644 (file)
@@ -49,14 +49,15 @@ namespace WebCore {
         virtual void setEncoding(const String&);
         virtual String encoding() const;
         virtual void data(PassRefPtr<SharedBuffer> data, bool allDataReceived);
+        virtual void error(CachedResource::Status);
+
+        void checkNotify();
     
     private:
         bool canUseSheet(bool enforceMIMEType, bool* hasValidMIMEType) const;
         virtual PurgePriority purgePriority() const { return PurgeLast; }
 
     protected:
-        virtual void checkNotify();
-
         RefPtr<TextResourceDecoder> m_decoder;
         String m_decodedSheetText;
     };
index ae791d3..dc8567f 100644 (file)
@@ -198,4 +198,13 @@ void CachedFont::checkNotify()
          c->fontLoaded(this);
 }
 
+
+void CachedFont::error(CachedResource::Status status)
+{
+    setStatus(status);
+    ASSERT(errorOccurred());
+    setLoading(false);
+    checkNotify();
+}
+
 }
index f1fe5f3..e0b5b7d 100644 (file)
@@ -53,8 +53,12 @@ public:
 
     virtual void didAddClient(CachedResourceClient*);
     virtual void data(PassRefPtr<SharedBuffer> data, bool allDataReceived);
+    virtual void error(CachedResource::Status);
 
     virtual void allClientsRemoved();
+
+    void checkNotify();
+
     void beginLoadIfNeeded(CachedResourceLoader* dl);
     bool stillNeedsLoad() const { return !m_loadInitiated; }
 
@@ -67,7 +71,6 @@ public:
 #endif
 
 private:
-    virtual void checkNotify();
     FontCustomPlatformData* m_fontData;
     bool m_loadInitiated;
 
index 1b5969d..10d7ad3 100644 (file)
@@ -375,11 +375,14 @@ void CachedImage::data(PassRefPtr<SharedBuffer> data, bool allDataReceived)
 
 void CachedImage::error(CachedResource::Status status)
 {
-    CachedResource::error(status);
     checkShouldPaintBrokenImage();
     clear();
+    setStatus(status);
+    ASSERT(errorOccurred());
     m_data.clear();
     notifyObservers();
+    setLoading(false);
+    checkNotify();
 }
 
 void CachedImage::setResponse(const ResourceResponse& response)
index 14430e5..c07b231 100644 (file)
@@ -248,7 +248,7 @@ public:
     double loadFinishTime() const { return m_loadFinishTime; }
 
 protected:
-    virtual void checkNotify();
+    void checkNotify();
 
     void setEncodedSize(unsigned);
     void setDecodedSize(unsigned);
index 93dc670..8c83bca 100644 (file)
@@ -104,6 +104,14 @@ void CachedScript::data(PassRefPtr<SharedBuffer> data, bool allDataReceived)
     checkNotify();
 }
 
+void CachedScript::error(CachedResource::Status status)
+{
+    setStatus(status);
+    ASSERT(errorOccurred());
+    setLoading(false);
+    checkNotify();
+}
+
 void CachedScript::destroyDecodedData()
 {
     m_script = String();
index e8d56ae..1a76c18 100644 (file)
@@ -53,6 +53,7 @@ namespace WebCore {
         virtual void setEncoding(const String&);
         virtual String encoding() const;
         virtual void data(PassRefPtr<SharedBuffer> data, bool allDataReceived);
+        virtual void error(Status);
 
         virtual void destroyDecodedData();
 #if USE(JSC)        
index ca4d0e1..336fce4 100644 (file)
@@ -88,6 +88,14 @@ void CachedXSLStyleSheet::checkNotify()
         c->setXSLStyleSheet(m_resourceRequest.url(), m_response.url(), m_sheet);
 }
 
+void CachedXSLStyleSheet::error(CachedResource::Status status)
+{
+    setStatus(status);
+    ASSERT(errorOccurred());
+    setLoading(false);
+    checkNotify();
+}
+
 #endif
 
 }
index dce263c..b8f7283 100644 (file)
@@ -46,10 +46,11 @@ namespace WebCore {
         virtual void setEncoding(const String&);
         virtual String encoding() const;
         virtual void data(PassRefPtr<SharedBuffer> data, bool allDataReceived);
+        virtual void error(CachedResource::Status);
+        
+        void checkNotify();
         
     protected:
-        virtual void checkNotify();
-
         String m_sheet;
         RefPtr<TextResourceDecoder> m_decoder;
     };