Title: [125051] trunk/Source/WebCore
Revision
125051
Author
[email protected]
Date
2012-08-08 10:54:28 -0700 (Wed, 08 Aug 2012)

Log Message

Improve RenderObject.h compile time - split CachedImage and CachedImageClient
https://bugs.webkit.org/show_bug.cgi?id=93400

Patch by Nikhil Bhargava <[email protected]> on 2012-08-08
Reviewed by Eric Seidel.

Splits loader/cache/CachedImage.h into two files. The remaining changes are to repair existing #includes

No new tests. No changes to existing functions/functionality.

* css/CSSCrossfadeValue.h:
* loader/ImageLoader.h:
* loader/cache/CachedImage.cpp:
* loader/cache/CachedImage.h:
(WebCore):
* loader/cache/CachedImageClient.h: Added.
(WebCore):
(CachedImageClient):
(WebCore::CachedImageClient::~CachedImageClient):
(WebCore::CachedImageClient::expectedType):
(WebCore::CachedImageClient::resourceClientType):
(WebCore::CachedImageClient::imageChanged):
(WebCore::CachedImageClient::willRenderImage):
* platform/chromium/ClipboardChromium.h:
* rendering/RenderObject.h:
(WebCore):
* rendering/style/StyleCachedImage.cpp:
* rendering/style/StyleCachedImage.h:
(WebCore):
* rendering/style/StyleCachedImageSet.h:
* svg/graphics/SVGImage.cpp:

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (125050 => 125051)


--- trunk/Source/WebCore/ChangeLog	2012-08-08 17:46:50 UTC (rev 125050)
+++ trunk/Source/WebCore/ChangeLog	2012-08-08 17:54:28 UTC (rev 125051)
@@ -1,3 +1,36 @@
+2012-08-08  Nikhil Bhargava  <[email protected]>
+
+        Improve RenderObject.h compile time - split CachedImage and CachedImageClient
+        https://bugs.webkit.org/show_bug.cgi?id=93400
+
+        Reviewed by Eric Seidel.
+
+        Splits loader/cache/CachedImage.h into two files. The remaining changes are to repair existing #includes
+
+        No new tests. No changes to existing functions/functionality.
+
+        * css/CSSCrossfadeValue.h:
+        * loader/ImageLoader.h:
+        * loader/cache/CachedImage.cpp:
+        * loader/cache/CachedImage.h:
+        (WebCore):
+        * loader/cache/CachedImageClient.h: Added.
+        (WebCore):
+        (CachedImageClient):
+        (WebCore::CachedImageClient::~CachedImageClient):
+        (WebCore::CachedImageClient::expectedType):
+        (WebCore::CachedImageClient::resourceClientType):
+        (WebCore::CachedImageClient::imageChanged):
+        (WebCore::CachedImageClient::willRenderImage):
+        * platform/chromium/ClipboardChromium.h:
+        * rendering/RenderObject.h:
+        (WebCore):
+        * rendering/style/StyleCachedImage.cpp:
+        * rendering/style/StyleCachedImage.h:
+        (WebCore):
+        * rendering/style/StyleCachedImageSet.h:
+        * svg/graphics/SVGImage.cpp:
+
 2012-08-08  Dan Bernstein  <[email protected]>
 
         REGRESSION (r123171): <svg> element with intrinsic size and max-width gets sized incorrectly

Modified: trunk/Source/WebCore/WebCore.gypi (125050 => 125051)


--- trunk/Source/WebCore/WebCore.gypi	2012-08-08 17:46:50 UTC (rev 125050)
+++ trunk/Source/WebCore/WebCore.gypi	2012-08-08 17:54:28 UTC (rev 125051)
@@ -202,6 +202,7 @@
             'loader/archive/mhtml/MHTMLParser.h',
             'loader/cache/CachePolicy.h',
             'loader/cache/CachedImage.h',
+            'loader/cache/CachedImageClient.h',
             'loader/cache/CachedRawResource.h',
             'loader/cache/CachedResource.h',
             'loader/cache/CachedResourceClient.h',

Modified: trunk/Source/WebCore/css/CSSCrossfadeValue.h (125050 => 125051)


--- trunk/Source/WebCore/css/CSSCrossfadeValue.h	2012-08-08 17:46:50 UTC (rev 125050)
+++ trunk/Source/WebCore/css/CSSCrossfadeValue.h	2012-08-08 17:54:28 UTC (rev 125051)
@@ -27,6 +27,7 @@
 #define CSSCrossfadeValue_h
 
 #include "CachedImage.h"
+#include "CachedImageClient.h"
 #include "CachedResourceHandle.h"
 #include "CSSImageGeneratorValue.h"
 #include "CSSPrimitiveValue.h"

Modified: trunk/Source/WebCore/css/CSSImageSetValue.cpp (125050 => 125051)


--- trunk/Source/WebCore/css/CSSImageSetValue.cpp	2012-08-08 17:46:50 UTC (rev 125050)
+++ trunk/Source/WebCore/css/CSSImageSetValue.cpp	2012-08-08 17:54:28 UTC (rev 125051)
@@ -30,6 +30,7 @@
 
 #include "CSSImageValue.h"
 #include "CSSPrimitiveValue.h"
+#include "CachedImage.h"
 #include "CachedResourceLoader.h"
 #include "Document.h"
 #include "MemoryInstrumentation.h"

Modified: trunk/Source/WebCore/loader/ImageLoader.h (125050 => 125051)


--- trunk/Source/WebCore/loader/ImageLoader.h	2012-08-08 17:46:50 UTC (rev 125050)
+++ trunk/Source/WebCore/loader/ImageLoader.h	2012-08-08 17:54:28 UTC (rev 125051)
@@ -24,6 +24,7 @@
 #define ImageLoader_h
 
 #include "CachedImage.h"
+#include "CachedImageClient.h"
 #include "CachedResourceHandle.h"
 #include "Element.h"
 #include <wtf/OwnPtr.h>

Modified: trunk/Source/WebCore/loader/cache/CachedImage.cpp (125050 => 125051)


--- trunk/Source/WebCore/loader/cache/CachedImage.cpp	2012-08-08 17:46:50 UTC (rev 125050)
+++ trunk/Source/WebCore/loader/cache/CachedImage.cpp	2012-08-08 17:54:28 UTC (rev 125051)
@@ -25,7 +25,7 @@
 #include "CachedImage.h"
 
 #include "BitmapImage.h"
-#include "MemoryCache.h"
+#include "CachedImageClient.h"
 #include "CachedResourceClient.h"
 #include "CachedResourceClientWalker.h"
 #include "CachedResourceLoader.h"
@@ -33,6 +33,7 @@
 #include "FrameLoaderClient.h"
 #include "FrameLoaderTypes.h"
 #include "FrameView.h"
+#include "MemoryCache.h"
 #include "Page.h"
 #include "RenderObject.h"
 #include "Settings.h"

Modified: trunk/Source/WebCore/loader/cache/CachedImage.h (125050 => 125051)


--- trunk/Source/WebCore/loader/cache/CachedImage.h	2012-08-08 17:46:50 UTC (rev 125050)
+++ trunk/Source/WebCore/loader/cache/CachedImage.h	2012-08-08 17:54:28 UTC (rev 125051)
@@ -24,7 +24,6 @@
 #define CachedImage_h
 
 #include "CachedResource.h"
-#include "CachedResourceClient.h"
 #include "SVGImageCache.h"
 #include "ImageObserver.h"
 #include "IntRect.h"
@@ -32,6 +31,7 @@
 
 namespace WebCore {
 
+class CachedImageClient;
 class CachedResourceLoader;
 class FloatSize;
 class MemoryCache;
@@ -115,23 +115,6 @@
     bool m_shouldPaintBrokenImage;
 };
 
-class CachedImageClient : public CachedResourceClient {
-public:
-    virtual ~CachedImageClient() { }
-    static CachedResourceClientType expectedType() { return ImageType; }
-    virtual CachedResourceClientType resourceClientType() const { return expectedType(); }
-
-    // Called whenever a frame of an image changes, either because we got more data from the network or
-    // because we are animating. If not null, the IntRect is the changed rect of the image.
-    virtual void imageChanged(CachedImage*, const IntRect* = 0) { }
-
-    // Called to find out if this client wants to actually display the image. Used to tell when we
-    // can halt animation. Content nodes that hold image refs for example would not render the image,
-    // but RenderImages would (assuming they have visibility: visible and their render tree isn't hidden
-    // e.g., in the b/f cache or in a background tab).
-    virtual bool willRenderImage(CachedImage*) { return false; }
-};
-
 }
 
 #endif

Added: trunk/Source/WebCore/loader/cache/CachedImageClient.h (0 => 125051)


--- trunk/Source/WebCore/loader/cache/CachedImageClient.h	                        (rev 0)
+++ trunk/Source/WebCore/loader/cache/CachedImageClient.h	2012-08-08 17:54:28 UTC (rev 125051)
@@ -0,0 +1,52 @@
+/*
+    Copyright (C) 1998 Lars Knoll ([email protected])
+    Copyright (C) 2001 Dirk Mueller <[email protected]>
+    Copyright (C) 2006 Samuel Weinig ([email protected])
+    Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#ifndef CachedImageClient_h
+#define CachedImageClient_h
+
+#include "CachedResourceClient.h"
+
+namespace WebCore {
+
+class CachedImage;
+class IntRect;
+
+class CachedImageClient : public CachedResourceClient {
+public:
+    virtual ~CachedImageClient() { }
+    static CachedResourceClientType expectedType() { return ImageType; }
+    virtual CachedResourceClientType resourceClientType() const { return expectedType(); }
+
+    // Called whenever a frame of an image changes, either because we got more data from the network or
+    // because we are animating. If not null, the IntRect is the changed rect of the image.
+    virtual void imageChanged(CachedImage*, const IntRect* = 0) { }
+
+    // Called to find out if this client wants to actually display the image. Used to tell when we
+    // can halt animation. Content nodes that hold image refs for example would not render the image,
+    // but RenderImages would (assuming they have visibility: visible and their render tree isn't hidden
+    // e.g., in the b/f cache or in a background tab).
+    virtual bool willRenderImage(CachedImage*) { return false; }
+};
+
+}
+
+#endif

Modified: trunk/Source/WebCore/platform/chromium/ClipboardChromium.h (125050 => 125051)


--- trunk/Source/WebCore/platform/chromium/ClipboardChromium.h	2012-08-08 17:46:50 UTC (rev 125050)
+++ trunk/Source/WebCore/platform/chromium/ClipboardChromium.h	2012-08-08 17:54:28 UTC (rev 125051)
@@ -30,7 +30,7 @@
 #ifndef ClipboardChromium_h
 #define ClipboardChromium_h
 
-#include "CachedImage.h"
+#include "CachedImageClient.h"
 #include "ChromiumDataObject.h"
 #include "Clipboard.h"
 #include "DataTransferItem.h"

Modified: trunk/Source/WebCore/platform/gtk/ClipboardGtk.h (125050 => 125051)


--- trunk/Source/WebCore/platform/gtk/ClipboardGtk.h	2012-08-08 17:46:50 UTC (rev 125050)
+++ trunk/Source/WebCore/platform/gtk/ClipboardGtk.h	2012-08-08 17:54:28 UTC (rev 125051)
@@ -27,7 +27,7 @@
 #ifndef ClipboardGtk_h
 #define ClipboardGtk_h
 
-#include "CachedImage.h"
+#include "CachedImageClient.h"
 #include "Clipboard.h"
 #include "DataObjectGtk.h"
 

Modified: trunk/Source/WebCore/platform/qt/ClipboardQt.h (125050 => 125051)


--- trunk/Source/WebCore/platform/qt/ClipboardQt.h	2012-08-08 17:46:50 UTC (rev 125050)
+++ trunk/Source/WebCore/platform/qt/ClipboardQt.h	2012-08-08 17:54:28 UTC (rev 125051)
@@ -26,7 +26,7 @@
 #ifndef ClipboardQt_h
 #define ClipboardQt_h
 
-#include "CachedImage.h"
+#include "CachedImageClient.h"
 #include "Clipboard.h"
 
 QT_BEGIN_NAMESPACE

Modified: trunk/Source/WebCore/platform/win/ClipboardWin.h (125050 => 125051)


--- trunk/Source/WebCore/platform/win/ClipboardWin.h	2012-08-08 17:46:50 UTC (rev 125050)
+++ trunk/Source/WebCore/platform/win/ClipboardWin.h	2012-08-08 17:54:28 UTC (rev 125051)
@@ -27,7 +27,7 @@
 #define ClipboardWin_h
 
 #include "COMPtr.h"
-#include "CachedImage.h"
+#include "CachedImageClient.h"
 #include "Clipboard.h"
 #include "DragData.h"
 

Modified: trunk/Source/WebCore/rendering/RenderObject.h (125050 => 125051)


--- trunk/Source/WebCore/rendering/RenderObject.h	2012-08-08 17:46:50 UTC (rev 125050)
+++ trunk/Source/WebCore/rendering/RenderObject.h	2012-08-08 17:54:28 UTC (rev 125051)
@@ -26,8 +26,7 @@
 #ifndef RenderObject_h
 #define RenderObject_h
 
-#include "CachedImage.h"
-#include "Document.h"
+#include "CachedImageClient.h"
 #include "Element.h"
 #include "FractionalLayoutUnit.h"
 #include "FloatQuad.h"
@@ -46,6 +45,7 @@
 class AffineTransform;
 class AnimationController;
 class Cursor;
+class Document;
 class HitTestPoint;
 class HitTestResult;
 class InlineBox;

Modified: trunk/Source/WebCore/rendering/style/StyleCachedImage.cpp (125050 => 125051)


--- trunk/Source/WebCore/rendering/style/StyleCachedImage.cpp	2012-08-08 17:46:50 UTC (rev 125050)
+++ trunk/Source/WebCore/rendering/style/StyleCachedImage.cpp	2012-08-08 17:54:28 UTC (rev 125051)
@@ -24,6 +24,7 @@
 #include "config.h"
 #include "StyleCachedImage.h"
 
+#include "CachedImage.h"
 #include "RenderObject.h"
 
 namespace WebCore {

Modified: trunk/Source/WebCore/rendering/style/StyleCachedImage.h (125050 => 125051)


--- trunk/Source/WebCore/rendering/style/StyleCachedImage.h	2012-08-08 17:46:50 UTC (rev 125050)
+++ trunk/Source/WebCore/rendering/style/StyleCachedImage.h	2012-08-08 17:54:28 UTC (rev 125051)
@@ -24,12 +24,14 @@
 #ifndef StyleCachedImage_h
 #define StyleCachedImage_h
 
-#include "CachedImage.h"
+#include "CachedImageClient.h"
 #include "CachedResourceHandle.h"
 #include "StyleImage.h"
 
 namespace WebCore {
 
+class CachedImage;
+
 class StyleCachedImage : public StyleImage, private CachedImageClient {
     WTF_MAKE_FAST_ALLOCATED;
 public:

Modified: trunk/Source/WebCore/rendering/style/StyleCachedImageSet.h (125050 => 125051)


--- trunk/Source/WebCore/rendering/style/StyleCachedImageSet.h	2012-08-08 17:46:50 UTC (rev 125050)
+++ trunk/Source/WebCore/rendering/style/StyleCachedImageSet.h	2012-08-08 17:54:28 UTC (rev 125051)
@@ -28,7 +28,7 @@
 
 #if ENABLE(CSS_IMAGE_SET)
 
-#include "CachedImage.h"
+#include "CachedImageClient.h"
 #include "CachedResourceHandle.h"
 #include "StyleImage.h"
 

Modified: trunk/Source/WebCore/svg/graphics/SVGImage.cpp (125050 => 125051)


--- trunk/Source/WebCore/svg/graphics/SVGImage.cpp	2012-08-08 17:46:50 UTC (rev 125050)
+++ trunk/Source/WebCore/svg/graphics/SVGImage.cpp	2012-08-08 17:54:28 UTC (rev 125051)
@@ -34,6 +34,7 @@
 #include "EmptyClients.h"
 #include "FrameView.h"
 #include "ImageBuffer.h"
+#include "ImageObserver.h"
 #include "RenderSVGRoot.h"
 #include "SVGDocument.h"
 #include "SVGSVGElement.h"
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to