Diff
Modified: trunk/Source/WebCore/ChangeLog (147939 => 147940)
--- trunk/Source/WebCore/ChangeLog 2013-04-08 18:38:26 UTC (rev 147939)
+++ trunk/Source/WebCore/ChangeLog 2013-04-08 18:39:24 UTC (rev 147940)
@@ -1,3 +1,35 @@
+2013-04-06 Simon Fraser <[email protected]>
+
+ Remove some #includes in headers in rendering code
+ https://bugs.webkit.org/show_bug.cgi?id=114079
+
+ Reviewed by Sam Weinig.
+
+ Clean up #includes in RenderObject, RenderLayer etc.
+ Moved makeMatrixRenderable() into RenderLayer.app, allowing
+ the removal of a TransformationMatrix.h include.
+
+ Make some RenderLayer functions that deal with filters not inline,
+ to avoid including RenderLayerFilterInfo.h.
+
+ * platform/graphics/GraphicsLayer.h:
+ * platform/graphics/ImageOrientation.cpp:
+ * platform/graphics/cairo/GraphicsContextCairo.cpp:
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ * platform/graphics/transforms/AffineTransform.cpp:
+ * platform/graphics/transforms/AffineTransform.h:
+ * rendering/RenderBoxModelObject.h:
+ * rendering/RenderLayer.cpp:
+ (WebCore::makeMatrixRenderable):
+ (WebCore::RenderLayer::filterRenderer):
+ (WebCore::RenderLayer::filterInfo):
+ (WebCore::RenderLayer::ensureFilterInfo):
+ (WebCore::RenderLayer::removeFilterInfoIfNeeded):
+ * rendering/RenderLayer.h:
+ * rendering/RenderLayerBacking.h:
+ * rendering/RenderLineBoxList.h:
+ * rendering/RenderObject.h:
+
2013-04-08 Robert Hogan <[email protected]>
Unreviewed, rolling out r147850.
Modified: trunk/Source/WebCore/platform/graphics/GraphicsLayer.h (147939 => 147940)
--- trunk/Source/WebCore/platform/graphics/GraphicsLayer.h 2013-04-08 18:38:26 UTC (rev 147939)
+++ trunk/Source/WebCore/platform/graphics/GraphicsLayer.h 2013-04-08 18:39:24 UTC (rev 147940)
@@ -39,7 +39,6 @@
#include "GraphicsLayerClient.h"
#include "IntRect.h"
#include "PlatformLayer.h"
-#include "TransformationMatrix.h"
#include "TransformOperations.h"
#include <wtf/OwnPtr.h>
#include <wtf/PassOwnPtr.h>
@@ -64,6 +63,7 @@
class TextStream;
class TiledBacking;
class TimingFunction;
+class TransformationMatrix;
// Base class for animation values (also used for transitions). Here to
// represent values for properties being animated via the GraphicsLayer,
Modified: trunk/Source/WebCore/platform/graphics/ImageOrientation.cpp (147939 => 147940)
--- trunk/Source/WebCore/platform/graphics/ImageOrientation.cpp 2013-04-08 18:38:26 UTC (rev 147939)
+++ trunk/Source/WebCore/platform/graphics/ImageOrientation.cpp 2013-04-08 18:39:24 UTC (rev 147940)
@@ -28,6 +28,7 @@
#include "ImageOrientation.h"
#include "AffineTransform.h"
+#include "FloatSize.h"
namespace WebCore {
Modified: trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp (147939 => 147940)
--- trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp 2013-04-08 18:38:26 UTC (rev 147939)
+++ trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp 2013-04-08 18:39:24 UTC (rev 147940)
@@ -51,6 +51,7 @@
#include "RefPtrCairo.h"
#include "ShadowBlur.h"
#include "SimpleFontData.h"
+#include "TransformationMatrix.h"
#include <cairo.h>
#include <math.h>
#include <stdio.h>
Modified: trunk/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp (147939 => 147940)
--- trunk/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp 2013-04-08 18:38:26 UTC (rev 147939)
+++ trunk/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp 2013-04-08 18:39:24 UTC (rev 147940)
@@ -52,6 +52,7 @@
#include "Path.h"
#include "Pattern.h"
#include "ShadowBlur.h"
+#include "TransformationMatrix.h"
#include "TransparencyLayer.h"
#include <QBrush>
Modified: trunk/Source/WebCore/platform/graphics/transforms/AffineTransform.cpp (147939 => 147940)
--- trunk/Source/WebCore/platform/graphics/transforms/AffineTransform.cpp 2013-04-08 18:38:26 UTC (rev 147939)
+++ trunk/Source/WebCore/platform/graphics/transforms/AffineTransform.cpp 2013-04-08 18:39:24 UTC (rev 147940)
@@ -31,6 +31,7 @@
#include "FloatQuad.h"
#include "FloatRect.h"
#include "IntRect.h"
+#include "TransformationMatrix.h"
#include <wtf/MathExtras.h>
Modified: trunk/Source/WebCore/platform/graphics/transforms/AffineTransform.h (147939 => 147940)
--- trunk/Source/WebCore/platform/graphics/transforms/AffineTransform.h 2013-04-08 18:38:26 UTC (rev 147939)
+++ trunk/Source/WebCore/platform/graphics/transforms/AffineTransform.h 2013-04-08 18:39:24 UTC (rev 147940)
@@ -27,8 +27,6 @@
#ifndef AffineTransform_h
#define AffineTransform_h
-#include "TransformationMatrix.h"
-
#include <string.h> // for memcpy
#include <wtf/FastAllocBase.h>
@@ -51,7 +49,9 @@
class FloatPoint;
class FloatQuad;
class FloatRect;
+class FloatSize;
class IntPoint;
+class IntSize;
class IntRect;
class TransformationMatrix;
Modified: trunk/Source/WebCore/rendering/RenderBoxModelObject.h (147939 => 147940)
--- trunk/Source/WebCore/rendering/RenderBoxModelObject.h 2013-04-08 18:38:26 UTC (rev 147939)
+++ trunk/Source/WebCore/rendering/RenderBoxModelObject.h 2013-04-08 18:39:24 UTC (rev 147940)
@@ -26,7 +26,6 @@
#include "LayoutRect.h"
#include "RenderLayerModelObject.h"
-#include "ShadowData.h"
namespace WebCore {
@@ -52,6 +51,7 @@
};
class KeyframeList;
+class InlineFlowBox;
class StickyPositionViewportConstraints;
// This class is the base for all objects that adhere to the CSS box model as described
Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (147939 => 147940)
--- trunk/Source/WebCore/rendering/RenderLayer.cpp 2013-04-08 18:38:26 UTC (rev 147939)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp 2013-04-08 18:39:24 UTC (rev 147940)
@@ -50,11 +50,6 @@
#include "Document.h"
#include "DocumentEventQueue.h"
#include "EventHandler.h"
-#if ENABLE(CSS_FILTERS)
-#include "FEColorMatrix.h"
-#include "FEMerge.h"
-#include "FilterEffectRenderer.h"
-#endif
#include "FeatureObserver.h"
#include "FloatConversion.h"
#include "FloatPoint3D.h"
@@ -110,6 +105,13 @@
#include <wtf/UnusedParam.h>
#include <wtf/text/CString.h>
+#if ENABLE(CSS_FILTERS)
+#include "FEColorMatrix.h"
+#include "FEMerge.h"
+#include "FilterEffectRenderer.h"
+#include "RenderLayerFilterInfo.h"
+#endif
+
#if USE(ACCELERATED_COMPOSITING)
#include "RenderLayerBacking.h"
#include "RenderLayerCompositor.h"
@@ -146,6 +148,17 @@
return hitTestLocation.intersects(m_rect);
}
+void makeMatrixRenderable(TransformationMatrix& matrix, bool has3DRendering)
+{
+#if !ENABLE(3D_RENDERING)
+ UNUSED_PARAM(has3DRendering);
+ matrix.makeAffine();
+#else
+ if (!has3DRendering)
+ matrix.makeAffine();
+#endif
+}
+
RenderLayer::RenderLayer(RenderLayerModelObject* renderer)
: m_inResizeMode(false)
, m_scrollDimensionsDirty(true)
@@ -354,6 +367,28 @@
FilterEffectRenderer* filter = filterRenderer();
return filter ? filter->hasFilterThatMovesPixels() : false;
}
+
+FilterEffectRenderer* RenderLayer::filterRenderer() const
+{
+ RenderLayerFilterInfo* filterInfo = this->filterInfo();
+ return filterInfo ? filterInfo->renderer() : 0;
+}
+
+RenderLayerFilterInfo* RenderLayer::filterInfo() const
+{
+ return hasFilterInfo() ? RenderLayerFilterInfo::filterInfoForRenderLayer(this) : 0;
+}
+
+RenderLayerFilterInfo* RenderLayer::ensureFilterInfo()
+{
+ return RenderLayerFilterInfo::createFilterInfoForRenderLayerIfNeeded(this);
+}
+
+void RenderLayer::removeFilterInfoIfNeeded()
+{
+ if (hasFilterInfo())
+ RenderLayerFilterInfo::removeFilterInfoForRenderLayer(this);
+}
#endif
LayoutPoint RenderLayer::computeOffsetFromRoot(bool& hasLayerOffset) const
Modified: trunk/Source/WebCore/rendering/RenderLayer.h (147939 => 147940)
--- trunk/Source/WebCore/rendering/RenderLayer.h 2013-04-08 18:38:26 UTC (rev 147939)
+++ trunk/Source/WebCore/rendering/RenderLayer.h 2013-04-08 18:39:24 UTC (rev 147940)
@@ -49,15 +49,12 @@
#include "ScrollableArea.h"
#include <wtf/OwnPtr.h>
-#if ENABLE(CSS_FILTERS)
-#include "RenderLayerFilterInfo.h"
-#endif
-
namespace WebCore {
#if ENABLE(CSS_FILTERS)
class FilterEffectRenderer;
class FilterOperations;
+class RenderLayerFilterInfo;
#endif
class HitTestRequest;
class HitTestResult;
@@ -801,20 +798,12 @@
FilterOperations computeFilterOperations(const RenderStyle*);
bool paintsWithFilters() const;
bool requiresFullLayerImageForFilters() const;
- FilterEffectRenderer* filterRenderer() const
- {
- RenderLayerFilterInfo* filterInfo = this->filterInfo();
- return filterInfo ? filterInfo->renderer() : 0;
- }
+ FilterEffectRenderer* filterRenderer() const;
+
+ RenderLayerFilterInfo* filterInfo() const;
+ RenderLayerFilterInfo* ensureFilterInfo();
+ void removeFilterInfoIfNeeded();
- RenderLayerFilterInfo* filterInfo() const { return hasFilterInfo() ? RenderLayerFilterInfo::filterInfoForRenderLayer(this) : 0; }
- RenderLayerFilterInfo* ensureFilterInfo() { return RenderLayerFilterInfo::createFilterInfoForRenderLayerIfNeeded(this); }
- void removeFilterInfoIfNeeded()
- {
- if (hasFilterInfo())
- RenderLayerFilterInfo::removeFilterInfoForRenderLayer(this);
- }
-
bool hasFilterInfo() const { return m_hasFilterInfo; }
void setHasFilterInfo(bool hasFilterInfo) { m_hasFilterInfo = hasFilterInfo; }
#endif
@@ -1323,6 +1312,7 @@
};
#endif
+void makeMatrixRenderable(TransformationMatrix&, bool has3DRendering);
} // namespace WebCore
Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.h (147939 => 147940)
--- trunk/Source/WebCore/rendering/RenderLayerBacking.h 2013-04-08 18:38:26 UTC (rev 147939)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.h 2013-04-08 18:39:24 UTC (rev 147940)
@@ -33,13 +33,13 @@
#include "GraphicsLayer.h"
#include "GraphicsLayerClient.h"
#include "RenderLayer.h"
-#include "TransformationMatrix.h"
namespace WebCore {
class KeyframeList;
class RenderLayerCompositor;
class TiledBacking;
+class TransformationMatrix;
enum CompositingLayerType {
NormalCompositingLayer, // non-tiled layer with backing store
Modified: trunk/Source/WebCore/rendering/RenderLineBoxList.h (147939 => 147940)
--- trunk/Source/WebCore/rendering/RenderLineBoxList.h 2013-04-08 18:38:26 UTC (rev 147939)
+++ trunk/Source/WebCore/rendering/RenderLineBoxList.h 2013-04-08 18:39:24 UTC (rev 147940)
@@ -34,6 +34,8 @@
namespace WebCore {
+class InlineFlowBox;
+
class RenderLineBoxList {
public:
RenderLineBoxList()
Modified: trunk/Source/WebCore/rendering/RenderObject.h (147939 => 147940)
--- trunk/Source/WebCore/rendering/RenderObject.h 2013-04-08 18:38:26 UTC (rev 147939)
+++ trunk/Source/WebCore/rendering/RenderObject.h 2013-04-08 18:39:24 UTC (rev 147940)
@@ -37,10 +37,7 @@
#include "ScrollBehavior.h"
#include "StyleInheritedData.h"
#include "TextAffinity.h"
-#include "TransformationMatrix.h"
#include <wtf/HashSet.h>
-#include <wtf/StackStats.h>
-#include <wtf/UnusedParam.h>
namespace WebCore {
@@ -51,8 +48,6 @@
class HitTestLocation;
class HitTestResult;
class InlineBox;
-class InlineFlowBox;
-class OverlapTestRequestClient;
class Path;
class Position;
class PseudoStyleRequest;
@@ -64,7 +59,6 @@
class RenderLayer;
class RenderLayerModelObject;
class RenderNamedFlowThread;
-class RenderTable;
class RenderTheme;
class TransformState;
class VisiblePosition;
@@ -1330,17 +1324,6 @@
return m_bitfields.boxDecorationState() == HasBoxDecorationsAndBackgroundIsKnownToBeObscured;
}
-inline void makeMatrixRenderable(TransformationMatrix& matrix, bool has3DRendering)
-{
-#if !ENABLE(3D_RENDERING)
- UNUSED_PARAM(has3DRendering);
- matrix.makeAffine();
-#else
- if (!has3DRendering)
- matrix.makeAffine();
-#endif
-}
-
inline int adjustForAbsoluteZoom(int value, RenderObject* renderer)
{
return adjustForAbsoluteZoom(value, renderer->style());