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 986acc49a0c9dde86245f1144945bf671172a11f..2cdc2e5cdd4174bba0e83e510ba5bbf38a2a3cfb 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 e8f00b74e4b7f68cc0671b9ddff9e5c9872c374d..3b52cd6dc605b1e2d348c9391ab63469beaacd94 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 1015f3d4771b44ba0284b299b28bede1633687c6..1c0ae78b1b7308814f1479049947e0a9be16319c 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 ae791d31252d3918b90ca9474f8b5fb1e8e3ddb2..dc8567fb317a931366797a240c21b3808742c1af 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 f1fe5f303f003cffa342b8bef2a324b21e734953..e0b5b7dac49f194581274ad30829bd735e735261 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 1b5969d65c9f880c526b212c23cc6607e76a883e..10d7ad345af6e2d31625eac9ea14db64679747a5 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 14430e568f49f2deb6e43836b4c9a8ab717fdd4d..c07b231d4d5985751ccca0621d3757a9566b4698 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 93dc6701f5af8497255a9e86e94e93ac683dafe8..8c83bca88265124e28ea0a884c8ff890b45ae700 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 e8d56aee0e5f2ef7e2fe1ffd3da581ad6e48289b..1a76c18f467e40bd059360d1df3780bff7914daf 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 ca4d0e12f9b79248409ad9ea465781cb817a47d4..336fce4ac60ff33837405e8bebe171dd84bfca22 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 dce263cdfcec1dc0ee084c3f8004aa32b027fcc2..b8f7283d364929f2856ea58a27e077d848f28a6b 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;
     };