Title: [126816] trunk/Source/WebCore
Revision
126816
Author
[email protected]
Date
2012-08-27 16:13:54 -0700 (Mon, 27 Aug 2012)

Log Message

Split LayoutTypes.h to improve compile time
https://bugs.webkit.org/show_bug.cgi?id=95107

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

The inlines from LayoutTypes.h are moved to LayoutTypesInlineMethods.h.
Files that only need the types to be forward declared, don't need to
include definitions for FractionalLayout items (those are expensive to
include)

No new tests. Functionality should be the same.

* WebCore.gypi:
* accessibility/AccessibilityObject.h:
* css/LengthFunctions.cpp:
* dom/DocumentMarkerController.h:
* dom/Node.h:
* inspector/InspectorOverlay.h:
* inspector/InspectorTimelineAgent.h:
* inspector/TimelineRecordFactory.h:
* loader/SubframeLoader.h:
* page/FocusController.h:
* page/Page.h:
* platform/Length.h:
* platform/PopupMenuClient.h:
* platform/graphics/transforms/TransformationMatrix.cpp:
* platform/graphics/transforms/TransformationMatrix.h:
* rendering/AutoTableLayout.h:
* rendering/FixedTableLayout.h:
* rendering/HitTestingTransformState.cpp:
* rendering/LayoutTypes.h:
* rendering/LayoutTypesInlineMethods.h: Added.
(WebCore):
* rendering/RenderMenuList.h:
* rendering/RenderThemeChromiumCommon.h:
* rendering/TextAutosizer.h:
* rendering/style/ShadowData.cpp:
* rendering/style/ShadowData.h:
* rendering/style/WrapShapes.h:
* rendering/svg/SVGRenderSupport.h:
* rendering/svg/SVGRenderingContext.h:
* svg/graphics/SVGImage.h:

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (126815 => 126816)


--- trunk/Source/WebCore/ChangeLog	2012-08-27 23:05:40 UTC (rev 126815)
+++ trunk/Source/WebCore/ChangeLog	2012-08-27 23:13:54 UTC (rev 126816)
@@ -1,3 +1,48 @@
+2012-08-27  Nikhil Bhargava  <[email protected]>
+
+        Split LayoutTypes.h to improve compile time
+        https://bugs.webkit.org/show_bug.cgi?id=95107
+
+        Reviewed by Eric Seidel.
+
+        The inlines from LayoutTypes.h are moved to LayoutTypesInlineMethods.h.
+        Files that only need the types to be forward declared, don't need to
+        include definitions for FractionalLayout items (those are expensive to
+        include)
+
+        No new tests. Functionality should be the same.
+
+        * WebCore.gypi:
+        * accessibility/AccessibilityObject.h:
+        * css/LengthFunctions.cpp:
+        * dom/DocumentMarkerController.h:
+        * dom/Node.h:
+        * inspector/InspectorOverlay.h:
+        * inspector/InspectorTimelineAgent.h:
+        * inspector/TimelineRecordFactory.h:
+        * loader/SubframeLoader.h:
+        * page/FocusController.h:
+        * page/Page.h:
+        * platform/Length.h:
+        * platform/PopupMenuClient.h:
+        * platform/graphics/transforms/TransformationMatrix.cpp:
+        * platform/graphics/transforms/TransformationMatrix.h:
+        * rendering/AutoTableLayout.h:
+        * rendering/FixedTableLayout.h:
+        * rendering/HitTestingTransformState.cpp:
+        * rendering/LayoutTypes.h:
+        * rendering/LayoutTypesInlineMethods.h: Added.
+        (WebCore):
+        * rendering/RenderMenuList.h:
+        * rendering/RenderThemeChromiumCommon.h:
+        * rendering/TextAutosizer.h:
+        * rendering/style/ShadowData.cpp:
+        * rendering/style/ShadowData.h:
+        * rendering/style/WrapShapes.h:
+        * rendering/svg/SVGRenderSupport.h:
+        * rendering/svg/SVGRenderingContext.h:
+        * svg/graphics/SVGImage.h:
+
 2012-08-27  James Robinson  <[email protected]>
 
         [chromium] Put CCThreadImpl / WebCompositorImpl in webcore_chromium_compositor_files gyp section

Modified: trunk/Source/WebCore/WebCore.gypi (126815 => 126816)


--- trunk/Source/WebCore/WebCore.gypi	2012-08-27 23:05:40 UTC (rev 126815)
+++ trunk/Source/WebCore/WebCore.gypi	2012-08-27 23:13:54 UTC (rev 126816)
@@ -551,6 +551,7 @@
             'rendering/InlineTextBox.h',
             'rendering/LayoutState.h',
             'rendering/LayoutTypes.h',
+            'rendering/LayoutTypesInlineMethods.h',
             'rendering/LayoutRepainter.h',
             'rendering/OverlapTestRequestClient.h',
             'rendering/Pagination.h',

Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.h (126815 => 126816)


--- trunk/Source/WebCore/accessibility/AccessibilityObject.h	2012-08-27 23:05:40 UTC (rev 126815)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.h	2012-08-27 23:13:54 UTC (rev 126816)
@@ -31,6 +31,7 @@
 #define AccessibilityObject_h
 
 #include "FloatQuad.h"
+#include "FractionalLayoutRect.h"
 #include "LayoutTypes.h"
 #include "VisiblePosition.h"
 #include "VisibleSelection.h"

Modified: trunk/Source/WebCore/css/LengthFunctions.cpp (126815 => 126816)


--- trunk/Source/WebCore/css/LengthFunctions.cpp	2012-08-27 23:05:40 UTC (rev 126815)
+++ trunk/Source/WebCore/css/LengthFunctions.cpp	2012-08-27 23:13:54 UTC (rev 126816)
@@ -24,6 +24,7 @@
 #include "config.h"
 #include "LengthFunctions.h"
 
+#include "LayoutTypes.h"
 #include "Length.h"
 #include "RenderView.h"
 

Modified: trunk/Source/WebCore/dom/DocumentMarkerController.h (126815 => 126816)


--- trunk/Source/WebCore/dom/DocumentMarkerController.h	2012-08-27 23:05:40 UTC (rev 126815)
+++ trunk/Source/WebCore/dom/DocumentMarkerController.h	2012-08-27 23:13:54 UTC (rev 126816)
@@ -28,6 +28,7 @@
 #define DocumentMarkerController_h
 
 #include "DocumentMarker.h"
+#include "IntRect.h"
 #include "LayoutTypes.h"
 #include <wtf/HashMap.h>
 #include <wtf/Vector.h>

Modified: trunk/Source/WebCore/dom/Node.h (126815 => 126816)


--- trunk/Source/WebCore/dom/Node.h	2012-08-27 23:05:40 UTC (rev 126815)
+++ trunk/Source/WebCore/dom/Node.h	2012-08-27 23:13:54 UTC (rev 126816)
@@ -28,6 +28,7 @@
 #include "EditingBoundary.h"
 #include "EventTarget.h"
 #include "ExceptionCodePlaceholder.h"
+#include "FractionalLayoutRect.h"
 #include "KURLHash.h"
 #include "LayoutTypes.h"
 #include "MutationObserver.h"

Modified: trunk/Source/WebCore/dom/Touch.h (126815 => 126816)


--- trunk/Source/WebCore/dom/Touch.h	2012-08-27 23:05:40 UTC (rev 126815)
+++ trunk/Source/WebCore/dom/Touch.h	2012-08-27 23:13:54 UTC (rev 126816)
@@ -29,7 +29,7 @@
 #if ENABLE(TOUCH_EVENTS)
 
 #include "EventTarget.h"
-#include "LayoutTypes.h"
+#include "LayoutTypesInlineMethods.h"
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 #include <wtf/RefPtr.h>

Modified: trunk/Source/WebCore/loader/SubframeLoader.h (126815 => 126816)


--- trunk/Source/WebCore/loader/SubframeLoader.h	2012-08-27 23:05:40 UTC (rev 126815)
+++ trunk/Source/WebCore/loader/SubframeLoader.h	2012-08-27 23:13:54 UTC (rev 126816)
@@ -32,7 +32,6 @@
 #define SubframeLoader_h
 
 #include "FrameLoaderTypes.h"
-#include "LayoutTypes.h"
 #include "PlatformString.h"
 #include <wtf/Forward.h>
 #include <wtf/HashMap.h>

Modified: trunk/Source/WebCore/platform/Length.h (126815 => 126816)


--- trunk/Source/WebCore/platform/Length.h	2012-08-27 23:05:40 UTC (rev 126815)
+++ trunk/Source/WebCore/platform/Length.h	2012-08-27 23:13:54 UTC (rev 126816)
@@ -24,7 +24,6 @@
 #define Length_h
 
 #include "AnimationUtilities.h"
-#include "LayoutTypes.h"
 #include <wtf/Assertions.h>
 #include <wtf/FastAllocBase.h>
 #include <wtf/Forward.h>

Modified: trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp (126815 => 126816)


--- trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp	2012-08-27 23:05:40 UTC (rev 126815)
+++ trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp	2012-08-27 23:13:54 UTC (rev 126816)
@@ -31,7 +31,7 @@
 
 #include "FloatPoint.h"
 #include "GraphicsContext.h"
-#include "LayoutTypes.h"
+#include "LayoutTypesInlineMethods.h"
 #include "RotateTransformOperation.h"
 #include "TextStream.h"
 #include <wtf/text/CString.h>

Modified: trunk/Source/WebCore/platform/graphics/transforms/TransformState.h (126815 => 126816)


--- trunk/Source/WebCore/platform/graphics/transforms/TransformState.h	2012-08-27 23:05:40 UTC (rev 126815)
+++ trunk/Source/WebCore/platform/graphics/transforms/TransformState.h	2012-08-27 23:13:54 UTC (rev 126816)
@@ -30,7 +30,7 @@
 #include "FloatPoint.h"
 #include "FloatQuad.h"
 #include "IntSize.h"
-#include "LayoutTypes.h"
+#include "LayoutTypesInlineMethods.h"
 #include "TransformationMatrix.h"
 #include <wtf/OwnPtr.h>
 

Modified: trunk/Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp (126815 => 126816)


--- trunk/Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp	2012-08-27 23:05:40 UTC (rev 126815)
+++ trunk/Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp	2012-08-27 23:13:54 UTC (rev 126816)
@@ -31,6 +31,7 @@
 #include "FloatPoint3D.h"
 #include "FloatRect.h"
 #include "FloatQuad.h"
+#include "FractionalLayoutRect.h"
 #include "IntRect.h"
 
 #include <wtf/Assertions.h>

Modified: trunk/Source/WebCore/platform/graphics/transforms/TransformationMatrix.h (126815 => 126816)


--- trunk/Source/WebCore/platform/graphics/transforms/TransformationMatrix.h	2012-08-27 23:05:40 UTC (rev 126815)
+++ trunk/Source/WebCore/platform/graphics/transforms/TransformationMatrix.h	2012-08-27 23:13:54 UTC (rev 126816)
@@ -27,7 +27,6 @@
 #define TransformationMatrix_h
 
 #include "FloatPoint.h"
-#include "FractionalLayoutRect.h"
 #include "IntPoint.h"
 #include <string.h> //for memcpy
 #include <wtf/FastAllocBase.h>

Modified: trunk/Source/WebCore/rendering/ColumnInfo.h (126815 => 126816)


--- trunk/Source/WebCore/rendering/ColumnInfo.h	2012-08-27 23:05:40 UTC (rev 126815)
+++ trunk/Source/WebCore/rendering/ColumnInfo.h	2012-08-27 23:13:54 UTC (rev 126816)
@@ -26,7 +26,7 @@
 #ifndef ColumnInfo_h
 #define ColumnInfo_h
 
-#include "LayoutTypes.h"
+#include "LayoutTypesInlineMethods.h"
 #include <wtf/Vector.h>
 
 namespace WebCore {

Modified: trunk/Source/WebCore/rendering/HitTestResult.h (126815 => 126816)


--- trunk/Source/WebCore/rendering/HitTestResult.h	2012-08-27 23:05:40 UTC (rev 126815)
+++ trunk/Source/WebCore/rendering/HitTestResult.h	2012-08-27 23:13:54 UTC (rev 126816)
@@ -25,7 +25,7 @@
 #include "FloatQuad.h"
 #include "FloatRect.h"
 #include "HitTestRequest.h"
-#include "LayoutTypes.h"
+#include "LayoutTypesInlineMethods.h"
 #include "TextDirection.h"
 #include <wtf/Forward.h>
 #include <wtf/ListHashSet.h>

Modified: trunk/Source/WebCore/rendering/HitTestingTransformState.cpp (126815 => 126816)


--- trunk/Source/WebCore/rendering/HitTestingTransformState.cpp	2012-08-27 23:05:40 UTC (rev 126815)
+++ trunk/Source/WebCore/rendering/HitTestingTransformState.cpp	2012-08-27 23:13:54 UTC (rev 126816)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "HitTestingTransformState.h"
 
+#include "FractionalLayoutRect.h"
 #include <wtf/PassOwnPtr.h>
 
 namespace WebCore {

Modified: trunk/Source/WebCore/rendering/LayoutRepainter.h (126815 => 126816)


--- trunk/Source/WebCore/rendering/LayoutRepainter.h	2012-08-27 23:05:40 UTC (rev 126815)
+++ trunk/Source/WebCore/rendering/LayoutRepainter.h	2012-08-27 23:13:54 UTC (rev 126816)
@@ -26,7 +26,7 @@
 #ifndef LayoutRepainter_h
 #define LayoutRepainter_h
 
-#include "LayoutTypes.h"
+#include "LayoutTypesInlineMethods.h"
 
 namespace WebCore {
 

Modified: trunk/Source/WebCore/rendering/LayoutTypes.h (126815 => 126816)


--- trunk/Source/WebCore/rendering/LayoutTypes.h	2012-08-27 23:05:40 UTC (rev 126815)
+++ trunk/Source/WebCore/rendering/LayoutTypes.h	2012-08-27 23:13:54 UTC (rev 126816)
@@ -36,132 +36,24 @@
 #ifndef LayoutTypes_h
 #define LayoutTypes_h
 
-#include "FloatRect.h"
-#include "FractionalLayoutBoxExtent.h"
-#include "FractionalLayoutRect.h"
-#include "FractionalLayoutUnit.h"
-#include "IntRect.h"
-
-#include <wtf/MathExtras.h>
-
 namespace WebCore {
 
-typedef FractionalLayoutUnit LayoutUnit;
+class FractionalLayoutBoxExtent;
+class FractionalLayoutPoint;
+class FractionalLayoutRect;
+class FractionalLayoutSize;
+class FractionalLayoutUnit;
+
+typedef FractionalLayoutBoxExtent LayoutBoxExtent;
 typedef FractionalLayoutPoint LayoutPoint;
-typedef FractionalLayoutSize LayoutSize;
 typedef FractionalLayoutRect LayoutRect;
-typedef FractionalLayoutBoxExtent LayoutBoxExtent;
+typedef FractionalLayoutSize LayoutSize;
+typedef FractionalLayoutUnit LayoutUnit;
 
 #define MAX_LAYOUT_UNIT LayoutUnit::max()
 #define MIN_LAYOUT_UNIT LayoutUnit::min()
 #define ZERO_LAYOUT_UNIT LayoutUnit(0)
 
-inline FractionalLayoutRect enclosingLayoutRect(const FloatRect& rect)
-{
-    return enclosingIntRect(rect);
-}
-
-inline LayoutSize roundedLayoutSize(const FloatSize& s)
-{
-#if ENABLE(SUBPIXEL_LAYOUT)
-    return FractionalLayoutSize(s);
-#else
-    return roundedIntSize(s);
-#endif
-}
-
-inline IntRect pixelSnappedIntRect(LayoutUnit left, LayoutUnit top, LayoutUnit width, LayoutUnit height)
-{
-    return IntRect(left.round(), top.round(), snapSizeToPixel(width, left), snapSizeToPixel(height, top));
-}
-
-inline IntRect pixelSnappedIntRectFromEdges(LayoutUnit left, LayoutUnit top, LayoutUnit right, LayoutUnit bottom)
-{
-    return IntRect(left.round(), top.round(), snapSizeToPixel(right - left, left), snapSizeToPixel(bottom - top, top));
-}
-
-inline LayoutPoint roundedLayoutPoint(const FloatPoint& p)
-{
-#if ENABLE(SUBPIXEL_LAYOUT)
-    return FractionalLayoutPoint(p);
-#else
-    return roundedIntPoint(p);
-#endif
-}
-
-inline LayoutPoint flooredLayoutPoint(const FloatPoint& p)
-{
-    return flooredFractionalLayoutPoint(p);
-}
-
-inline LayoutPoint flooredLayoutPoint(const FloatSize& s)
-{
-    return flooredLayoutPoint(FloatPoint(s));
-}
-
-inline int roundToInt(LayoutUnit value)
-{
-    return value.round();
-}
-
-inline int floorToInt(LayoutUnit value)
-{
-    return value.floor();
-}
-
-inline LayoutUnit roundedLayoutUnit(float value)
-{
-#if ENABLE(SUBPIXEL_LAYOUT)
-    return FractionalLayoutUnit::fromFloatRound(value);
-#else
-    return static_cast<int>(lroundf(value));
-#endif
-}
-
-inline LayoutUnit ceiledLayoutUnit(float value)
-{
-#if ENABLE(SUBPIXEL_LAYOUT)
-    return FractionalLayoutUnit::fromFloatCeil(value);
-#else
-    return ceilf(value);
-#endif
-}
-
-inline LayoutUnit absoluteValue(const LayoutUnit& value)
-{
-    return value.abs();
-}
-
-inline LayoutSize toLayoutSize(const LayoutPoint& p)
-{
-    return LayoutSize(p.x(), p.y());
-}
-
-inline LayoutPoint toLayoutPoint(const LayoutSize& p)
-{
-    return LayoutPoint(p.width(), p.height());
-}
-
-inline LayoutUnit layoutMod(const LayoutUnit& numerator, const LayoutUnit& denominator)
-{
-    return numerator % denominator;
-}
-
-inline IntSize pixelSnappedIntSize(const FractionalLayoutSize& s, const FractionalLayoutPoint& p)
-{
-    return IntSize(snapSizeToPixel(s.width(), p.x()), snapSizeToPixel(s.height(), p.y()));
-}
-
-inline IntRect pixelSnappedIntRect(LayoutPoint location, LayoutSize size)
-{
-    return IntRect(roundedIntPoint(location), pixelSnappedIntSize(size, location));
-}
-
-inline bool isIntegerValue(const LayoutUnit value)
-{
-    return value.toInt() == value;
-}
-
 } // namespace WebCore
 
 #endif // LayoutTypes_h

Copied: trunk/Source/WebCore/rendering/LayoutTypesInlineMethods.h (from rev 126815, trunk/Source/WebCore/rendering/LayoutTypes.h) (0 => 126816)


--- trunk/Source/WebCore/rendering/LayoutTypesInlineMethods.h	                        (rev 0)
+++ trunk/Source/WebCore/rendering/LayoutTypesInlineMethods.h	2012-08-27 23:13:54 UTC (rev 126816)
@@ -0,0 +1,153 @@
+/*
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef LayoutTypesInlineMethods_h
+#define LayoutTypesInlineMethods_h
+
+#include "FloatRect.h"
+#include "FractionalLayoutBoxExtent.h"
+#include "FractionalLayoutRect.h"
+#include "FractionalLayoutUnit.h"
+#include "IntRect.h"
+#include "LayoutTypes.h"
+
+#include <wtf/MathExtras.h>
+
+namespace WebCore {
+
+inline FractionalLayoutRect enclosingLayoutRect(const FloatRect& rect)
+{
+    return enclosingIntRect(rect);
+}
+
+inline LayoutSize roundedLayoutSize(const FloatSize& s)
+{
+#if ENABLE(SUBPIXEL_LAYOUT)
+    return FractionalLayoutSize(s);
+#else
+    return roundedIntSize(s);
+#endif
+}
+
+inline IntRect pixelSnappedIntRect(LayoutUnit left, LayoutUnit top, LayoutUnit width, LayoutUnit height)
+{
+    return IntRect(left.round(), top.round(), snapSizeToPixel(width, left), snapSizeToPixel(height, top));
+}
+
+inline IntRect pixelSnappedIntRectFromEdges(LayoutUnit left, LayoutUnit top, LayoutUnit right, LayoutUnit bottom)
+{
+    return IntRect(left.round(), top.round(), snapSizeToPixel(right - left, left), snapSizeToPixel(bottom - top, top));
+}
+
+inline LayoutPoint roundedLayoutPoint(const FloatPoint& p)
+{
+#if ENABLE(SUBPIXEL_LAYOUT)
+    return FractionalLayoutPoint(p);
+#else
+    return roundedIntPoint(p);
+#endif
+}
+
+inline LayoutPoint flooredLayoutPoint(const FloatPoint& p)
+{
+    return flooredFractionalLayoutPoint(p);
+}
+
+inline LayoutPoint flooredLayoutPoint(const FloatSize& s)
+{
+    return flooredLayoutPoint(FloatPoint(s));
+}
+
+inline int roundToInt(LayoutUnit value)
+{
+    return value.round();
+}
+
+inline int floorToInt(LayoutUnit value)
+{
+    return value.floor();
+}
+
+inline LayoutUnit roundedLayoutUnit(float value)
+{
+#if ENABLE(SUBPIXEL_LAYOUT)
+    return FractionalLayoutUnit::fromFloatRound(value);
+#else
+    return static_cast<int>(lroundf(value));
+#endif
+}
+
+inline LayoutUnit ceiledLayoutUnit(float value)
+{
+#if ENABLE(SUBPIXEL_LAYOUT)
+    return FractionalLayoutUnit::fromFloatCeil(value);
+#else
+    return ceilf(value);
+#endif
+}
+
+inline LayoutUnit absoluteValue(const LayoutUnit& value)
+{
+    return value.abs();
+}
+
+inline LayoutSize toLayoutSize(const LayoutPoint& p)
+{
+    return LayoutSize(p.x(), p.y());
+}
+
+inline LayoutPoint toLayoutPoint(const LayoutSize& p)
+{
+    return LayoutPoint(p.width(), p.height());
+}
+
+inline LayoutUnit layoutMod(const LayoutUnit& numerator, const LayoutUnit& denominator)
+{
+    return numerator % denominator;
+}
+
+inline IntSize pixelSnappedIntSize(const FractionalLayoutSize& s, const FractionalLayoutPoint& p)
+{
+    return IntSize(snapSizeToPixel(s.width(), p.x()), snapSizeToPixel(s.height(), p.y()));
+}
+
+inline IntRect pixelSnappedIntRect(LayoutPoint location, LayoutSize size)
+{
+    return IntRect(roundedIntPoint(location), pixelSnappedIntSize(size, location));
+}
+
+inline bool isIntegerValue(const LayoutUnit value)
+{
+    return value.toInt() == value;
+}
+
+} // namespace WebCore
+
+#endif // LayoutTypesInlineMethods_h

Modified: trunk/Source/WebCore/rendering/PaintInfo.h (126815 => 126816)


--- trunk/Source/WebCore/rendering/PaintInfo.h	2012-08-27 23:05:40 UTC (rev 126815)
+++ trunk/Source/WebCore/rendering/PaintInfo.h	2012-08-27 23:13:54 UTC (rev 126816)
@@ -32,7 +32,7 @@
 
 #include "GraphicsContext.h"
 #include "IntRect.h"
-#include "LayoutTypes.h"
+#include "LayoutTypesInlineMethods.h"
 #include "PaintPhase.h"
 #include <limits>
 #include <wtf/HashMap.h>

Modified: trunk/Source/WebCore/rendering/RenderBoxModelObject.h (126815 => 126816)


--- trunk/Source/WebCore/rendering/RenderBoxModelObject.h	2012-08-27 23:05:40 UTC (rev 126815)
+++ trunk/Source/WebCore/rendering/RenderBoxModelObject.h	2012-08-27 23:13:54 UTC (rev 126816)
@@ -24,6 +24,7 @@
 #ifndef RenderBoxModelObject_h
 #define RenderBoxModelObject_h
 
+#include "LayoutTypesInlineMethods.h"
 #include "RenderObject.h"
 #include "ShadowData.h"
 

Modified: trunk/Source/WebCore/rendering/TextAutosizer.h (126815 => 126816)


--- trunk/Source/WebCore/rendering/TextAutosizer.h	2012-08-27 23:05:40 UTC (rev 126815)
+++ trunk/Source/WebCore/rendering/TextAutosizer.h	2012-08-27 23:13:54 UTC (rev 126816)
@@ -28,7 +28,7 @@
 
 #if ENABLE(TEXT_AUTOSIZING)
 
-#include "LayoutTypes.h"
+#include "IntSize.h"
 #include <wtf/Noncopyable.h>
 #include <wtf/PassOwnPtr.h>
 #include <wtf/PassRefPtr.h>

Modified: trunk/Source/WebCore/rendering/WrapShapeInfo.h (126815 => 126816)


--- trunk/Source/WebCore/rendering/WrapShapeInfo.h	2012-08-27 23:05:40 UTC (rev 126815)
+++ trunk/Source/WebCore/rendering/WrapShapeInfo.h	2012-08-27 23:13:54 UTC (rev 126816)
@@ -32,7 +32,7 @@
 
 #if ENABLE(CSS_EXCLUSIONS)
 
-#include "LayoutTypes.h"
+#include "LayoutTypesInlineMethods.h"
 #include <wtf/PassOwnPtr.h>
 #include <wtf/Vector.h>
 

Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (126815 => 126816)


--- trunk/Source/WebCore/rendering/style/RenderStyle.h	2012-08-27 23:05:40 UTC (rev 126815)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h	2012-08-27 23:13:54 UTC (rev 126816)
@@ -38,6 +38,7 @@
 #include "FontBaseline.h"
 #include "FontDescription.h"
 #include "GraphicsTypes.h"
+#include "LayoutTypesInlineMethods.h"
 #include "Length.h"
 #include "LengthBox.h"
 #include "LengthFunctions.h"

Modified: trunk/Source/WebCore/rendering/style/ShadowData.cpp (126815 => 126816)


--- trunk/Source/WebCore/rendering/style/ShadowData.cpp	2012-08-27 23:05:40 UTC (rev 126815)
+++ trunk/Source/WebCore/rendering/style/ShadowData.cpp	2012-08-27 23:13:54 UTC (rev 126816)
@@ -22,6 +22,8 @@
 #include "config.h"
 #include "ShadowData.h"
 
+#include "LayoutTypesInlineMethods.h"
+
 using namespace std;
 
 namespace WebCore {

Modified: trunk/Source/WebCore/rendering/style/ShadowData.h (126815 => 126816)


--- trunk/Source/WebCore/rendering/style/ShadowData.h	2012-08-27 23:05:40 UTC (rev 126815)
+++ trunk/Source/WebCore/rendering/style/ShadowData.h	2012-08-27 23:13:54 UTC (rev 126816)
@@ -26,6 +26,7 @@
 #define ShadowData_h
 
 #include "Color.h"
+#include "FloatRect.h"
 #include "LayoutTypes.h"
 #include <wtf/OwnPtr.h>
 #include <wtf/PassOwnPtr.h>

Modified: trunk/Source/WebCore/rendering/style/WrapShapes.h (126815 => 126816)


--- trunk/Source/WebCore/rendering/style/WrapShapes.h	2012-08-27 23:05:40 UTC (rev 126815)
+++ trunk/Source/WebCore/rendering/style/WrapShapes.h	2012-08-27 23:13:54 UTC (rev 126816)
@@ -34,6 +34,7 @@
 #include "WindRule.h"
 #include <wtf/RefCounted.h>
 #include <wtf/RefPtr.h>
+#include <wtf/Vector.h>
 
 namespace WebCore {
 

Modified: trunk/Source/WebCore/rendering/svg/SVGRenderingContext.h (126815 => 126816)


--- trunk/Source/WebCore/rendering/svg/SVGRenderingContext.h	2012-08-27 23:05:40 UTC (rev 126815)
+++ trunk/Source/WebCore/rendering/svg/SVGRenderingContext.h	2012-08-27 23:13:54 UTC (rev 126816)
@@ -27,7 +27,6 @@
 
 #if ENABLE(SVG)
 #include "ImageBuffer.h"
-#include "LayoutTypes.h"
 #include "PaintInfo.h"
 
 namespace WebCore {

Modified: trunk/Source/WebCore/svg/graphics/SVGImage.h (126815 => 126816)


--- trunk/Source/WebCore/svg/graphics/SVGImage.h	2012-08-27 23:05:40 UTC (rev 126815)
+++ trunk/Source/WebCore/svg/graphics/SVGImage.h	2012-08-27 23:13:54 UTC (rev 126816)
@@ -30,7 +30,6 @@
 #if ENABLE(SVG)
 
 #include "Image.h"
-#include "LayoutTypes.h"
 
 namespace WebCore {
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to