Title: [148175] trunk/Source/WebCore
Revision
148175
Author
[email protected]
Date
2013-04-10 23:22:14 -0700 (Wed, 10 Apr 2013)

Log Message

        Remove some includes of CachedImage.h
        https://bugs.webkit.org/show_bug.cgi?id=114411

        Reviewed by Dan Bernstein.

        * css/CSSCrossfadeValue.h: Initializing CachedResourceHandle with 0 requires a
        definition of a class it holds, but default construction does not.

        * rendering/RenderImageResource.cpp:
        * rendering/RenderImageResource.h:
        Moved definitions of virtual functions to a .cpp file. There is no win from having
        them inline, and now we don't need CachedImage.h in the header.

        * bindings/js/JSNodeCustom.cpp:
        * dom/Clipboard.cpp:
        (WebCore::Clipboard::Clipboard):
        * platform/mac/ClipboardMac.h:
        * rendering/InlineFlowBox.cpp:
        * rendering/RenderBox.cpp:
        * rendering/RenderListItem.cpp:
        * rendering/RenderListMarker.cpp:
        * rendering/RenderTableCol.cpp:
        * rendering/RenderTableRow.cpp:
        * rendering/RenderTableSection.cpp:
        * svg/graphics/SVGImageCache.cpp:
        Removed unnecessary includes.

        * platform/mac/PasteboardMac.mm:
        * rendering/RenderSnapshottedPlugIn.cpp:
        Added ones where they are now necessary.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (148174 => 148175)


--- trunk/Source/WebCore/ChangeLog	2013-04-11 06:19:55 UTC (rev 148174)
+++ trunk/Source/WebCore/ChangeLog	2013-04-11 06:22:14 UTC (rev 148175)
@@ -1,3 +1,36 @@
+2013-04-10  Alexey Proskuryakov  <[email protected]>
+
+        Remove some includes of CachedImage.h
+        https://bugs.webkit.org/show_bug.cgi?id=114411
+
+        Reviewed by Dan Bernstein.
+
+        * css/CSSCrossfadeValue.h: Initializing CachedResourceHandle with 0 requires a
+        definition of a class it holds, but default construction does not.
+
+        * rendering/RenderImageResource.cpp:
+        * rendering/RenderImageResource.h:
+        Moved definitions of virtual functions to a .cpp file. There is no win from having
+        them inline, and now we don't need CachedImage.h in the header.
+
+        * bindings/js/JSNodeCustom.cpp:
+        * dom/Clipboard.cpp:
+        (WebCore::Clipboard::Clipboard):
+        * platform/mac/ClipboardMac.h:
+        * rendering/InlineFlowBox.cpp:
+        * rendering/RenderBox.cpp:
+        * rendering/RenderListItem.cpp:
+        * rendering/RenderListMarker.cpp:
+        * rendering/RenderTableCol.cpp:
+        * rendering/RenderTableRow.cpp:
+        * rendering/RenderTableSection.cpp:
+        * svg/graphics/SVGImageCache.cpp:
+        Removed unnecessary includes.
+
+        * platform/mac/PasteboardMac.mm:
+        * rendering/RenderSnapshottedPlugIn.cpp:
+        Added ones where they are now necessary.
+
 2013-04-10  No'am Rosenthal  <[email protected]>
 
         Allow direct compositing of background images

Modified: trunk/Source/WebCore/bindings/js/JSNodeCustom.cpp (148174 => 148175)


--- trunk/Source/WebCore/bindings/js/JSNodeCustom.cpp	2013-04-11 06:19:55 UTC (rev 148174)
+++ trunk/Source/WebCore/bindings/js/JSNodeCustom.cpp	2013-04-11 06:22:14 UTC (rev 148175)
@@ -27,8 +27,6 @@
 #include "JSNode.h"
 
 #include "Attr.h"
-#include "CachedImage.h"
-#include "CachedScript.h"
 #include "CDATASection.h"
 #include "Comment.h"
 #include "Document.h"

Modified: trunk/Source/WebCore/css/CSSCrossfadeValue.h (148174 => 148175)


--- trunk/Source/WebCore/css/CSSCrossfadeValue.h	2013-04-11 06:19:55 UTC (rev 148174)
+++ trunk/Source/WebCore/css/CSSCrossfadeValue.h	2013-04-11 06:22:14 UTC (rev 148175)
@@ -26,7 +26,6 @@
 #ifndef CSSCrossfadeValue_h
 #define CSSCrossfadeValue_h
 
-#include "CachedImage.h"
 #include "CachedImageClient.h"
 #include "CachedResourceHandle.h"
 #include "CSSImageGeneratorValue.h"
@@ -75,15 +74,17 @@
         : CSSImageGeneratorValue(CrossfadeClass)
         , m_fromValue(fromValue)
         , m_toValue(toValue)
-        , m_cachedFromImage(0)
-        , m_cachedToImage(0)
-        , m_crossfadeSubimageObserver(this) { }
+        , m_crossfadeSubimageObserver(this)
+    {
+    }
 
     class CrossfadeSubimageObserverProxy : public CachedImageClient {
     public:
         CrossfadeSubimageObserverProxy(CSSCrossfadeValue* ownerValue)
-        : m_ownerValue(ownerValue)
-        , m_ready(false) { }
+            : m_ownerValue(ownerValue)
+            , m_ready(false)
+        {
+        }
 
         virtual ~CrossfadeSubimageObserverProxy() { }
         virtual void imageChanged(CachedImage*, const IntRect* = 0) OVERRIDE;

Modified: trunk/Source/WebCore/dom/Clipboard.cpp (148174 => 148175)


--- trunk/Source/WebCore/dom/Clipboard.cpp	2013-04-11 06:19:55 UTC (rev 148174)
+++ trunk/Source/WebCore/dom/Clipboard.cpp	2013-04-11 06:22:14 UTC (rev 148175)
@@ -26,7 +26,6 @@
 #include "config.h"
 #include "Clipboard.h"
 
-#include "CachedImage.h"
 #include "FileList.h"
 #include "Frame.h"
 #include "FrameLoader.h"
@@ -40,7 +39,6 @@
     , m_effectAllowed("uninitialized")
     , m_dragStarted(false)
     , m_clipboardType(clipboardType)
-    , m_dragImage(0)
 {
 }
     

Modified: trunk/Source/WebCore/platform/mac/ClipboardMac.h (148174 => 148175)


--- trunk/Source/WebCore/platform/mac/ClipboardMac.h	2013-04-11 06:19:55 UTC (rev 148174)
+++ trunk/Source/WebCore/platform/mac/ClipboardMac.h	2013-04-11 06:22:14 UTC (rev 148175)
@@ -26,7 +26,6 @@
 #ifndef ClipboardMac_h
 #define ClipboardMac_h
 
-#include "CachedImage.h"
 #include "CachedImageClient.h"
 #include "Clipboard.h"
 #include <wtf/RetainPtr.h>

Modified: trunk/Source/WebCore/platform/mac/PasteboardMac.mm (148174 => 148175)


--- trunk/Source/WebCore/platform/mac/PasteboardMac.mm	2013-04-11 06:19:55 UTC (rev 148174)
+++ trunk/Source/WebCore/platform/mac/PasteboardMac.mm	2013-04-11 06:22:14 UTC (rev 148175)
@@ -26,7 +26,7 @@
 #import "config.h"
 #import "Pasteboard.h"
 
-#import "CachedResource.h"
+#import "CachedImage.h"
 #import "ClipboardMac.h"
 #import "DOMRangeInternal.h"
 #import "Document.h"

Modified: trunk/Source/WebCore/rendering/InlineFlowBox.cpp (148174 => 148175)


--- trunk/Source/WebCore/rendering/InlineFlowBox.cpp	2013-04-11 06:19:55 UTC (rev 148174)
+++ trunk/Source/WebCore/rendering/InlineFlowBox.cpp	2013-04-11 06:22:14 UTC (rev 148175)
@@ -20,7 +20,6 @@
 #include "config.h"
 #include "InlineFlowBox.h"
 
-#include "CachedImage.h"
 #include "CSSPropertyNames.h"
 #include "Document.h"
 #include "EllipsisBox.h"

Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (148174 => 148175)


--- trunk/Source/WebCore/rendering/RenderBox.cpp	2013-04-11 06:19:55 UTC (rev 148174)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp	2013-04-11 06:22:14 UTC (rev 148175)
@@ -25,7 +25,6 @@
 #include "config.h"
 #include "RenderBox.h"
 
-#include "CachedImage.h"
 #include "Chrome.h"
 #include "ChromeClient.h"
 #include "Document.h"

Modified: trunk/Source/WebCore/rendering/RenderImageResource.cpp (148174 => 148175)


--- trunk/Source/WebCore/rendering/RenderImageResource.cpp	2013-04-11 06:19:55 UTC (rev 148174)
+++ trunk/Source/WebCore/rendering/RenderImageResource.cpp	2013-04-11 06:22:14 UTC (rev 148175)
@@ -37,7 +37,6 @@
 
 RenderImageResource::RenderImageResource()
     : m_renderer(0)
-    , m_cachedImage(0)
 {
 }
 
@@ -90,6 +89,16 @@
         m_renderer->repaint();
 }
 
+PassRefPtr<Image> RenderImageResource::image(int, int) const
+{
+    return m_cachedImage ? m_cachedImage->imageForRenderer(m_renderer) : nullImage();
+}
+
+bool RenderImageResource::errorOccurred() const
+{
+    return m_cachedImage && m_cachedImage->errorOccurred();
+}
+
 void RenderImageResource::setContainerSizeForRenderer(const IntSize& imageContainerSize)
 {
     ASSERT(m_renderer);
@@ -102,4 +111,24 @@
     return Image::nullImage();
 }
 
+bool RenderImageResource::usesImageContainerSize() const
+{
+    return m_cachedImage ? m_cachedImage->usesImageContainerSize() : false;
+}
+
+bool RenderImageResource::imageHasRelativeWidth() const
+{
+    return m_cachedImage ? m_cachedImage->imageHasRelativeWidth() : false;
+}
+
+bool RenderImageResource::imageHasRelativeHeight() const
+{
+    return m_cachedImage ? m_cachedImage->imageHasRelativeHeight() : false;
+}
+
+LayoutSize RenderImageResource::imageSize(float multiplier) const
+{
+    return m_cachedImage ? m_cachedImage->imageSizeForRenderer(m_renderer, multiplier) : LayoutSize();
+}
+
 } // namespace WebCore

Modified: trunk/Source/WebCore/rendering/RenderImageResource.h (148174 => 148175)


--- trunk/Source/WebCore/rendering/RenderImageResource.h	2013-04-11 06:19:55 UTC (rev 148174)
+++ trunk/Source/WebCore/rendering/RenderImageResource.h	2013-04-11 06:22:14 UTC (rev 148175)
@@ -26,7 +26,6 @@
 #ifndef RenderImageResource_h
 #define RenderImageResource_h
 
-#include "CachedImage.h"
 #include "CachedResourceHandle.h"
 #include "Image.h"
 #include "LayoutSize.h"
@@ -55,15 +54,15 @@
 
     void resetAnimation();
 
-    virtual PassRefPtr<Image> image(int /* width */ = 0, int /* height */ = 0) const { return m_cachedImage ? m_cachedImage->imageForRenderer(m_renderer) : nullImage(); }
-    virtual bool errorOccurred() const { return m_cachedImage && m_cachedImage->errorOccurred(); }
+    virtual PassRefPtr<Image> image(int width = 0, int height = 0) const;
+    virtual bool errorOccurred() const;
 
     virtual void setContainerSizeForRenderer(const IntSize&);
-    virtual bool usesImageContainerSize() const { return m_cachedImage ? m_cachedImage->usesImageContainerSize() : false; }
-    virtual bool imageHasRelativeWidth() const { return m_cachedImage ? m_cachedImage->imageHasRelativeWidth() : false; }
-    virtual bool imageHasRelativeHeight() const { return m_cachedImage ? m_cachedImage->imageHasRelativeHeight() : false; }
+    virtual bool usesImageContainerSize() const;
+    virtual bool imageHasRelativeWidth() const;
+    virtual bool imageHasRelativeHeight() const;
 
-    virtual LayoutSize imageSize(float multiplier) const { return m_cachedImage ? m_cachedImage->imageSizeForRenderer(m_renderer, multiplier) : LayoutSize(); }
+    virtual LayoutSize imageSize(float multiplier) const;
 
     virtual WrappedImagePtr imagePtr() const { return m_cachedImage.get(); }
 

Modified: trunk/Source/WebCore/rendering/RenderListItem.cpp (148174 => 148175)


--- trunk/Source/WebCore/rendering/RenderListItem.cpp	2013-04-11 06:19:55 UTC (rev 148174)
+++ trunk/Source/WebCore/rendering/RenderListItem.cpp	2013-04-11 06:22:14 UTC (rev 148175)
@@ -24,7 +24,6 @@
 #include "config.h"
 #include "RenderListItem.h"
 
-#include "CachedImage.h"
 #include "HTMLNames.h"
 #include "HTMLOListElement.h"
 #include "NodeTraversal.h"

Modified: trunk/Source/WebCore/rendering/RenderListMarker.cpp (148174 => 148175)


--- trunk/Source/WebCore/rendering/RenderListMarker.cpp	2013-04-11 06:19:55 UTC (rev 148174)
+++ trunk/Source/WebCore/rendering/RenderListMarker.cpp	2013-04-11 06:22:14 UTC (rev 148175)
@@ -25,7 +25,6 @@
 #include "config.h"
 #include "RenderListMarker.h"
 
-#include "CachedImage.h"
 #include "Document.h"
 #include "Font.h"
 #include "GraphicsContext.h"

Modified: trunk/Source/WebCore/rendering/RenderSnapshottedPlugIn.cpp (148174 => 148175)


--- trunk/Source/WebCore/rendering/RenderSnapshottedPlugIn.cpp	2013-04-11 06:19:55 UTC (rev 148174)
+++ trunk/Source/WebCore/rendering/RenderSnapshottedPlugIn.cpp	2013-04-11 06:22:14 UTC (rev 148175)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "RenderSnapshottedPlugIn.h"
 
+#include "CachedImage.h"
 #include "Chrome.h"
 #include "ChromeClient.h"
 #include "Cursor.h"

Modified: trunk/Source/WebCore/rendering/RenderTableCol.cpp (148174 => 148175)


--- trunk/Source/WebCore/rendering/RenderTableCol.cpp	2013-04-11 06:19:55 UTC (rev 148174)
+++ trunk/Source/WebCore/rendering/RenderTableCol.cpp	2013-04-11 06:22:14 UTC (rev 148175)
@@ -26,7 +26,6 @@
 #include "config.h"
 #include "RenderTableCol.h"
 
-#include "CachedImage.h"
 #include "HTMLNames.h"
 #include "HTMLTableColElement.h"
 #include "RenderTable.h"

Modified: trunk/Source/WebCore/rendering/RenderTableRow.cpp (148174 => 148175)


--- trunk/Source/WebCore/rendering/RenderTableRow.cpp	2013-04-11 06:19:55 UTC (rev 148174)
+++ trunk/Source/WebCore/rendering/RenderTableRow.cpp	2013-04-11 06:22:14 UTC (rev 148175)
@@ -25,7 +25,6 @@
 #include "config.h"
 #include "RenderTableRow.h"
 
-#include "CachedImage.h"
 #include "Document.h"
 #include "HTMLNames.h"
 #include "HitTestResult.h"

Modified: trunk/Source/WebCore/rendering/RenderTableSection.cpp (148174 => 148175)


--- trunk/Source/WebCore/rendering/RenderTableSection.cpp	2013-04-11 06:19:55 UTC (rev 148174)
+++ trunk/Source/WebCore/rendering/RenderTableSection.cpp	2013-04-11 06:22:14 UTC (rev 148175)
@@ -25,7 +25,6 @@
 
 #include "config.h"
 #include "RenderTableSection.h"
-#include "CachedImage.h"
 #include "Document.h"
 #include "HitTestResult.h"
 #include "HTMLNames.h"

Modified: trunk/Source/WebCore/svg/graphics/SVGImageCache.cpp (148174 => 148175)


--- trunk/Source/WebCore/svg/graphics/SVGImageCache.cpp	2013-04-11 06:19:55 UTC (rev 148174)
+++ trunk/Source/WebCore/svg/graphics/SVGImageCache.cpp	2013-04-11 06:22:14 UTC (rev 148175)
@@ -22,7 +22,6 @@
 #include "SVGImageCache.h"
 
 #if ENABLE(SVG)
-#include "CachedImage.h"
 #include "FrameView.h"
 #include "GraphicsContext.h"
 #include "ImageBuffer.h"
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to