Remove LayoutTypes abstraction
authoreae@chromium.org <eae@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Nov 2012 18:33:44 +0000 (18:33 +0000)
committereae@chromium.org <eae@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Nov 2012 18:33:44 +0000 (18:33 +0000)
https://bugs.webkit.org/show_bug.cgi?id=93050

Reviewed by Levi Weintraub.

Remove LayoutTypes abstraction and rename FractionalLayout* to
Layout* now that all platforms use the FractionalLayout version
(albeit with different fractions).

No new tests, no change in functionality.

Source/WebCore:

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.exp.in:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AccessibilityNodeObject.cpp:
* accessibility/AccessibilityNodeObject.h:
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.h:
* css/LengthFunctions.cpp:
* css/LengthFunctions.h:
* dom/Document.h:
* dom/DocumentMarkerController.h:
* dom/ElementRareData.h:
* dom/MouseRelatedEvent.h:
* dom/Node.h:
* dom/Touch.h:
* editing/FrameSelection.cpp:
* editing/FrameSelection.h:
* editing/RenderedPosition.h:
* html/HTMLAreaElement.h:
* inspector/InspectorOverlay.h:
* inspector/InspectorTimelineAgent.h:
* inspector/TimelineRecordFactory.cpp:
* inspector/TimelineRecordFactory.h:
* loader/cache/CachedImage.h:
* page/FocusController.h:
* page/FrameView.h:
* page/Page.h:
* page/SpatialNavigation.cpp:
* page/SpatialNavigation.h:
* platform/FractionalLayoutUnit.h: Removed.
* platform/LayoutUnit.h: Copied from Source/WebCore/platform/FractionalLayoutUnit.h.
* platform/Length.h:
* platform/PopupMenuClient.h:
* platform/animation/AnimationUtilities.h:
* platform/graphics/FloatPoint.cpp:
* platform/graphics/FloatPoint.h:
* platform/graphics/FloatRect.cpp:
* platform/graphics/FloatRect.h:
* platform/graphics/FloatSize.cpp:
* platform/graphics/FloatSize.h:
* platform/graphics/FractionalLayoutBoxExtent.cpp: Removed.
* platform/graphics/FractionalLayoutBoxExtent.h: Removed.
* platform/graphics/FractionalLayoutPoint.h: Removed.
* platform/graphics/FractionalLayoutRect.cpp: Removed.
* platform/graphics/FractionalLayoutRect.h: Removed.
* platform/graphics/FractionalLayoutSize.h: Removed.
* platform/graphics/GraphicsLayer.cpp:
* platform/graphics/GraphicsLayerAnimation.cpp:
* platform/graphics/IntRect.cpp:
* platform/graphics/IntRect.h:
* platform/graphics/LayoutBoxExtent.cpp: Copied from Source/WebCore/platform/graphics/FractionalLayoutBoxExtent.cpp.
* platform/graphics/LayoutBoxExtent.h: Copied from Source/WebCore/platform/graphics/FractionalLayoutBoxExtent.h.
* platform/graphics/LayoutPoint.h: Copied from Source/WebCore/platform/graphics/FractionalLayoutPoint.h.
* platform/graphics/LayoutRect.cpp: Copied from Source/WebCore/platform/graphics/FractionalLayoutRect.cpp.
* platform/graphics/LayoutRect.h: Copied from Source/WebCore/platform/graphics/FractionalLayoutRect.h.
* platform/graphics/LayoutSize.h: Copied from Source/WebCore/platform/graphics/FractionalLayoutSize.h.
* platform/graphics/MediaPlayer.h:
* platform/graphics/filters/CustomFilterOperation.h:
* platform/graphics/filters/CustomFilterParameterList.h:
* platform/graphics/filters/FilterOperation.h:
* platform/graphics/filters/FilterOperations.h:
* platform/graphics/filters/ValidatedCustomFilterOperation.cpp:
* platform/graphics/filters/ValidatedCustomFilterOperation.h:
* platform/graphics/qt/FractionalLayoutPointQt.cpp: Removed.
* platform/graphics/qt/FractionalLayoutRectQt.cpp: Removed.
* platform/graphics/qt/FractionalLayoutSizeQt.cpp: Removed.
* platform/graphics/qt/LayoutPointQt.cpp: Copied from Source/WebCore/platform/graphics/qt/FractionalLayoutPointQt.cpp.
* platform/graphics/qt/LayoutRectQt.cpp: Added.
* platform/graphics/qt/LayoutSizeQt.cpp: Copied from Source/WebCore/platform/graphics/qt/FractionalLayoutSizeQt.cpp.
* platform/graphics/transforms/TransformOperations.h:
* platform/graphics/transforms/TransformState.h:
* platform/graphics/transforms/TransformationMatrix.cpp:
* platform/graphics/transforms/TransformationMatrix.h:
* rendering/AutoTableLayout.h:
* rendering/ColumnInfo.h:
* rendering/ExclusionShapeInsideInfo.h:
* rendering/FilterEffectRenderer.h:
* rendering/FixedTableLayout.h:
* rendering/GapRects.h:
* rendering/HitTestResult.h:
* rendering/HitTestingTransformState.cpp:
* rendering/HitTestingTransformState.h:
* rendering/InlineFlowBox.cpp:
* rendering/LayoutRepainter.cpp:
* rendering/LayoutRepainter.h:
* rendering/LayoutState.h:
* rendering/LayoutTypes.h:
* rendering/LayoutTypesInlineMethods.h:
* rendering/PaintInfo.h:
* rendering/RenderBlock.cpp:
* rendering/RenderBlock.h:
* rendering/RenderBlockLineLayout.cpp:
* rendering/RenderBox.cpp:
* rendering/RenderBox.h:
* rendering/RenderBoxModelObject.cpp:
* rendering/RenderBoxModelObject.h:
* rendering/RenderDeprecatedFlexibleBox.cpp:
* rendering/RenderFieldset.cpp:
* rendering/RenderFlexibleBox.cpp:
* rendering/RenderFlowThread.cpp:
* rendering/RenderGeometryMap.h:
* rendering/RenderImageResource.h:
* rendering/RenderInline.cpp:
* rendering/RenderLayer.cpp:
* rendering/RenderLayerFilterInfo.h:
* rendering/RenderLineBoxList.cpp:
* rendering/RenderListMarker.cpp:
* rendering/RenderMarquee.cpp:
* rendering/RenderMenuList.h:
* rendering/RenderMultiColumnBlock.cpp:
* rendering/RenderMultiColumnSet.cpp:
* rendering/RenderNamedFlowThread.cpp:
* rendering/RenderObject.cpp:
* rendering/RenderObject.h:
* rendering/RenderOverflow.h:
* rendering/RenderRegion.cpp:
* rendering/RenderReplaced.cpp:
* rendering/RenderTable.cpp:
* rendering/RenderTable.h:
* rendering/RenderText.cpp:
* rendering/RenderThemeChromiumCommon.cpp:
* rendering/RenderThemeChromiumCommon.h:
* rendering/RenderTreeAsText.cpp:
* rendering/RenderTreeAsText.h:
* rendering/RenderView.h:
* rendering/style/NinePieceImage.h:
* rendering/style/RenderStyle.h:
* rendering/style/ShadowData.cpp:
* rendering/style/ShadowData.h:
* rendering/style/StyleCachedImageSet.h:
* rendering/style/StyleImage.h:
* rendering/svg/SVGRenderSupport.h:

Source/WebKit/chromium:

* src/LinkHighlight.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@133779 268f45cc-cd09-0410-ab3c-d52691b4dbfc

131 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/Target.pri
Source/WebCore/WebCore.exp.in
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/accessibility/AccessibilityNodeObject.cpp
Source/WebCore/accessibility/AccessibilityNodeObject.h
Source/WebCore/accessibility/AccessibilityObject.h
Source/WebCore/accessibility/AccessibilityRenderObject.h
Source/WebCore/css/LengthFunctions.cpp
Source/WebCore/css/LengthFunctions.h
Source/WebCore/dom/Document.h
Source/WebCore/dom/DocumentMarkerController.h
Source/WebCore/dom/ElementRareData.h
Source/WebCore/dom/MouseRelatedEvent.h
Source/WebCore/dom/Node.h
Source/WebCore/dom/Touch.h
Source/WebCore/editing/FrameSelection.cpp
Source/WebCore/editing/FrameSelection.h
Source/WebCore/editing/RenderedPosition.h
Source/WebCore/html/HTMLAreaElement.h
Source/WebCore/inspector/InspectorOverlay.h
Source/WebCore/inspector/InspectorTimelineAgent.h
Source/WebCore/inspector/TimelineRecordFactory.cpp
Source/WebCore/inspector/TimelineRecordFactory.h
Source/WebCore/loader/cache/CachedImage.h
Source/WebCore/page/FocusController.h
Source/WebCore/page/FrameView.h
Source/WebCore/page/Page.h
Source/WebCore/page/SpatialNavigation.h
Source/WebCore/page/scrolling/ScrollingCoordinator.h
Source/WebCore/platform/LayoutUnit.h [moved from Source/WebCore/platform/FractionalLayoutUnit.h with 57% similarity]
Source/WebCore/platform/Length.h
Source/WebCore/platform/PopupMenuClient.h
Source/WebCore/platform/animation/AnimationUtilities.h
Source/WebCore/platform/graphics/FloatPoint.cpp
Source/WebCore/platform/graphics/FloatPoint.h
Source/WebCore/platform/graphics/FloatRect.cpp
Source/WebCore/platform/graphics/FloatRect.h
Source/WebCore/platform/graphics/FloatSize.cpp
Source/WebCore/platform/graphics/FloatSize.h
Source/WebCore/platform/graphics/FractionalLayoutBoxExtent.h [deleted file]
Source/WebCore/platform/graphics/FractionalLayoutPoint.h [deleted file]
Source/WebCore/platform/graphics/FractionalLayoutRect.h [deleted file]
Source/WebCore/platform/graphics/GraphicsLayer.cpp
Source/WebCore/platform/graphics/GraphicsLayerAnimation.cpp
Source/WebCore/platform/graphics/IntRect.cpp
Source/WebCore/platform/graphics/IntRect.h
Source/WebCore/platform/graphics/LayoutBoxExtent.cpp [moved from Source/WebCore/platform/graphics/FractionalLayoutBoxExtent.cpp with 75% similarity]
Source/WebCore/platform/graphics/LayoutBoxExtent.h [new file with mode: 0644]
Source/WebCore/platform/graphics/LayoutPoint.h [new file with mode: 0644]
Source/WebCore/platform/graphics/LayoutRect.cpp [moved from Source/WebCore/platform/graphics/FractionalLayoutRect.cpp with 64% similarity]
Source/WebCore/platform/graphics/LayoutRect.h [new file with mode: 0644]
Source/WebCore/platform/graphics/LayoutSize.h [moved from Source/WebCore/platform/graphics/FractionalLayoutSize.h with 55% similarity]
Source/WebCore/platform/graphics/MediaPlayer.h
Source/WebCore/platform/graphics/filters/CustomFilterOperation.h
Source/WebCore/platform/graphics/filters/CustomFilterParameterList.h
Source/WebCore/platform/graphics/filters/FilterOperation.h
Source/WebCore/platform/graphics/filters/FilterOperations.h
Source/WebCore/platform/graphics/filters/ValidatedCustomFilterOperation.cpp
Source/WebCore/platform/graphics/filters/ValidatedCustomFilterOperation.h
Source/WebCore/platform/graphics/qt/LayoutPointQt.cpp [moved from Source/WebCore/platform/graphics/qt/FractionalLayoutPointQt.cpp with 83% similarity]
Source/WebCore/platform/graphics/qt/LayoutRectQt.cpp [moved from Source/WebCore/platform/graphics/qt/FractionalLayoutRectQt.cpp with 85% similarity]
Source/WebCore/platform/graphics/qt/LayoutSizeQt.cpp [moved from Source/WebCore/platform/graphics/qt/FractionalLayoutSizeQt.cpp with 84% similarity]
Source/WebCore/platform/graphics/transforms/TransformOperations.h
Source/WebCore/platform/graphics/transforms/TransformState.h
Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp
Source/WebCore/platform/graphics/transforms/TransformationMatrix.h
Source/WebCore/rendering/AutoTableLayout.h
Source/WebCore/rendering/ColumnInfo.h
Source/WebCore/rendering/ExclusionShapeInsideInfo.h
Source/WebCore/rendering/FilterEffectRenderer.h
Source/WebCore/rendering/FixedTableLayout.h
Source/WebCore/rendering/GapRects.h
Source/WebCore/rendering/HitTestResult.h
Source/WebCore/rendering/HitTestingTransformState.cpp
Source/WebCore/rendering/HitTestingTransformState.h
Source/WebCore/rendering/InlineFlowBox.cpp
Source/WebCore/rendering/InlineFlowBox.h
Source/WebCore/rendering/LayoutRepainter.h
Source/WebCore/rendering/LayoutState.h
Source/WebCore/rendering/LayoutTypes.h [deleted file]
Source/WebCore/rendering/LayoutTypesInlineMethods.h [deleted file]
Source/WebCore/rendering/PaintInfo.h
Source/WebCore/rendering/RenderBlock.cpp
Source/WebCore/rendering/RenderBlock.h
Source/WebCore/rendering/RenderBlockLineLayout.cpp
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderBox.h
Source/WebCore/rendering/RenderBoxModelObject.cpp
Source/WebCore/rendering/RenderBoxModelObject.h
Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp
Source/WebCore/rendering/RenderFieldset.cpp
Source/WebCore/rendering/RenderFlexibleBox.cpp
Source/WebCore/rendering/RenderFlowThread.cpp
Source/WebCore/rendering/RenderGeometryMap.h
Source/WebCore/rendering/RenderImageResource.h
Source/WebCore/rendering/RenderInline.cpp
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderLayerFilterInfo.h
Source/WebCore/rendering/RenderListMarker.cpp
Source/WebCore/rendering/RenderMarquee.cpp
Source/WebCore/rendering/RenderMenuList.h
Source/WebCore/rendering/RenderMultiColumnBlock.cpp
Source/WebCore/rendering/RenderMultiColumnSet.cpp
Source/WebCore/rendering/RenderNamedFlowThread.cpp
Source/WebCore/rendering/RenderObject.cpp
Source/WebCore/rendering/RenderObject.h
Source/WebCore/rendering/RenderOverflow.h
Source/WebCore/rendering/RenderRegion.cpp
Source/WebCore/rendering/RenderReplaced.cpp
Source/WebCore/rendering/RenderTable.cpp
Source/WebCore/rendering/RenderTable.h
Source/WebCore/rendering/RenderText.cpp
Source/WebCore/rendering/RenderThemeChromiumCommon.cpp
Source/WebCore/rendering/RenderThemeChromiumCommon.h
Source/WebCore/rendering/RenderTreeAsText.cpp
Source/WebCore/rendering/RenderTreeAsText.h
Source/WebCore/rendering/RenderView.h
Source/WebCore/rendering/style/NinePieceImage.h
Source/WebCore/rendering/style/RenderStyle.h
Source/WebCore/rendering/style/ShadowData.cpp
Source/WebCore/rendering/style/ShadowData.h
Source/WebCore/rendering/style/StyleCachedImageSet.h
Source/WebCore/rendering/style/StyleImage.h
Source/WebCore/rendering/svg/SVGRenderSupport.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/LinkHighlight.cpp

index 03b03b1..709a53f 100644 (file)
@@ -1876,8 +1876,8 @@ SET(WebCore_SOURCES
     platform/graphics/FontFamily.cpp
     platform/graphics/FontFastPath.cpp
     platform/graphics/FontFeatureSettings.cpp
-    platform/graphics/FractionalLayoutBoxExtent.cpp
-    platform/graphics/FractionalLayoutRect.cpp
+    platform/graphics/LayoutBoxExtent.cpp
+    platform/graphics/LayoutRect.cpp
     platform/graphics/GeneratedImage.cpp
     platform/graphics/GeneratorGeneratedImage.cpp
     platform/graphics/GlyphPageTreeNode.cpp
index d8aa171..a95a2fe 100644 (file)
@@ -1,3 +1,153 @@
+2012-11-05  Emil A Eklund  <eae@chromium.org>
+
+        Remove LayoutTypes abstraction
+        https://bugs.webkit.org/show_bug.cgi?id=93050
+
+        Reviewed by Levi Weintraub.
+
+        Remove LayoutTypes abstraction and rename FractionalLayout* to
+        Layout* now that all platforms use the FractionalLayout version
+        (albeit with different fractions).
+
+        No new tests, no change in functionality.
+
+        * CMakeLists.txt:
+        * GNUmakefile.list.am:
+        * Target.pri:
+        * WebCore.exp.in:
+        * WebCore.gypi:
+        * WebCore.vcproj/WebCore.vcproj:
+        * WebCore.xcodeproj/project.pbxproj:
+        * accessibility/AccessibilityNodeObject.cpp:
+        * accessibility/AccessibilityNodeObject.h:
+        * accessibility/AccessibilityObject.h:
+        * accessibility/AccessibilityRenderObject.h:
+        * css/LengthFunctions.cpp:
+        * css/LengthFunctions.h:
+        * dom/Document.h:
+        * dom/DocumentMarkerController.h:
+        * dom/ElementRareData.h:
+        * dom/MouseRelatedEvent.h:
+        * dom/Node.h:
+        * dom/Touch.h:
+        * editing/FrameSelection.cpp:
+        * editing/FrameSelection.h:
+        * editing/RenderedPosition.h:
+        * html/HTMLAreaElement.h:
+        * inspector/InspectorOverlay.h:
+        * inspector/InspectorTimelineAgent.h:
+        * inspector/TimelineRecordFactory.cpp:
+        * inspector/TimelineRecordFactory.h:
+        * loader/cache/CachedImage.h:
+        * page/FocusController.h:
+        * page/FrameView.h:
+        * page/Page.h:
+        * page/SpatialNavigation.cpp:
+        * page/SpatialNavigation.h:
+        * platform/FractionalLayoutUnit.h: Removed.
+        * platform/LayoutUnit.h: Copied from Source/WebCore/platform/FractionalLayoutUnit.h.
+        * platform/Length.h:
+        * platform/PopupMenuClient.h:
+        * platform/animation/AnimationUtilities.h:
+        * platform/graphics/FloatPoint.cpp:
+        * platform/graphics/FloatPoint.h:
+        * platform/graphics/FloatRect.cpp:
+        * platform/graphics/FloatRect.h:
+        * platform/graphics/FloatSize.cpp:
+        * platform/graphics/FloatSize.h:
+        * platform/graphics/FractionalLayoutBoxExtent.cpp: Removed.
+        * platform/graphics/FractionalLayoutBoxExtent.h: Removed.
+        * platform/graphics/FractionalLayoutPoint.h: Removed.
+        * platform/graphics/FractionalLayoutRect.cpp: Removed.
+        * platform/graphics/FractionalLayoutRect.h: Removed.
+        * platform/graphics/FractionalLayoutSize.h: Removed.
+        * platform/graphics/GraphicsLayer.cpp:
+        * platform/graphics/GraphicsLayerAnimation.cpp:
+        * platform/graphics/IntRect.cpp:
+        * platform/graphics/IntRect.h:
+        * platform/graphics/LayoutBoxExtent.cpp: Copied from Source/WebCore/platform/graphics/FractionalLayoutBoxExtent.cpp.
+        * platform/graphics/LayoutBoxExtent.h: Copied from Source/WebCore/platform/graphics/FractionalLayoutBoxExtent.h.
+        * platform/graphics/LayoutPoint.h: Copied from Source/WebCore/platform/graphics/FractionalLayoutPoint.h.
+        * platform/graphics/LayoutRect.cpp: Copied from Source/WebCore/platform/graphics/FractionalLayoutRect.cpp.
+        * platform/graphics/LayoutRect.h: Copied from Source/WebCore/platform/graphics/FractionalLayoutRect.h.
+        * platform/graphics/LayoutSize.h: Copied from Source/WebCore/platform/graphics/FractionalLayoutSize.h.
+        * platform/graphics/MediaPlayer.h:
+        * platform/graphics/filters/CustomFilterOperation.h:
+        * platform/graphics/filters/CustomFilterParameterList.h:
+        * platform/graphics/filters/FilterOperation.h:
+        * platform/graphics/filters/FilterOperations.h:
+        * platform/graphics/filters/ValidatedCustomFilterOperation.cpp:
+        * platform/graphics/filters/ValidatedCustomFilterOperation.h:
+        * platform/graphics/qt/FractionalLayoutPointQt.cpp: Removed.
+        * platform/graphics/qt/FractionalLayoutRectQt.cpp: Removed.
+        * platform/graphics/qt/FractionalLayoutSizeQt.cpp: Removed.
+        * platform/graphics/qt/LayoutPointQt.cpp: Copied from Source/WebCore/platform/graphics/qt/FractionalLayoutPointQt.cpp.
+        * platform/graphics/qt/LayoutRectQt.cpp: Added.
+        * platform/graphics/qt/LayoutSizeQt.cpp: Copied from Source/WebCore/platform/graphics/qt/FractionalLayoutSizeQt.cpp.
+        * platform/graphics/transforms/TransformOperations.h:
+        * platform/graphics/transforms/TransformState.h:
+        * platform/graphics/transforms/TransformationMatrix.cpp:
+        * platform/graphics/transforms/TransformationMatrix.h:
+        * rendering/AutoTableLayout.h:
+        * rendering/ColumnInfo.h:
+        * rendering/ExclusionShapeInsideInfo.h:
+        * rendering/FilterEffectRenderer.h:
+        * rendering/FixedTableLayout.h:
+        * rendering/GapRects.h:
+        * rendering/HitTestResult.h:
+        * rendering/HitTestingTransformState.cpp:
+        * rendering/HitTestingTransformState.h:
+        * rendering/InlineFlowBox.cpp:
+        * rendering/LayoutRepainter.cpp:
+        * rendering/LayoutRepainter.h:
+        * rendering/LayoutState.h:
+        * rendering/LayoutTypes.h:
+        * rendering/LayoutTypesInlineMethods.h:
+        * rendering/PaintInfo.h:
+        * rendering/RenderBlock.cpp:
+        * rendering/RenderBlock.h:
+        * rendering/RenderBlockLineLayout.cpp:
+        * rendering/RenderBox.cpp:
+        * rendering/RenderBox.h:
+        * rendering/RenderBoxModelObject.cpp:
+        * rendering/RenderBoxModelObject.h:
+        * rendering/RenderDeprecatedFlexibleBox.cpp:
+        * rendering/RenderFieldset.cpp:
+        * rendering/RenderFlexibleBox.cpp:
+        * rendering/RenderFlowThread.cpp:
+        * rendering/RenderGeometryMap.h:
+        * rendering/RenderImageResource.h:
+        * rendering/RenderInline.cpp:
+        * rendering/RenderLayer.cpp:
+        * rendering/RenderLayerFilterInfo.h:
+        * rendering/RenderLineBoxList.cpp:
+        * rendering/RenderListMarker.cpp:
+        * rendering/RenderMarquee.cpp:
+        * rendering/RenderMenuList.h:
+        * rendering/RenderMultiColumnBlock.cpp:
+        * rendering/RenderMultiColumnSet.cpp:
+        * rendering/RenderNamedFlowThread.cpp:
+        * rendering/RenderObject.cpp:
+        * rendering/RenderObject.h:
+        * rendering/RenderOverflow.h:
+        * rendering/RenderRegion.cpp:
+        * rendering/RenderReplaced.cpp:
+        * rendering/RenderTable.cpp:
+        * rendering/RenderTable.h:
+        * rendering/RenderText.cpp:
+        * rendering/RenderThemeChromiumCommon.cpp:
+        * rendering/RenderThemeChromiumCommon.h:
+        * rendering/RenderTreeAsText.cpp:
+        * rendering/RenderTreeAsText.h:
+        * rendering/RenderView.h:
+        * rendering/style/NinePieceImage.h:
+        * rendering/style/RenderStyle.h:
+        * rendering/style/ShadowData.cpp:
+        * rendering/style/ShadowData.h:
+        * rendering/style/StyleCachedImageSet.h:
+        * rendering/style/StyleImage.h:
+        * rendering/svg/SVGRenderSupport.h:
+
 2012-11-07  Alexandru Chiculita  <achicu@adobe.com>
 
         CoordinatedGraphicsArgumentCoders should use ValidatedCustomFitlerOperation instead
index f009040..a3ad9d1 100644 (file)
@@ -4278,7 +4278,7 @@ webcore_sources += \
        Source/WebCore/platform/FileSystem.cpp \
        Source/WebCore/platform/FileSystem.h \
        Source/WebCore/platform/FloatConversion.h \
-       Source/WebCore/platform/FractionalLayoutUnit.h \
+       Source/WebCore/platform/LayoutUnit.h \
        Source/WebCore/platform/Gamepads.h \
        Source/WebCore/platform/HashTools.h \
        Source/WebCore/platform/HistogramSupport.cpp \
@@ -4442,12 +4442,12 @@ webcore_sources += \
        Source/WebCore/platform/graphics/FontSmoothingMode.h \
        Source/WebCore/platform/graphics/FontTraitsMask.h \
        Source/WebCore/platform/graphics/FontWidthVariant.h \
-       Source/WebCore/platform/graphics/FractionalLayoutBoxExtent.cpp \
-       Source/WebCore/platform/graphics/FractionalLayoutBoxExtent.h \
-       Source/WebCore/platform/graphics/FractionalLayoutPoint.h \
-       Source/WebCore/platform/graphics/FractionalLayoutRect.cpp \
-       Source/WebCore/platform/graphics/FractionalLayoutRect.h \
-       Source/WebCore/platform/graphics/FractionalLayoutSize.h \
+       Source/WebCore/platform/graphics/LayoutBoxExtent.cpp \
+       Source/WebCore/platform/graphics/LayoutBoxExtent.h \
+       Source/WebCore/platform/graphics/LayoutPoint.h \
+       Source/WebCore/platform/graphics/LayoutRect.cpp \
+       Source/WebCore/platform/graphics/LayoutRect.h \
+       Source/WebCore/platform/graphics/LayoutSize.h \
        Source/WebCore/platform/graphics/GeneratedImage.cpp \
        Source/WebCore/platform/graphics/GeneratedImage.h \
        Source/WebCore/platform/graphics/Generator.h \
@@ -4990,8 +4990,6 @@ webcore_sources += \
        Source/WebCore/rendering/InlineTextBox.h \
        Source/WebCore/rendering/LayoutState.cpp \
        Source/WebCore/rendering/LayoutState.h \
-       Source/WebCore/rendering/LayoutTypes.h \
-       Source/WebCore/rendering/LayoutTypesInlineMethods.h \
        Source/WebCore/rendering/LayoutRepainter.h \
        Source/WebCore/rendering/LayoutRepainter.cpp \
        Source/WebCore/rendering/OverlapTestRequestClient.h \
index 54aed13..9a29cef 100644 (file)
@@ -969,8 +969,8 @@ SOURCES += \
     platform/graphics/Font.cpp \
     platform/graphics/FontCache.cpp \
     platform/graphics/FontFastPath.cpp \
-    platform/graphics/FractionalLayoutBoxExtent.cpp \
-    platform/graphics/FractionalLayoutRect.cpp \
+    platform/graphics/LayoutBoxExtent.cpp \
+    platform/graphics/LayoutRect.cpp \
     platform/graphics/GeneratedImage.cpp \
     platform/graphics/GeneratorGeneratedImage.cpp \
     platform/graphics/GlyphPageTreeNode.cpp \
@@ -2335,7 +2335,6 @@ HEADERS += \
     rendering/InlineFlowBox.h \
     rendering/InlineTextBox.h \
     rendering/LayoutState.h \
-    rendering/LayoutTypes.h \
     rendering/LayoutRepainter.h \
     rendering/mathml/RenderMathMLBlock.h \
     rendering/mathml/RenderMathMLFenced.h \
@@ -2782,9 +2781,9 @@ SOURCES += \
     platform/graphics/qt/FloatPointQt.cpp \
     platform/graphics/qt/FloatRectQt.cpp \
     platform/graphics/qt/FloatSizeQt.cpp \
-    platform/graphics/qt/FractionalLayoutPointQt.cpp \
-    platform/graphics/qt/FractionalLayoutRectQt.cpp \
-    platform/graphics/qt/FractionalLayoutSizeQt.cpp \
+    platform/graphics/qt/LayoutPointQt.cpp \
+    platform/graphics/qt/LayoutRectQt.cpp \
+    platform/graphics/qt/LayoutSizeQt.cpp \
     platform/graphics/qt/GradientQt.cpp \
     platform/graphics/qt/GraphicsContextQt.cpp \
     platform/graphics/qt/IconQt.cpp \
index 1834069..e3b1d35 100644 (file)
@@ -147,7 +147,6 @@ __ZN7WebCore11MemoryCache13setCapacitiesEjjj
 __ZN7WebCore11MemoryCache14evictResourcesEv
 __ZN7WebCore11MemoryCache19getOriginsWithCacheERN3WTF7HashSetINS1_6RefPtrINS_14SecurityOriginEEENS_18SecurityOriginHashENS1_10HashTraitsIS5_EEEE
 __ZN7WebCore11MemoryCache25removeResourcesWithOriginEPNS_14SecurityOriginE
-__ZN7WebCore11RenderLayer19scrollRectToVisibleERKNS_20FractionalLayoutRectERKNS_15ScrollAlignmentES6_
 __ZN7WebCore11URLWithDataEP6NSDataP5NSURL
 __ZN7WebCore11memoryCacheEv
 __ZN7WebCore11startOfWordERKNS_15VisiblePositionENS_9EWordSideE
@@ -159,7 +158,7 @@ __ZN7WebCore12EventHandler14scrollOverflowENS_15ScrollDirectionENS_17ScrollGranu
 __ZN7WebCore12EventHandler15handleAccessKeyERKNS_21PlatformKeyboardEventE
 __ZN7WebCore12EventHandler16handleWheelEventERKNS_18PlatformWheelEventE
 __ZN7WebCore12EventHandler17scrollRecursivelyENS_15ScrollDirectionENS_17ScrollGranularityEPNS_4NodeE
-__ZN7WebCore12EventHandler20hitTestResultAtPointERKNS_21FractionalLayoutPointEbbNS_17HitTestScrollbarsEjRKNS_20FractionalLayoutSizeE
+__ZN7WebCore12EventHandler20hitTestResultAtPointERKNS_11LayoutPointEbbNS_17HitTestScrollbarsEjRKNS_10LayoutSizeE
 __ZN7WebCore12EventHandler21handleMousePressEventERKNS_18PlatformMouseEventE
 __ZN7WebCore12EventHandler23handleMouseReleaseEventERKNS_18PlatformMouseEventE
 __ZN7WebCore12EventHandler24logicalScrollRecursivelyENS_22ScrollLogicalDirectionENS_17ScrollGranularityEPNS_4NodeE
@@ -185,8 +184,7 @@ __ZN7WebCore12PrintContext9spoolPageERNS_15GraphicsContextEif
 __ZN7WebCore12PrintContext9spoolRectERNS_15GraphicsContextERKNS_7IntRectE
 __ZN7WebCore12PrintContextC1EPNS_5FrameE
 __ZN7WebCore12PrintContextD1Ev
-__ZNK7WebCore12RenderObject16repaintRectangleERKNS_20FractionalLayoutRectEb
-__ZN7WebCore12RenderObject19scrollRectToVisibleERKNS_20FractionalLayoutRectERKNS_15ScrollAlignmentES6_
+__ZN7WebCore12RenderObject19scrollRectToVisibleERKNS_10LayoutRectERKNS_15ScrollAlignmentES6_
 __ZN7WebCore12SharedBuffer10wrapCFDataEPK8__CFData
 __ZN7WebCore12SharedBuffer10wrapNSDataEP6NSData
 __ZN7WebCore12SharedBuffer12createNSDataEv
@@ -466,7 +464,6 @@ __ZN7WebCore16VisibleSelectionC1ERKNS_15VisiblePositionEb
 __ZN7WebCore16createFullMarkupEPKNS_4NodeE
 __ZN7WebCore16createFullMarkupEPKNS_5RangeE
 __ZN7WebCore16deleteAllCookiesEv
-__ZN7WebCore16enclosingIntRectERKNS_20FractionalLayoutRectE
 __ZN7WebCore16enclosingIntRectERKNS_9FloatRectE
 __ZN7WebCore16isEndOfParagraphERKNS_15VisiblePositionENS_27EditingBoundaryCrossingRuleE
 __ZN7WebCore16isUserVisibleURLEP8NSString
@@ -862,7 +859,6 @@ __ZN7WebCore7Element9setPseudoERKN3WTF12AtomicStringE
 __ZN7WebCore7IntRect5scaleEf
 __ZN7WebCore7IntRect5uniteERKS0_
 __ZN7WebCore7IntRect9intersectERKS0_
-__ZN7WebCore7IntRectC1ERKNS_20FractionalLayoutRectE
 __ZN7WebCore7IntRectC1ERKNS_9FloatRectE
 __ZN7WebCore7IntSizeC1ERK6CGSize
 __ZN7WebCore7RunLoop14runForDurationEd
@@ -1002,9 +998,7 @@ __ZN7WebCore8toStringERKN3WTF6VectorINS_11ProxyServerELm0EEE
 __ZN7WebCore9DOMWindow30dispatchAllPendingUnloadEventsEv
 __ZN7WebCore9DOMWindow36dispatchAllPendingBeforeUnloadEventsEv
 __ZN7WebCore9FloatRectC1ERK6CGRect
-__ZN7WebCore9FloatRectC1ERKNS_20FractionalLayoutRectE
 __ZN7WebCore9FloatRectC1ERKNS_7IntRectE
-__ZN7WebCore9FloatSizeC1ERKNS_20FractionalLayoutSizeE
 __ZN7WebCore9FloatSizeC1ERKNS_7IntSizeE
 __ZN7WebCore9FontCache13fontDataCountEv
 __ZN7WebCore9FontCache21inactiveFontDataCountEv
@@ -1186,6 +1180,7 @@ __ZNK7WebCore11RenderStyle4fontEv
 __ZNK7WebCore11ScriptValue9getStringEPN3JSC9ExecStateERN3WTF6StringE
 __ZNK7WebCore12RenderObject14enclosingLayerEv
 __ZNK7WebCore12RenderObject15localToAbsoluteERKNS_10FloatPointEj
+__ZNK7WebCore12RenderObject16repaintRectangleERKNS_10LayoutRectEb
 __ZNK7WebCore12RenderObject20localToContainerQuadERKNS_9FloatQuadEPNS_22RenderLayerModelObjectEjPb
 __ZNK7WebCore12RenderObject23absoluteBoundingBoxRectEb
 __ZNK7WebCore12RenderObject39pixelSnappedAbsoluteClippedOverflowRectEv
index a29c86a..4e006e8 100644 (file)
             'platform/graphics/FontSmoothingMode.h',
             'platform/graphics/FontTraitsMask.h',
             'platform/graphics/FontWidthVariant.h',
-            'platform/graphics/FractionalLayoutRect.h',
-            'platform/graphics/FractionalLayoutSize.h',
+            'platform/graphics/LayoutRect.h',
+            'platform/graphics/LayoutSize.h',
             'platform/graphics/Generator.h',
             'platform/graphics/Glyph.h',
             'platform/graphics/GlyphBuffer.h',
             'rendering/InlineFlowBox.h',
             'rendering/InlineTextBox.h',
             'rendering/LayoutState.h',
-            'rendering/LayoutTypes.h',
-            'rendering/LayoutTypesInlineMethods.h',
             'rendering/LayoutRepainter.h',
             'rendering/OverlapTestRequestClient.h',
             'rendering/Pagination.h',
             'platform/graphics/FontFastPath.cpp',
             'platform/graphics/FontPlatformData.cpp',
             'platform/graphics/FontPlatformData.h',
-            'platform/graphics/FractionalLayoutBoxExtent.cpp',
+            'platform/graphics/LayoutBoxExtent.cpp',
             'platform/graphics/GeneratorGeneratedImage.cpp',
             'platform/graphics/GeneratedImage.cpp',
             'platform/graphics/GeneratedImage.h',
             'platform/graphics/FloatRect.cpp',
             'platform/graphics/FloatSize.cpp',
             'platform/graphics/IntRect.cpp',
-            'platform/graphics/FractionalLayoutRect.cpp',
+            'platform/graphics/LayoutRect.cpp',
             'platform/graphics/Region.cpp',
             'platform/graphics/transforms/TransformationMatrix.cpp',
             'platform/graphics/transforms/AffineTransform.cpp',
index f68f9b0..4c966fe 100755 (executable)
                                >
                        </File>
                        <File
-                               RelativePath="..\platform\FractionalLayoutUnit.h"
+                               RelativePath="..\platform\LayoutUnit.h"
                                >
                        </File>
                        <File
                                        >
                                </File>
                                <File
-                                       RelativePath="..\platform\graphics\FractionalLayoutBoxExtent.h"
+                                       RelativePath="..\platform\graphics\LayoutBoxExtent.h"
                                        >
                                </File>
                                <File
-                                       RelativePath="..\platform\graphics\FractionalLayoutBoxExtent.cpp"
+                                       RelativePath="..\platform\graphics\LayoutBoxExtent.cpp"
                                        >
                                </File>
                                <File
-                                       RelativePath="..\platform\graphics\FractionalLayoutPoint.h"
+                                       RelativePath="..\platform\graphics\LayoutPoint.h"
                                        >
                                </File>
                                <File
-                                       RelativePath="..\platform\graphics\FractionalLayoutRect.cpp"
+                                       RelativePath="..\platform\graphics\LayoutRect.cpp"
                                        >
                                </File>
                                <File
-                                       RelativePath="..\platform\graphics\FractionalLayoutRect.h"
+                                       RelativePath="..\platform\graphics\LayoutRect.h"
                                        >
                                </File>
                                <File
-                                       RelativePath="..\platform\graphics\FractionalLayoutSize.h"
+                                       RelativePath="..\platform\graphics\LayoutSize.h"
                                        >
                                </File>
                                <File
                                >
                        </File>
                        <File
-                               RelativePath="..\rendering\LayoutTypes.h"
-                               >
-                       </File>
-                       <File
                                RelativePath="..\rendering\PaintInfo.h"
                                >
                        </File>
index 7ebb265..f4423f5 100644 (file)
                14115B7209F84CD600CA4FC1 /* JSNodeFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14115B7009F84CD600CA4FC1 /* JSNodeFilter.cpp */; };
                14115B7309F84CD600CA4FC1 /* JSNodeFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 14115B7109F84CD600CA4FC1 /* JSNodeFilter.h */; };
                1419D2C50CEA6F6100FF507A /* TreeShared.h in Headers */ = {isa = PBXBuildFile; fileRef = 1419D2C40CEA6F6100FF507A /* TreeShared.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               141DC0481648348F00371E5A /* LayoutUnit.h in Headers */ = {isa = PBXBuildFile; fileRef = 141DC0471648348F00371E5A /* LayoutUnit.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               141DC04F164834B900371E5A /* LayoutBoxExtent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 141DC049164834B900371E5A /* LayoutBoxExtent.cpp */; };
+               141DC050164834B900371E5A /* LayoutBoxExtent.h in Headers */ = {isa = PBXBuildFile; fileRef = 141DC04A164834B900371E5A /* LayoutBoxExtent.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               141DC051164834B900371E5A /* LayoutPoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 141DC04B164834B900371E5A /* LayoutPoint.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               141DC052164834B900371E5A /* LayoutRect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 141DC04C164834B900371E5A /* LayoutRect.cpp */; };
+               141DC053164834B900371E5A /* LayoutRect.h in Headers */ = {isa = PBXBuildFile; fileRef = 141DC04D164834B900371E5A /* LayoutRect.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               141DC054164834B900371E5A /* LayoutSize.h in Headers */ = {isa = PBXBuildFile; fileRef = 141DC04E164834B900371E5A /* LayoutSize.h */; settings = {ATTRIBUTES = (Private, ); }; };
                142011B60A003133008303F9 /* JSCSSStyleDeclaration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 142011B40A003133008303F9 /* JSCSSStyleDeclaration.cpp */; };
                142011B70A003133008303F9 /* JSCSSStyleDeclaration.h in Headers */ = {isa = PBXBuildFile; fileRef = 142011B50A003133008303F9 /* JSCSSStyleDeclaration.h */; settings = {ATTRIBUTES = (Private, ); }; };
                142B97C913138943008BEF4B /* TextControlInnerElements.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 142B97C713138943008BEF4B /* TextControlInnerElements.cpp */; };
                14476AA815DC4BB100305DB2 /* WritingMode.h in Headers */ = {isa = PBXBuildFile; fileRef = 14476AA715DC4BB100305DB2 /* WritingMode.h */; settings = {ATTRIBUTES = (Private, ); }; };
                1449E24C107D4A8400B5793F /* JSCallbackData.h in Headers */ = {isa = PBXBuildFile; fileRef = 1449E24A107D4A8400B5793F /* JSCallbackData.h */; };
                1449E287107D4DB400B5793F /* JSCallbackData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1449E286107D4DB400B5793F /* JSCallbackData.cpp */; };
-               144FCE5214EC79BC000D17A3 /* FractionalLayoutUnit.h in Headers */ = {isa = PBXBuildFile; fileRef = 144FCE5114EC79BC000D17A3 /* FractionalLayoutUnit.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               144FCE5D14EC79E7000D17A3 /* FractionalLayoutSize.h in Headers */ = {isa = PBXBuildFile; fileRef = 144FCE5814EC79E7000D17A3 /* FractionalLayoutSize.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               144FCFE014EF2509000D17A3 /* FractionalLayoutRect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 144FCFDE14EF2509000D17A3 /* FractionalLayoutRect.cpp */; };
-               144FCFE114EF2509000D17A3 /* FractionalLayoutRect.h in Headers */ = {isa = PBXBuildFile; fileRef = 144FCFDF14EF2509000D17A3 /* FractionalLayoutRect.h */; settings = {ATTRIBUTES = (Private, ); }; };
                1464E06C135EC10600FDB00A /* JSMediaListCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1464E06B135EC10600FDB00A /* JSMediaListCustom.cpp */; };
                146CC115156988E400109E37 /* LengthBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 146CC113156988BD00109E37 /* LengthBox.cpp */; };
                1477E7760BF4134A00152872 /* PageCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1477E7740BF4134A00152872 /* PageCache.cpp */; };
                1479FAF2109AE37500DED655 /* RenderRubyRun.h in Headers */ = {isa = PBXBuildFile; fileRef = 1479FAEA109AE37500DED655 /* RenderRubyRun.h */; };
                1479FAF3109AE37500DED655 /* RenderRubyText.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1479FAEB109AE37500DED655 /* RenderRubyText.cpp */; };
                1479FAF4109AE37500DED655 /* RenderRubyText.h in Headers */ = {isa = PBXBuildFile; fileRef = 1479FAEC109AE37500DED655 /* RenderRubyText.h */; };
-               1482E0C6156C36DE00965065 /* FractionalLayoutBoxExtent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1482E0C4156C36DE00965065 /* FractionalLayoutBoxExtent.cpp */; };
-               1482E0C7156C36DE00965065 /* FractionalLayoutBoxExtent.h in Headers */ = {isa = PBXBuildFile; fileRef = 1482E0C5156C36DE00965065 /* FractionalLayoutBoxExtent.h */; settings = {ATTRIBUTES = (Private, ); }; };
                148AFDA50AF58360008CC700 /* ExceptionHandlers.h in Headers */ = {isa = PBXBuildFile; fileRef = 148AFDA30AF58360008CC700 /* ExceptionHandlers.h */; settings = {ATTRIBUTES = (Private, ); }; };
                148AFDA60AF58360008CC700 /* ExceptionHandlers.mm in Sources */ = {isa = PBXBuildFile; fileRef = 148AFDA40AF58360008CC700 /* ExceptionHandlers.mm */; };
                14947FFD12F80CD200A0F631 /* DocumentOrderedMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14947FFB12F80CD200A0F631 /* DocumentOrderedMap.cpp */; };
                319E69B513299BBD004AC91A /* WebKitAnimationList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 319E69AF13299BBD004AC91A /* WebKitAnimationList.cpp */; };
                319E69B613299BBD004AC91A /* WebKitAnimationList.h in Headers */ = {isa = PBXBuildFile; fileRef = 319E69B013299BBD004AC91A /* WebKitAnimationList.h */; };
                319FBD5F15D2F464009640A6 /* CachedImageClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 319FBD5D15D2F444009640A6 /* CachedImageClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               31B801BB15EC58C700CE643D /* LayoutTypesInlineMethods.h in Headers */ = {isa = PBXBuildFile; fileRef = 84894CA815EC489700A40481 /* LayoutTypesInlineMethods.h */; settings = {ATTRIBUTES = (Private, ); }; };
                31C0FF210E4CEB6E007D6FE5 /* WebKitAnimationEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31C0FF1B0E4CEB6E007D6FE5 /* WebKitAnimationEvent.cpp */; };
                31C0FF220E4CEB6E007D6FE5 /* WebKitAnimationEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 31C0FF1C0E4CEB6E007D6FE5 /* WebKitAnimationEvent.h */; };
                31C0FF240E4CEB6E007D6FE5 /* WebKitTransitionEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31C0FF1E0E4CEB6E007D6FE5 /* WebKitTransitionEvent.cpp */; };
                B8DBDB4C130B0F8A00F5CDB1 /* SetSelectionCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = B8DBDB48130B0F8A00F5CDB1 /* SetSelectionCommand.h */; };
                B8DBDB4D130B0F8A00F5CDB1 /* SpellingCorrectionCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B8DBDB49130B0F8A00F5CDB1 /* SpellingCorrectionCommand.cpp */; };
                B8DBDB4E130B0F8A00F5CDB1 /* SpellingCorrectionCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = B8DBDB4A130B0F8A00F5CDB1 /* SpellingCorrectionCommand.h */; };
-               BAB1C06A14FC3679004233FC /* FractionalLayoutPoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 144FCE5414EC79E7000D17A3 /* FractionalLayoutPoint.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               BACF290113B2A0D500781F90 /* LayoutTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = BACF290013B2A0D500781F90 /* LayoutTypes.h */; settings = {ATTRIBUTES = (Private, ); }; };
                BC00F0040E0A185500FD04E3 /* DOMFile.h in Headers */ = {isa = PBXBuildFile; fileRef = BC00EFFE0E0A185500FD04E3 /* DOMFile.h */; };
                BC00F0050E0A185500FD04E3 /* DOMFile.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC00EFFF0E0A185500FD04E3 /* DOMFile.mm */; };
                BC00F0060E0A185500FD04E3 /* DOMFileInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = BC00F0000E0A185500FD04E3 /* DOMFileInternal.h */; };
                1419D2C40CEA6F6100FF507A /* TreeShared.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TreeShared.h; sourceTree = "<group>"; };
                141B94E509EC4223000E9413 /* MouseEvent.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = MouseEvent.idl; sourceTree = "<group>"; };
                141B94EE09EC425A000E9413 /* UIEvent.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = UIEvent.idl; sourceTree = "<group>"; };
+               141DC0471648348F00371E5A /* LayoutUnit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayoutUnit.h; sourceTree = "<group>"; };
+               141DC049164834B900371E5A /* LayoutBoxExtent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LayoutBoxExtent.cpp; sourceTree = "<group>"; };
+               141DC04A164834B900371E5A /* LayoutBoxExtent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayoutBoxExtent.h; sourceTree = "<group>"; };
+               141DC04B164834B900371E5A /* LayoutPoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayoutPoint.h; sourceTree = "<group>"; };
+               141DC04C164834B900371E5A /* LayoutRect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LayoutRect.cpp; sourceTree = "<group>"; };
+               141DC04D164834B900371E5A /* LayoutRect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayoutRect.h; sourceTree = "<group>"; };
+               141DC04E164834B900371E5A /* LayoutSize.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayoutSize.h; sourceTree = "<group>"; };
                142011AE0A003117008303F9 /* CSSStyleDeclaration.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CSSStyleDeclaration.idl; sourceTree = "<group>"; };
                142011B40A003133008303F9 /* JSCSSStyleDeclaration.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSCSSStyleDeclaration.cpp; sourceTree = "<group>"; };
                142011B50A003133008303F9 /* JSCSSStyleDeclaration.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSCSSStyleDeclaration.h; sourceTree = "<group>"; };
                14476AA715DC4BB100305DB2 /* WritingMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WritingMode.h; sourceTree = "<group>"; };
                1449E24A107D4A8400B5793F /* JSCallbackData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCallbackData.h; sourceTree = "<group>"; };
                1449E286107D4DB400B5793F /* JSCallbackData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCallbackData.cpp; sourceTree = "<group>"; };
-               144FCE5114EC79BC000D17A3 /* FractionalLayoutUnit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FractionalLayoutUnit.h; sourceTree = "<group>"; };
-               144FCE5414EC79E7000D17A3 /* FractionalLayoutPoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FractionalLayoutPoint.h; sourceTree = "<group>"; };
-               144FCE5814EC79E7000D17A3 /* FractionalLayoutSize.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FractionalLayoutSize.h; sourceTree = "<group>"; };
-               144FCFDE14EF2509000D17A3 /* FractionalLayoutRect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FractionalLayoutRect.cpp; sourceTree = "<group>"; };
-               144FCFDF14EF2509000D17A3 /* FractionalLayoutRect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FractionalLayoutRect.h; sourceTree = "<group>"; };
                1464E06B135EC10600FDB00A /* JSMediaListCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaListCustom.cpp; sourceTree = "<group>"; };
                146CC113156988BD00109E37 /* LengthBox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LengthBox.cpp; sourceTree = "<group>"; };
                1477E7740BF4134A00152872 /* PageCache.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PageCache.cpp; sourceTree = "<group>"; };
                1479FAEB109AE37500DED655 /* RenderRubyText.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderRubyText.cpp; sourceTree = "<group>"; };
                1479FAEC109AE37500DED655 /* RenderRubyText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderRubyText.h; sourceTree = "<group>"; };
                14813BF309EDF88E00F757E1 /* IDLParser.pm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.perl; name = IDLParser.pm; path = scripts/IDLParser.pm; sourceTree = "<group>"; };
-               1482E0C4156C36DE00965065 /* FractionalLayoutBoxExtent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FractionalLayoutBoxExtent.cpp; sourceTree = "<group>"; };
-               1482E0C5156C36DE00965065 /* FractionalLayoutBoxExtent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FractionalLayoutBoxExtent.h; sourceTree = "<group>"; };
                148AFDA30AF58360008CC700 /* ExceptionHandlers.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ExceptionHandlers.h; sourceTree = "<group>"; };
                148AFDA40AF58360008CC700 /* ExceptionHandlers.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = ExceptionHandlers.mm; sourceTree = "<group>"; };
                14947FFB12F80CD200A0F631 /* DocumentOrderedMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DocumentOrderedMap.cpp; sourceTree = "<group>"; };
                848522871190173C006EDC7F /* SVGVKernElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGVKernElement.cpp; sourceTree = "<group>"; };
                848522881190173C006EDC7F /* SVGVKernElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGVKernElement.h; sourceTree = "<group>"; };
                848522891190173C006EDC7F /* SVGVKernElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SVGVKernElement.idl; sourceTree = "<group>"; };
-               84894CA815EC489700A40481 /* LayoutTypesInlineMethods.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayoutTypesInlineMethods.h; sourceTree = "<group>"; };
                849F77750EFEC6200090849D /* StrokeStyleApplier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StrokeStyleApplier.h; sourceTree = "<group>"; };
                84A81F3B0FC7DFF000955300 /* SourceAlpha.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SourceAlpha.cpp; path = filters/SourceAlpha.cpp; sourceTree = "<group>"; };
                84A81F3C0FC7DFF000955300 /* SourceAlpha.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SourceAlpha.h; path = filters/SourceAlpha.h; sourceTree = "<group>"; };
                B8DBDB48130B0F8A00F5CDB1 /* SetSelectionCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SetSelectionCommand.h; sourceTree = "<group>"; };
                B8DBDB49130B0F8A00F5CDB1 /* SpellingCorrectionCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpellingCorrectionCommand.cpp; sourceTree = "<group>"; };
                B8DBDB4A130B0F8A00F5CDB1 /* SpellingCorrectionCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpellingCorrectionCommand.h; sourceTree = "<group>"; };
-               BACF290013B2A0D500781F90 /* LayoutTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayoutTypes.h; sourceTree = "<group>"; };
                BC00EFFE0E0A185500FD04E3 /* DOMFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMFile.h; sourceTree = "<group>"; };
                BC00EFFF0E0A185500FD04E3 /* DOMFile.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMFile.mm; sourceTree = "<group>"; };
                BC00F0000E0A185500FD04E3 /* DOMFileInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMFileInternal.h; sourceTree = "<group>"; };
                                37202198106213C600F25C4B /* FontSmoothingMode.h */,
                                3784C34A0E11AA34007D8D48 /* FontTraitsMask.h */,
                                BCE4413512F7490B009B84B8 /* FontWidthVariant.h */,
-                               1482E0C4156C36DE00965065 /* FractionalLayoutBoxExtent.cpp */,
-                               1482E0C5156C36DE00965065 /* FractionalLayoutBoxExtent.h */,
-                               144FCE5414EC79E7000D17A3 /* FractionalLayoutPoint.h */,
-                               144FCFDE14EF2509000D17A3 /* FractionalLayoutRect.cpp */,
-                               144FCFDF14EF2509000D17A3 /* FractionalLayoutRect.h */,
-                               144FCE5814EC79E7000D17A3 /* FractionalLayoutSize.h */,
+                               141DC049164834B900371E5A /* LayoutBoxExtent.cpp */,
+                               141DC04A164834B900371E5A /* LayoutBoxExtent.h */,
+                               141DC04B164834B900371E5A /* LayoutPoint.h */,
+                               141DC04C164834B900371E5A /* LayoutRect.cpp */,
+                               141DC04D164834B900371E5A /* LayoutRect.h */,
+                               141DC04E164834B900371E5A /* LayoutSize.h */,
                                4FB390AC15EF61F3007AD51F /* GeneratedImage.cpp */,
                                BC23F0DA0DAFF4A4009FDC91 /* GeneratedImage.h */,
                                BCE04C890DAFF7A0007A0F41 /* Generator.h */,
                                C57FEDE01212EE9C0097BE65 /* FileSystem.cpp */,
                                514B3F720C722047000530DF /* FileSystem.h */,
                                BC073BA90C399B1F000F5979 /* FloatConversion.h */,
-                               144FCE5114EC79BC000D17A3 /* FractionalLayoutUnit.h */,
+                               141DC0471648348F00371E5A /* LayoutUnit.h */,
                                A8748BDF12CBF2DC001FBA41 /* HashTools.h */,
                                D6FDAEF2149C06190037B1E1 /* HistogramSupport.cpp */,
                                D630E2AB149BF344005B2F93 /* HistogramSupport.h */,
                                A120ACA013F9983700FE4AC7 /* LayoutRepainter.h */,
                                2D9066040BE141D400956998 /* LayoutState.cpp */,
                                2D9066050BE141D400956998 /* LayoutState.h */,
-                               BACF290013B2A0D500781F90 /* LayoutTypes.h */,
-                               84894CA815EC489700A40481 /* LayoutTypesInlineMethods.h */,
                                3774ABA30FA21EB400AD7DE9 /* OverlapTestRequestClient.h */,
                                9377AB9F15DEFEEF0031FD04 /* Pagination.h */,
                                0885067D11DA045B00182B98 /* PaintInfo.h */,
                                656D373A0ADBA5DE00A4554D /* FormState.h in Headers */,
                                41885B9311B6FDA6003383BB /* FormSubmission.h in Headers */,
                                935C476D09AC4D6300A6AAB4 /* FoundationExtras.h in Headers */,
-                               1482E0C7156C36DE00965065 /* FractionalLayoutBoxExtent.h in Headers */,
-                               BAB1C06A14FC3679004233FC /* FractionalLayoutPoint.h in Headers */,
-                               144FCFE114EF2509000D17A3 /* FractionalLayoutRect.h in Headers */,
-                               144FCE5D14EC79E7000D17A3 /* FractionalLayoutSize.h in Headers */,
-                               144FCE5214EC79BC000D17A3 /* FractionalLayoutUnit.h in Headers */,
                                A853123D11D0471B00D4D077 /* FragmentScriptingPermission.h in Headers */,
                                65BF022F0974816300C43196 /* Frame.h in Headers */,
                                A7B070D3130A409C00A3763C /* FrameActionScheduler.h in Headers */,
                                A12538D413F9B60A00024754 /* LayoutRepainter.h in Headers */,
                                2D9066070BE141D400956998 /* LayoutState.h in Headers */,
                                D630E2AC149BF344005B2F93 /* LayoutTestSupport.h in Headers */,
-                               BACF290113B2A0D500781F90 /* LayoutTypes.h in Headers */,
-                               31B801BB15EC58C700CE643D /* LayoutTypesInlineMethods.h in Headers */,
+                               141DC0481648348F00371E5A /* LayoutUnit.h in Headers */,
+                               141DC050164834B900371E5A /* LayoutBoxExtent.h in Headers */,
+                               141DC051164834B900371E5A /* LayoutPoint.h in Headers */,
+                               141DC053164834B900371E5A /* LayoutRect.h in Headers */,
+                               141DC054164834B900371E5A /* LayoutSize.h in Headers */,
                                512DD8F50D91E6AF000F89EE /* LegacyWebArchive.h in Headers */,
                                BCE65BEB0EACDF16007E4533 /* Length.h in Headers */,
                                BCFF64910EAD15C200C1D6F7 /* LengthBox.h in Headers */,
                                514C764F0CE9234E007EF3CD /* FormDataStreamMac.mm in Sources */,
                                656D373B0ADBA5DE00A4554D /* FormState.cpp in Sources */,
                                41885B9411B6FDA6003383BB /* FormSubmission.cpp in Sources */,
-                               1482E0C6156C36DE00965065 /* FractionalLayoutBoxExtent.cpp in Sources */,
-                               144FCFE014EF2509000D17A3 /* FractionalLayoutRect.cpp in Sources */,
                                65BF022E0974816300C43196 /* Frame.cpp in Sources */,
                                A7B070D2130A409C00A3763C /* FrameActionScheduler.cpp in Sources */,
                                974A862214B7ADBB003FDC76 /* FrameDestructionObserver.cpp in Sources */,
                                9352084509BD43B900F2038D /* Language.mm in Sources */,
                                2917B5611473496C0052C9D0 /* LayerFlushScheduler.cpp in Sources */,
                                2917B566147349950052C9D0 /* LayerFlushSchedulerMac.cpp in Sources */,
+                               141DC04F164834B900371E5A /* LayoutBoxExtent.cpp in Sources */,
+                               141DC052164834B900371E5A /* LayoutRect.cpp in Sources */,
                                A120ACA413F998CA00FE4AC7 /* LayoutRepainter.cpp in Sources */,
                                2D9066060BE141D400956998 /* LayoutState.cpp in Sources */,
                                D6FDAEF3149C06190037B1E5 /* LayoutTestSupport.cpp in Sources */,
index 1055fa3..9cc52c5 100644 (file)
@@ -234,7 +234,7 @@ LayoutRect AccessibilityNodeObject::boundingBoxRect() const
     for (AccessibilityObject* positionProvider = parentObject(); positionProvider; positionProvider = positionProvider->parentObject()) {
         if (positionProvider->isAccessibilityRenderObject()) {
             LayoutRect parentRect = positionProvider->elementRect();
-            boundingBox.setSize(LayoutSize(parentRect.width(), FractionalLayoutUnit(std::min(10.0f, parentRect.height().toFloat()))));
+            boundingBox.setSize(LayoutSize(parentRect.width(), LayoutUnit(std::min(10.0f, parentRect.height().toFloat()))));
             boundingBox.setLocation(parentRect.location());
             break;
         }
index 721639c..cd0b3d8 100644 (file)
@@ -30,7 +30,7 @@
 #define AccessibilityNodeObject_h
 
 #include "AccessibilityObject.h"
-#include "LayoutTypes.h"
+#include "LayoutRect.h"
 #include <wtf/Forward.h>
 
 namespace WebCore {
index 399001f..7d3b660 100644 (file)
@@ -31,8 +31,7 @@
 #define AccessibilityObject_h
 
 #include "FloatQuad.h"
-#include "FractionalLayoutRect.h"
-#include "LayoutTypes.h"
+#include "LayoutRect.h"
 #include "TextIterator.h"
 #include "VisiblePosition.h"
 #include "VisibleSelection.h"
index 914b94a..9402e47 100644 (file)
@@ -30,7 +30,7 @@
 #define AccessibilityRenderObject_h
 
 #include "AccessibilityNodeObject.h"
-#include "LayoutTypes.h"
+#include "LayoutRect.h"
 #include <wtf/Forward.h>
 
 namespace WebCore {
index 9772e5e..a23ffcc 100644 (file)
@@ -24,7 +24,7 @@
 #include "config.h"
 #include "LengthFunctions.h"
 
-#include "LayoutTypes.h"
+#include "LayoutUnit.h"
 #include "Length.h"
 #include "RenderView.h"
 
@@ -55,20 +55,20 @@ LayoutUnit minimumValueForLength(const Length& length, LayoutUnit maximumValue,
     case ViewportPercentageWidth:
         if (renderView)
             return static_cast<LayoutUnit>(renderView->viewportSize().width() * length.viewportPercentageLength() / 100.0f);
-        return ZERO_LAYOUT_UNIT;
+        return 0;
     case ViewportPercentageHeight:
         if (renderView)
             return static_cast<LayoutUnit>(renderView->viewportSize().height() * length.viewportPercentageLength() / 100.0f);
-        return ZERO_LAYOUT_UNIT;
+        return 0;
     case ViewportPercentageMin:
         if (renderView) {
             IntSize viewportSize = renderView->viewportSize();
             return static_cast<LayoutUnit>(std::min(viewportSize.width(), viewportSize.height()) * length.viewportPercentageLength() / 100.0f);
         }
-        return ZERO_LAYOUT_UNIT;
+        return 0;
     case FillAvailable:
     case Auto:
-        return ZERO_LAYOUT_UNIT;
+        return 0;
     case Relative:
     case Intrinsic:
     case MinIntrinsic:
@@ -77,10 +77,10 @@ LayoutUnit minimumValueForLength(const Length& length, LayoutUnit maximumValue,
     case FitContent:
     case Undefined:
         ASSERT_NOT_REACHED();
-        return ZERO_LAYOUT_UNIT;
+        return 0;
     }
     ASSERT_NOT_REACHED();
-    return ZERO_LAYOUT_UNIT;
+    return 0;
 }
 
 LayoutUnit valueForLength(const Length& length, LayoutUnit maximumValue, RenderView* renderView, bool roundPercentages)
@@ -104,10 +104,10 @@ LayoutUnit valueForLength(const Length& length, LayoutUnit maximumValue, RenderV
     case FitContent:
     case Undefined:
         ASSERT_NOT_REACHED();
-        return ZERO_LAYOUT_UNIT;
+        return 0;
     }
     ASSERT_NOT_REACHED();
-    return ZERO_LAYOUT_UNIT;
+    return 0;
 }
 
 // FIXME: when subpixel layout is supported this copy of floatValueForLength() can be removed. See bug 71143.
index 76c28ca..9fcf2ef 100644 (file)
 #ifndef LengthFunctions_h
 #define LengthFunctions_h
 
-#include "LayoutTypes.h"
-
 namespace WebCore {
 
+class LayoutUnit;
 class RenderView;
 struct Length;
 
index 2f8707b..2e4e073 100644 (file)
@@ -37,7 +37,6 @@
 #include "IconURL.h"
 #include "InspectorCounters.h"
 #include "IntRect.h"
-#include "LayoutTypes.h"
 #include "MutationObserver.h"
 #include "PageVisibilityState.h"
 #include "PlatformScreen.h"
@@ -106,6 +105,8 @@ class HTMLNameCollection;
 class HitTestRequest;
 class HitTestResult;
 class IntPoint;
+class LayoutPoint;
+class LayoutRect;
 class DOMWrapperWorld;
 class JSNode;
 class Locale;
index d9ad012..a9449c0 100644 (file)
 
 #include "DocumentMarker.h"
 #include "IntRect.h"
-#include "LayoutTypes.h"
 #include <wtf/HashMap.h>
 #include <wtf/Vector.h>
 
 namespace WebCore {
 
+class LayoutPoint;
+class LayoutRect;
 class Node;
 class Range;
 class RenderedDocumentMarker;
index 4b19cd4..af135f0 100644 (file)
@@ -125,7 +125,7 @@ public:
 
 inline IntSize defaultMinimumSizeForResizing()
 {
-    return IntSize(MAX_LAYOUT_UNIT, MAX_LAYOUT_UNIT);
+    return IntSize(LayoutUnit::max(), LayoutUnit::max());
 }
 
 inline ElementRareData::ElementRareData()
index 249b833..a2de9a4 100644 (file)
@@ -24,7 +24,7 @@
 #ifndef MouseRelatedEvent_h
 #define MouseRelatedEvent_h
 
-#include "LayoutTypesInlineMethods.h"
+#include "LayoutPoint.h"
 #include "UIEventWithKeyState.h"
 
 namespace WebCore {
index 96e6211..66645f4 100644 (file)
@@ -27,9 +27,8 @@
 
 #include "EditingBoundary.h"
 #include "EventTarget.h"
-#include "FractionalLayoutRect.h"
 #include "KURLHash.h"
-#include "LayoutTypes.h"
+#include "LayoutRect.h"
 #include "MutationObserver.h"
 #include "RenderStyleConstants.h"
 #include "ScriptWrappable.h"
index 152e3e2..66825f5 100644 (file)
@@ -29,7 +29,7 @@
 #if ENABLE(TOUCH_EVENTS)
 
 #include "EventTarget.h"
-#include "LayoutTypesInlineMethods.h"
+#include "LayoutPoint.h"
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 #include <wtf/RefPtr.h>
index 563a066..381263f 100644 (file)
@@ -75,7 +75,7 @@ using namespace HTMLNames;
 
 static inline LayoutUnit NoXPosForVerticalArrowNavigation()
 {
-    return MIN_LAYOUT_UNIT;
+    return LayoutUnit::min();
 }
 
 CaretBase::CaretBase(CaretVisibility visibility)
index a0ce059..e7e524f 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "EditingStyle.h"
 #include "IntRect.h"
-#include "LayoutTypes.h"
+#include "LayoutRect.h"
 #include "Range.h"
 #include "ScrollBehavior.h"
 #include "Timer.h"
index 721344a..ae4b81d 100644 (file)
 #define RenderedPosition_h
 
 #include "InlineBox.h"
-#include "LayoutTypes.h"
 #include "TextAffinity.h"
 
 namespace WebCore {
 
+class LayoutUnit;
 class Position;
 class RenderObject;
 class VisiblePosition;
index c7a04fd..0caf354 100644 (file)
@@ -24,7 +24,7 @@
 #define HTMLAreaElement_h
 
 #include "HTMLAnchorElement.h"
-#include "LayoutTypes.h"
+#include "LayoutRect.h"
 #include <wtf/OwnArrayPtr.h>
 
 namespace WebCore {
index b351f9e..6d2bf80 100644 (file)
@@ -31,7 +31,7 @@
 
 #include "Color.h"
 #include "FloatQuad.h"
-#include "LayoutTypes.h"
+#include "LayoutRect.h"
 
 #include <wtf/OwnPtr.h>
 #include <wtf/PassOwnPtr.h>
index 36e2b11..4b618b1 100644 (file)
@@ -36,7 +36,7 @@
 #include "InspectorBaseAgent.h"
 #include "InspectorFrontend.h"
 #include "InspectorValues.h"
-#include "LayoutTypes.h"
+#include "LayoutRect.h"
 #include "PlatformInstrumentation.h"
 #include "ScriptGCEvent.h"
 #include "ScriptGCEventListener.h"
index 776b59f..8dee530 100644 (file)
@@ -37,7 +37,7 @@
 #include "Event.h"
 #include "InspectorValues.h"
 #include "IntRect.h"
-#include "LayoutTypesInlineMethods.h"
+#include "LayoutRect.h"
 #include "ResourceRequest.h"
 #include "ResourceResponse.h"
 #include "ScriptCallStack.h"
index c5dcec2..eeee672 100644 (file)
@@ -31,7 +31,7 @@
 #ifndef TimelineRecordFactory_h
 #define TimelineRecordFactory_h
 
-#include "LayoutTypes.h"
+#include "LayoutRect.h"
 #include <wtf/Forward.h>
 
 namespace WebCore {
index ad1c802..41d950a 100644 (file)
@@ -26,7 +26,7 @@
 #include "CachedResource.h"
 #include "ImageObserver.h"
 #include "IntRect.h"
-#include "LayoutTypesInlineMethods.h"
+#include "LayoutSize.h"
 #include "SVGImageCache.h"
 #include <wtf/Vector.h>
 
index cb90f96..4f5986d 100644 (file)
@@ -27,7 +27,7 @@
 #define FocusController_h
 
 #include "FocusDirection.h"
-#include "LayoutTypes.h"
+#include "LayoutRect.h"
 #include <wtf/Forward.h>
 #include <wtf/Noncopyable.h>
 #include <wtf/RefPtr.h>
index 583453b..c039163 100644 (file)
@@ -28,7 +28,7 @@
 #include "AdjustViewSizeOrNot.h"
 #include "Color.h"
 #include "Frame.h"
-#include "LayoutTypes.h"
+#include "LayoutRect.h"
 #include "Pagination.h"
 #include "PaintPhase.h"
 #include "ScrollView.h"
index a1c4ab9..443ab26 100644 (file)
@@ -25,7 +25,7 @@
 #include "FrameLoaderTypes.h"
 #include "FindOptions.h"
 #include "LayoutMilestones.h"
-#include "LayoutTypes.h"
+#include "LayoutRect.h"
 #include "PageVisibilityState.h"
 #include "Pagination.h"
 #include "PlatformScreen.h"
index b5528df..37e346e 100644 (file)
@@ -23,7 +23,7 @@
 
 #include "FocusDirection.h"
 #include "HTMLFrameOwnerElement.h"
-#include "LayoutTypes.h"
+#include "LayoutRect.h"
 #include "Node.h"
 
 #include <limits>
index b008f9b..01c1b04 100644 (file)
@@ -27,7 +27,7 @@
 #define ScrollingCoordinator_h
 
 #include "IntRect.h"
-#include "LayoutTypes.h"
+#include "LayoutRect.h"
 #include "PlatformWheelEvent.h"
 #include "ScrollTypes.h"
 #include "Timer.h"
similarity index 57%
rename from Source/WebCore/platform/FractionalLayoutUnit.h
rename to Source/WebCore/platform/LayoutUnit.h
index 0699b06..a83e95c 100644 (file)
@@ -28,8 +28,8 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef FractionalLayoutUnit_h
-#define FractionalLayoutUnit_h
+#ifndef LayoutUnit_h
+#define LayoutUnit_h
 
 #include <limits.h>
 #include <limits>
@@ -62,18 +62,18 @@ static const int kFixedPointDenominator = 1;
 const int intMaxForLayoutUnit = INT_MAX / kFixedPointDenominator;
 const int intMinForLayoutUnit = INT_MIN / kFixedPointDenominator;
 
-class FractionalLayoutUnit {
+class LayoutUnit {
 public:
     // FIXME: Ideally we would have size_t versions of the constructor and operators.
     // However due to compiler and platform differences adding those are non-trivial.
     // See https://bugs.webkit.org/show_bug.cgi?id=83848 for details.
     
-    FractionalLayoutUnit() : m_value(0) { }
+    LayoutUnit() : m_value(0) { }
 #if ENABLE(SUBPIXEL_LAYOUT)
-    FractionalLayoutUnit(int value) { setValue(value); }
-    FractionalLayoutUnit(unsigned short value) { setValue(value); }
-    FractionalLayoutUnit(unsigned int value) { setValue(value); }
-    FractionalLayoutUnit(float value)
+    LayoutUnit(int value) { setValue(value); }
+    LayoutUnit(unsigned short value) { setValue(value); }
+    LayoutUnit(unsigned value) { setValue(value); }
+    LayoutUnit(float value)
     {
 #if ENABLE(SATURATED_LAYOUT_ARITHMETIC)
         m_value = clampTo<float>(value * kFixedPointDenominator, static_cast<float>(INT_MIN), static_cast<float>(INT_MAX));
@@ -82,7 +82,7 @@ public:
         m_value = value * kFixedPointDenominator;
 #endif
     }
-    FractionalLayoutUnit(double value)
+    LayoutUnit(double value)
     {
 #if ENABLE(SATURATED_LAYOUT_ARITHMETIC)
         m_value = clampTo<double>(value * kFixedPointDenominator, static_cast<double>(INT_MIN), static_cast<double>(INT_MAX));
@@ -92,17 +92,17 @@ public:
 #endif
     }
 #else
-    FractionalLayoutUnit(int value) { REPORT_OVERFLOW(isInBounds(value)); m_value = value; }
-    FractionalLayoutUnit(unsigned short value) { REPORT_OVERFLOW(isInBounds(value)); m_value = value; }
-    FractionalLayoutUnit(unsigned int value) { REPORT_OVERFLOW(isInBounds(value)); m_value = value; }
-    FractionalLayoutUnit(float value) { REPORT_OVERFLOW(isInBounds(value)); m_value = value; }
-    FractionalLayoutUnit(double value) { REPORT_OVERFLOW(isInBounds(value)); m_value = value; }
+    LayoutUnit(int value) { REPORT_OVERFLOW(isInBounds(value)); m_value = value; }
+    LayoutUnit(unsigned short value) { REPORT_OVERFLOW(isInBounds(value)); m_value = value; }
+    LayoutUnit(unsigned value) { REPORT_OVERFLOW(isInBounds(value)); m_value = value; }
+    LayoutUnit(float value) { REPORT_OVERFLOW(isInBounds(value)); m_value = value; }
+    LayoutUnit(double value) { REPORT_OVERFLOW(isInBounds(value)); m_value = value; }
 #endif
-    FractionalLayoutUnit(const FractionalLayoutUnit& value) { m_value = value.rawValue(); }
+    LayoutUnit(const LayoutUnit& value) { m_value = value.rawValue(); }
 
-    static FractionalLayoutUnit fromFloatCeil(float value)
+    static LayoutUnit fromFloatCeil(float value)
     {
-        FractionalLayoutUnit v;
+        LayoutUnit v;
 #if ENABLE(SATURATED_LAYOUT_ARITHMETIC)
         v.m_value = clampToInteger(ceilf(value * kFixedPointDenominator));
 #else
@@ -112,9 +112,9 @@ public:
         return v;
     }
 
-    static FractionalLayoutUnit fromFloatFloor(float value)
+    static LayoutUnit fromFloatFloor(float value)
     {
-        FractionalLayoutUnit v;
+        LayoutUnit v;
 #if ENABLE(SATURATED_LAYOUT_ARITHMETIC)
         v.m_value = clampToInteger(floorf(value * kFixedPointDenominator));
 #else
@@ -124,7 +124,7 @@ public:
         return v;
     }
 
-    static FractionalLayoutUnit fromFloatRound(float value)
+    static LayoutUnit fromFloatRound(float value)
     {
 #if ENABLE(SATURATED_LAYOUT_ARITHMETIC)
         if (value >= 0)
@@ -133,10 +133,10 @@ public:
 #else
         if (value >= 0) {
             REPORT_OVERFLOW(isInBounds(value + epsilon() / 2.0f));
-            return FractionalLayoutUnit(value + epsilon() / 2.0f);
+            return LayoutUnit(value + epsilon() / 2.0f);
         }
         REPORT_OVERFLOW(isInBounds(value - epsilon() / 2.0f));
-        return FractionalLayoutUnit(value - epsilon() / 2.0f);
+        return LayoutUnit(value - epsilon() / 2.0f);
 #endif
     }
 
@@ -167,7 +167,7 @@ public:
     operator double() const { return toDouble(); }
     operator bool() const { return m_value; }
 
-    FractionalLayoutUnit operator++(int)
+    LayoutUnit operator++(int)
     {
         m_value += kFixedPointDenominator;
         return *this;
@@ -181,9 +181,9 @@ public:
         m_value = static_cast<int>(value);
     }
 
-    FractionalLayoutUnit abs() const
+    LayoutUnit abs() const
     {
-        FractionalLayoutUnit returnValue;
+        LayoutUnit returnValue;
         returnValue.setRawValue(::abs(m_value));
         return returnValue;
     }
@@ -227,11 +227,11 @@ public:
 #endif
     }
 
-    FractionalLayoutUnit fraction() const
+    LayoutUnit fraction() const
     {   
         // Add the fraction to the size (as opposed to the full location) to avoid overflows.
         // Compute fraction using the mod operator to preserve the sign of the value as it may affect rounding.
-        FractionalLayoutUnit fraction;
+        LayoutUnit fraction;
         fraction.setRawValue(rawValue() % kFixedPointDenominator);
         return fraction;
     }
@@ -241,36 +241,36 @@ public:
 #else
     static int epsilon() { return 0; }
 #endif
-    static const FractionalLayoutUnit max()
+    static const LayoutUnit max()
     {
-        FractionalLayoutUnit m;
+        LayoutUnit m;
         m.m_value = std::numeric_limits<int>::max();
         return m;
     }
-    static const FractionalLayoutUnit min()
+    static const LayoutUnit min()
     {
-        FractionalLayoutUnit m;
+        LayoutUnit m;
         m.m_value = std::numeric_limits<int>::min();
         return m;
     }
 
     // Versions of max/min that are slightly smaller/larger than max/min() to allow for roinding without overflowing.
-    static const FractionalLayoutUnit nearlyMax()
+    static const LayoutUnit nearlyMax()
     {
-        FractionalLayoutUnit m;
+        LayoutUnit m;
         m.m_value = std::numeric_limits<int>::max() - kFixedPointDenominator / 2;
         return m;
     }
-    static const FractionalLayoutUnit nearlyMin()
+    static const LayoutUnit nearlyMin()
     {
-        FractionalLayoutUnit m;
+        LayoutUnit m;
         m.m_value = std::numeric_limits<int>::min() + kFixedPointDenominator / 2;
         return m;
     }
     
-    static FractionalLayoutUnit clamp(double value)
+    static LayoutUnit clamp(double value)
     {
-        return clampTo<FractionalLayoutUnit>(value, FractionalLayoutUnit::min(), FractionalLayoutUnit::max());
+        return clampTo<LayoutUnit>(value, LayoutUnit::min(), LayoutUnit::max());
     }
 
 private:
@@ -317,176 +317,176 @@ private:
     int m_value;
 };
 
-inline bool operator<=(const FractionalLayoutUnit& a, const FractionalLayoutUnit& b)
+inline bool operator<=(const LayoutUnit& a, const LayoutUnit& b)
 {
     return a.rawValue() <= b.rawValue();
 }
 
-inline bool operator<=(const FractionalLayoutUnit& a, float b)
+inline bool operator<=(const LayoutUnit& a, float b)
 {
     return a.toFloat() <= b;
 }
 
-inline bool operator<=(const FractionalLayoutUnit& a, int b)
+inline bool operator<=(const LayoutUnit& a, int b)
 {
-    return a <= FractionalLayoutUnit(b);
+    return a <= LayoutUnit(b);
 }
 
-inline bool operator<=(const float a, const FractionalLayoutUnit& b)
+inline bool operator<=(const float a, const LayoutUnit& b)
 {
     return a <= b.toFloat();
 }
 
-inline bool operator<=(const int a, const FractionalLayoutUnit& b)
+inline bool operator<=(const int a, const LayoutUnit& b)
 {
-    return FractionalLayoutUnit(a) <= b;
+    return LayoutUnit(a) <= b;
 }
 
-inline bool operator>=(const FractionalLayoutUnit& a, const FractionalLayoutUnit& b)
+inline bool operator>=(const LayoutUnit& a, const LayoutUnit& b)
 {
     return a.rawValue() >= b.rawValue();
 }
 
-inline bool operator>=(const FractionalLayoutUnit& a, int b)
+inline bool operator>=(const LayoutUnit& a, int b)
 {
-    return a >= FractionalLayoutUnit(b);
+    return a >= LayoutUnit(b);
 }
 
-inline bool operator>=(const float a, const FractionalLayoutUnit& b)
+inline bool operator>=(const float a, const LayoutUnit& b)
 {
     return a >= b.toFloat();
 }
 
-inline bool operator>=(const FractionalLayoutUnit& a, float b)
+inline bool operator>=(const LayoutUnit& a, float b)
 {
     return a.toFloat() >= b;
 }
 
-inline bool operator>=(const int a, const FractionalLayoutUnit& b)
+inline bool operator>=(const int a, const LayoutUnit& b)
 {
-    return FractionalLayoutUnit(a) >= b;
+    return LayoutUnit(a) >= b;
 }
 
-inline bool operator<(const FractionalLayoutUnit& a, const FractionalLayoutUnit& b)
+inline bool operator<(const LayoutUnit& a, const LayoutUnit& b)
 {
     return a.rawValue() < b.rawValue();
 }
 
-inline bool operator<(const FractionalLayoutUnit& a, int b)
+inline bool operator<(const LayoutUnit& a, int b)
 {
-    return a < FractionalLayoutUnit(b);
+    return a < LayoutUnit(b);
 }
 
-inline bool operator<(const FractionalLayoutUnit& a, float b)
+inline bool operator<(const LayoutUnit& a, float b)
 {
     return a.toFloat() < b;
 }
 
-inline bool operator<(const FractionalLayoutUnit& a, double b)
+inline bool operator<(const LayoutUnit& a, double b)
 {
     return a.toDouble() < b;
 }
 
-inline bool operator<(const int a, const FractionalLayoutUnit& b)
+inline bool operator<(const int a, const LayoutUnit& b)
 {
-    return FractionalLayoutUnit(a) < b;
+    return LayoutUnit(a) < b;
 }
 
-inline bool operator<(const float a, const FractionalLayoutUnit& b)
+inline bool operator<(const float a, const LayoutUnit& b)
 {
     return a < b.toFloat();
 }
 
-inline bool operator>(const FractionalLayoutUnit& a, const FractionalLayoutUnit& b)
+inline bool operator>(const LayoutUnit& a, const LayoutUnit& b)
 {
     return a.rawValue() > b.rawValue();
 }
 
-inline bool operator>(const FractionalLayoutUnit& a, double b)
+inline bool operator>(const LayoutUnit& a, double b)
 {
     return a.toDouble() > b;
 }
 
-inline bool operator>(const FractionalLayoutUnit& a, float b)
+inline bool operator>(const LayoutUnit& a, float b)
 {
     return a.toFloat() > b;
 }
 
-inline bool operator>(const FractionalLayoutUnit& a, int b)
+inline bool operator>(const LayoutUnit& a, int b)
 {
-    return a > FractionalLayoutUnit(b);
+    return a > LayoutUnit(b);
 }
 
-inline bool operator>(const int a, const FractionalLayoutUnit& b)
+inline bool operator>(const int a, const LayoutUnit& b)
 {
-    return FractionalLayoutUnit(a) > b;
+    return LayoutUnit(a) > b;
 }
 
-inline bool operator>(const float a, const FractionalLayoutUnit& b)
+inline bool operator>(const float a, const LayoutUnit& b)
 {
     return a > b.toFloat();
 }
 
-inline bool operator>(const double a, const FractionalLayoutUnit& b)
+inline bool operator>(const double a, const LayoutUnit& b)
 {
     return a > b.toDouble();
 }
 
-inline bool operator!=(const FractionalLayoutUnit& a, const FractionalLayoutUnit& b)
+inline bool operator!=(const LayoutUnit& a, const LayoutUnit& b)
 {
     return a.rawValue() != b.rawValue();
 }
 
-inline bool operator!=(const FractionalLayoutUnit& a, float b)
+inline bool operator!=(const LayoutUnit& a, float b)
 {
-    return a != FractionalLayoutUnit(b);
+    return a != LayoutUnit(b);
 }
 
-inline bool operator!=(const int a, const FractionalLayoutUnit& b)
+inline bool operator!=(const int a, const LayoutUnit& b)
 {
-    return FractionalLayoutUnit(a) != b;
+    return LayoutUnit(a) != b;
 }
 
-inline bool operator!=(const FractionalLayoutUnit& a, int b)
+inline bool operator!=(const LayoutUnit& a, int b)
 {
-    return a != FractionalLayoutUnit(b);
+    return a != LayoutUnit(b);
 }
 
-inline bool operator==(const FractionalLayoutUnit& a, const FractionalLayoutUnit& b)
+inline bool operator==(const LayoutUnit& a, const LayoutUnit& b)
 {
     return a.rawValue() == b.rawValue();
 }
 
-inline bool operator==(const FractionalLayoutUnit& a, int b)
+inline bool operator==(const LayoutUnit& a, int b)
 {
-    return a == FractionalLayoutUnit(b);
+    return a == LayoutUnit(b);
 }
 
-inline bool operator==(const int a, const FractionalLayoutUnit& b)
+inline bool operator==(const int a, const LayoutUnit& b)
 {
-    return FractionalLayoutUnit(a) == b;
+    return LayoutUnit(a) == b;
 }
 
-inline bool operator==(const FractionalLayoutUnit& a, float b)
+inline bool operator==(const LayoutUnit& a, float b)
 {
     return a.toFloat() == b;
 }
 
-inline bool operator==(const float a, const FractionalLayoutUnit& b)
+inline bool operator==(const float a, const LayoutUnit& b)
 {
     return a == b.toFloat();
 }
 
-// For multiplication that's prone to overflow, this bounds it to FractionalLayoutUnit::max() and ::min()
-inline FractionalLayoutUnit boundedMultiply(const FractionalLayoutUnit& a, const FractionalLayoutUnit& b)
+// For multiplication that's prone to overflow, this bounds it to LayoutUnit::max() and ::min()
+inline LayoutUnit boundedMultiply(const LayoutUnit& a, const LayoutUnit& b)
 {
 #if ENABLE(SUBPIXEL_LAYOUT)
-    FractionalLayoutUnit returnVal;
+    LayoutUnit returnVal;
     long long rawVal = static_cast<long long>(a.rawValue()) * b.rawValue() / kFixedPointDenominator;
     if (rawVal > std::numeric_limits<int>::max())
-        return FractionalLayoutUnit::max();
+        return LayoutUnit::max();
     if (rawVal < std::numeric_limits<int>::min())
-        return FractionalLayoutUnit::min();
+        return LayoutUnit::min();
     returnVal.setRawValue(rawVal);
     return returnVal;
 #else
@@ -494,12 +494,12 @@ inline FractionalLayoutUnit boundedMultiply(const FractionalLayoutUnit& a, const
 #endif
 }
 
-inline FractionalLayoutUnit operator*(const FractionalLayoutUnit& a, const FractionalLayoutUnit& b)
+inline LayoutUnit operator*(const LayoutUnit& a, const LayoutUnit& b)
 {
 #if ENABLE(SUBPIXEL_LAYOUT) && ENABLE(SATURATED_LAYOUT_ARITHMETIC)
     return boundedMultiply(a, b);
 #elif ENABLE(SUBPIXEL_LAYOUT)
-    FractionalLayoutUnit returnVal;
+    LayoutUnit returnVal;
     long long rawVal = static_cast<long long>(a.rawValue()) * b.rawValue() / kFixedPointDenominator;
     returnVal.setRawValue(rawVal);
     return returnVal;
@@ -508,50 +508,50 @@ inline FractionalLayoutUnit operator*(const FractionalLayoutUnit& a, const Fract
 #endif
 }    
 
-inline double operator*(const FractionalLayoutUnit& a, double b)
+inline double operator*(const LayoutUnit& a, double b)
 {
     return a.toDouble() * b;
 }
 
-inline float operator*(const FractionalLayoutUnit& a, float b)
+inline float operator*(const LayoutUnit& a, float b)
 {
     return a.toFloat() * b;
 }
 
-inline FractionalLayoutUnit operator*(const FractionalLayoutUnit& a, int b)
+inline LayoutUnit operator*(const LayoutUnit& a, int b)
 {
-    return a * FractionalLayoutUnit(b);
+    return a * LayoutUnit(b);
 }
 
-inline FractionalLayoutUnit operator*(const FractionalLayoutUnit& a, unsigned b)
+inline LayoutUnit operator*(const LayoutUnit& a, unsigned b)
 {
-    return a * FractionalLayoutUnit(b);
+    return a * LayoutUnit(b);
 }
 
-inline FractionalLayoutUnit operator*(unsigned a, const FractionalLayoutUnit& b)
+inline LayoutUnit operator*(unsigned a, const LayoutUnit& b)
 {
-    return FractionalLayoutUnit(a) * b;
+    return LayoutUnit(a) * b;
 }
 
-inline FractionalLayoutUnit operator*(const int a, const FractionalLayoutUnit& b)
+inline LayoutUnit operator*(const int a, const LayoutUnit& b)
 {
-    return FractionalLayoutUnit(a) * b;
+    return LayoutUnit(a) * b;
 }
 
-inline float operator*(const float a, const FractionalLayoutUnit& b)
+inline float operator*(const float a, const LayoutUnit& b)
 {
     return a * b.toFloat();
 }
 
-inline double operator*(const double a, const FractionalLayoutUnit& b)
+inline double operator*(const double a, const LayoutUnit& b)
 {
     return a * b.toDouble();
 }
 
-inline FractionalLayoutUnit operator/(const FractionalLayoutUnit& a, const FractionalLayoutUnit& b)
+inline LayoutUnit operator/(const LayoutUnit& a, const LayoutUnit& b)
 {
 #if ENABLE(SUBPIXEL_LAYOUT)
-    FractionalLayoutUnit returnVal;
+    LayoutUnit returnVal;
     long long rawVal = static_cast<long long>(kFixedPointDenominator) * a.rawValue() / b.rawValue();
     returnVal.setRawValue(rawVal);
     return returnVal;
@@ -560,49 +560,49 @@ inline FractionalLayoutUnit operator/(const FractionalLayoutUnit& a, const Fract
 #endif
 }    
 
-inline float operator/(const FractionalLayoutUnit& a, float b)
+inline float operator/(const LayoutUnit& a, float b)
 {
     return a.toFloat() / b;
 }
 
-inline double operator/(const FractionalLayoutUnit& a, double b)
+inline double operator/(const LayoutUnit& a, double b)
 {
     return a.toDouble() / b;
 }
 
-inline FractionalLayoutUnit operator/(const FractionalLayoutUnit& a, int b)
+inline LayoutUnit operator/(const LayoutUnit& a, int b)
 {
-    return a / FractionalLayoutUnit(b);
+    return a / LayoutUnit(b);
 }
 
-inline FractionalLayoutUnit operator/(const FractionalLayoutUnit& a, unsigned int b)
+inline LayoutUnit operator/(const LayoutUnit& a, unsigned b)
 {
-    return a / FractionalLayoutUnit(b);
+    return a / LayoutUnit(b);
 }
 
-inline float operator/(const float a, const FractionalLayoutUnit& b)
+inline float operator/(const float a, const LayoutUnit& b)
 {
     return a / b.toFloat();
 }
 
-inline double operator/(const double a, const FractionalLayoutUnit& b)
+inline double operator/(const double a, const LayoutUnit& b)
 {
     return a / b.toDouble();
 }
 
-inline FractionalLayoutUnit operator/(const int a, const FractionalLayoutUnit& b)
+inline LayoutUnit operator/(const int a, const LayoutUnit& b)
 {
-    return FractionalLayoutUnit(a) / b;
+    return LayoutUnit(a) / b;
 }
 
-inline FractionalLayoutUnit operator/(unsigned int a, const FractionalLayoutUnit& b)
+inline LayoutUnit operator/(unsigned a, const LayoutUnit& b)
 {
-    return FractionalLayoutUnit(a) / b;
+    return LayoutUnit(a) / b;
 }
 
-inline FractionalLayoutUnit operator+(const FractionalLayoutUnit& a, const FractionalLayoutUnit& b)
+inline LayoutUnit operator+(const LayoutUnit& a, const LayoutUnit& b)
 {
-    FractionalLayoutUnit returnVal;
+    LayoutUnit returnVal;
 #if ENABLE(SATURATED_LAYOUT_ARITHMETIC)
     returnVal.setRawValue(saturatedAddition(a.rawValue(), b.rawValue()));
 #else
@@ -611,39 +611,39 @@ inline FractionalLayoutUnit operator+(const FractionalLayoutUnit& a, const Fract
     return returnVal;
 }
 
-inline FractionalLayoutUnit operator+(const FractionalLayoutUnit& a, int b)
+inline LayoutUnit operator+(const LayoutUnit& a, int b)
 {
-    return a + FractionalLayoutUnit(b);
+    return a + LayoutUnit(b);
 }
 
-inline float operator+(const FractionalLayoutUnit& a, float b)
+inline float operator+(const LayoutUnit& a, float b)
 {
     return a.toFloat() + b;
 }
 
-inline double operator+(const FractionalLayoutUnit& a, double b)
+inline double operator+(const LayoutUnit& a, double b)
 {
     return a.toDouble() + b;
 }
 
-inline FractionalLayoutUnit operator+(const int a, const FractionalLayoutUnit& b)
+inline LayoutUnit operator+(const int a, const LayoutUnit& b)
 {
-    return FractionalLayoutUnit(a) + b;
+    return LayoutUnit(a) + b;
 }
 
-inline float operator+(const float a, const FractionalLayoutUnit& b)
+inline float operator+(const float a, const LayoutUnit& b)
 {
     return a + b.toFloat();
 }
 
-inline double operator+(const double a, const FractionalLayoutUnit& b)
+inline double operator+(const double a, const LayoutUnit& b)
 {
     return a + b.toDouble();
 }
 
-inline FractionalLayoutUnit operator-(const FractionalLayoutUnit& a, const FractionalLayoutUnit& b)
+inline LayoutUnit operator-(const LayoutUnit& a, const LayoutUnit& b)
 {
-    FractionalLayoutUnit returnVal;
+    LayoutUnit returnVal;
 #if ENABLE(SATURATED_LAYOUT_ARITHMETIC)
     returnVal.setRawValue(saturatedSubtraction(a.rawValue(), b.rawValue()));
 #else
@@ -652,44 +652,44 @@ inline FractionalLayoutUnit operator-(const FractionalLayoutUnit& a, const Fract
     return returnVal;
 }
 
-inline FractionalLayoutUnit operator-(const FractionalLayoutUnit& a, int b)
+inline LayoutUnit operator-(const LayoutUnit& a, int b)
 {
-    return a - FractionalLayoutUnit(b);
+    return a - LayoutUnit(b);
 }
 
-inline FractionalLayoutUnit operator-(const FractionalLayoutUnit& a, unsigned b)
+inline LayoutUnit operator-(const LayoutUnit& a, unsigned b)
 {
-    return a - FractionalLayoutUnit(b);
+    return a - LayoutUnit(b);
 }
 
-inline float operator-(const FractionalLayoutUnit& a, float b)
+inline float operator-(const LayoutUnit& a, float b)
 {
     return a.toFloat() - b;
 }
 
-inline FractionalLayoutUnit operator-(const int a, const FractionalLayoutUnit& b)
+inline LayoutUnit operator-(const int a, const LayoutUnit& b)
 {
-    return FractionalLayoutUnit(a) - b;
+    return LayoutUnit(a) - b;
 }
 
-inline float operator-(const float a, const FractionalLayoutUnit& b)
+inline float operator-(const float a, const LayoutUnit& b)
 {
     return a - b.toFloat();
 }
 
-inline FractionalLayoutUnit operator-(const FractionalLayoutUnit& a)
+inline LayoutUnit operator-(const LayoutUnit& a)
 {
-    FractionalLayoutUnit returnVal;
+    LayoutUnit returnVal;
     returnVal.setRawValue(-a.rawValue());
     return returnVal;
 }
 
 // For returning the remainder after a division with integer results.
-inline FractionalLayoutUnit intMod(const FractionalLayoutUnit& a, const FractionalLayoutUnit& b)
+inline LayoutUnit intMod(const LayoutUnit& a, const LayoutUnit& b)
 {
 #if ENABLE(SUBPIXEL_LAYOUT)
     // This calculates the modulo so that: a = static_cast<int>(a / b) * b + intMod(a, b).
-    FractionalLayoutUnit returnVal;
+    LayoutUnit returnVal;
     returnVal.setRawValue(a.rawValue() % b.rawValue());
     return returnVal;
 #else
@@ -697,11 +697,11 @@ inline FractionalLayoutUnit intMod(const FractionalLayoutUnit& a, const Fraction
 #endif
 }
 
-inline FractionalLayoutUnit operator%(const FractionalLayoutUnit& a, const FractionalLayoutUnit& b)
+inline LayoutUnit operator%(const LayoutUnit& a, const LayoutUnit& b)
 {
 #if ENABLE(SUBPIXEL_LAYOUT)
     // This calculates the modulo so that: a = (a / b) * b + a % b.
-    FractionalLayoutUnit returnVal;
+    LayoutUnit returnVal;
     long long rawVal = (static_cast<long long>(kFixedPointDenominator) * a.rawValue()) % b.rawValue();
     returnVal.setRawValue(rawVal / kFixedPointDenominator);
     return returnVal;
@@ -710,17 +710,17 @@ inline FractionalLayoutUnit operator%(const FractionalLayoutUnit& a, const Fract
 #endif
 }
 
-inline FractionalLayoutUnit operator%(const FractionalLayoutUnit& a, int b)
+inline LayoutUnit operator%(const LayoutUnit& a, int b)
 {
-    return a % FractionalLayoutUnit(b);
+    return a % LayoutUnit(b);
 }
 
-inline FractionalLayoutUnit operator%(int a, const FractionalLayoutUnit& b)
+inline LayoutUnit operator%(int a, const LayoutUnit& b)
 {
-    return FractionalLayoutUnit(a) % b;
+    return LayoutUnit(a) % b;
 }
 
-inline FractionalLayoutUnit& operator+=(FractionalLayoutUnit& a, const FractionalLayoutUnit& b)
+inline LayoutUnit& operator+=(LayoutUnit& a, const LayoutUnit& b)
 {
 #if ENABLE(SATURATED_LAYOUT_ARITHMETIC)
     a.setRawValue(saturatedAddition(a.rawValue(), b.rawValue()));
@@ -730,31 +730,31 @@ inline FractionalLayoutUnit& operator+=(FractionalLayoutUnit& a, const Fractiona
     return a;
 }
 
-inline FractionalLayoutUnit& operator+=(FractionalLayoutUnit& a, int b)
+inline LayoutUnit& operator+=(LayoutUnit& a, int b)
 {
     a = a + b;
     return a;
 }
 
-inline FractionalLayoutUnit& operator+=(FractionalLayoutUnit& a, float b)
+inline LayoutUnit& operator+=(LayoutUnit& a, float b)
 {
     a = a + b;
     return a;
 }
 
-inline float& operator+=(float& a, const FractionalLayoutUnit& b)
+inline float& operator+=(float& a, const LayoutUnit& b)
 {
     a = a + b;
     return a;
 }
 
-inline FractionalLayoutUnit& operator-=(FractionalLayoutUnit& a, int b)
+inline LayoutUnit& operator-=(LayoutUnit& a, int b)
 {
     a = a - b;
     return a;
 }
 
-inline FractionalLayoutUnit& operator-=(FractionalLayoutUnit& a, const FractionalLayoutUnit& b)
+inline LayoutUnit& operator-=(LayoutUnit& a, const LayoutUnit& b)
 {
 #if ENABLE(SATURATED_LAYOUT_ARITHMETIC)
     a.setRawValue(saturatedSubtraction(a.rawValue(), b.rawValue()));
@@ -764,62 +764,105 @@ inline FractionalLayoutUnit& operator-=(FractionalLayoutUnit& a, const Fractiona
     return a;
 }
 
-inline FractionalLayoutUnit& operator-=(FractionalLayoutUnit& a, float b)
+inline LayoutUnit& operator-=(LayoutUnit& a, float b)
 {
     a = a - b;
     return a;
 }
 
-inline float& operator-=(float& a, const FractionalLayoutUnit& b)
+inline float& operator-=(float& a, const LayoutUnit& b)
 {
     a = a - b;
     return a;
 }
 
-inline FractionalLayoutUnit& operator*=(FractionalLayoutUnit& a, const FractionalLayoutUnit& b)
+inline LayoutUnit& operator*=(LayoutUnit& a, const LayoutUnit& b)
 {
     a = a * b;
     return a;
 }
-// operator*=(FractionalLayoutUnit& a, int b) is supported by the operator above plus FractionalLayoutUnit(int).
+// operator*=(LayoutUnit& a, int b) is supported by the operator above plus LayoutUnit(int).
 
-inline FractionalLayoutUnit& operator*=(FractionalLayoutUnit& a, float b)
+inline LayoutUnit& operator*=(LayoutUnit& a, float b)
 {
     a = a * b;
     return a;
 }
 
-inline float& operator*=(float& a, const FractionalLayoutUnit& b)
+inline float& operator*=(float& a, const LayoutUnit& b)
 {
     a = a * b;
     return a;
 }
 
-inline FractionalLayoutUnit& operator/=(FractionalLayoutUnit& a, const FractionalLayoutUnit& b)
+inline LayoutUnit& operator/=(LayoutUnit& a, const LayoutUnit& b)
 {
     a = a / b;
     return a;
 }
-// operator/=(FractionalLayoutUnit& a, int b) is supported by the operator above plus FractionalLayoutUnit(int).
+// operator/=(LayoutUnit& a, int b) is supported by the operator above plus LayoutUnit(int).
 
-inline FractionalLayoutUnit& operator/=(FractionalLayoutUnit& a, float b)
+inline LayoutUnit& operator/=(LayoutUnit& a, float b)
 {
     a = a / b;
     return a;
 }
 
-inline float& operator/=(float& a, const FractionalLayoutUnit& b)
+inline float& operator/=(float& a, const LayoutUnit& b)
 {
     a = a / b;
     return a;
 }
 
-inline int snapSizeToPixel(FractionalLayoutUnit size, FractionalLayoutUnit location) 
+inline int snapSizeToPixel(LayoutUnit size, LayoutUnit location) 
 {
-    FractionalLayoutUnit fraction = location.fraction();
+    LayoutUnit fraction = location.fraction();
     return (fraction + size).round() - fraction.round();
 }
 
+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 LayoutUnit::fromFloatRound(value);
+#else
+    return static_cast<int>(lroundf(value));
+#endif
+}
+
+inline LayoutUnit ceiledLayoutUnit(float value)
+{
+#if ENABLE(SUBPIXEL_LAYOUT)
+    return LayoutUnit::fromFloatCeil(value);
+#else
+    return ceilf(value);
+#endif
+}
+
+inline LayoutUnit absoluteValue(const LayoutUnit& value)
+{
+    return value.abs();
+}
+
+inline LayoutUnit layoutMod(const LayoutUnit& numerator, const LayoutUnit& denominator)
+{
+    return numerator % denominator;
+}
+
+inline bool isIntegerValue(const LayoutUnit value)
+{
+    return value.toInt() == value;
+}
+
 } // namespace WebCore
 
-#endif // FractionalLayoutUnit_h
+#endif // LayoutUnit_h
index dbde963..4d78572 100644 (file)
@@ -64,7 +64,7 @@ public:
         ASSERT(t != Calculated);
     }
     
-    Length(FractionalLayoutUnit v, LengthType t, bool q = false)
+    Length(LayoutUnit v, LengthType t, bool q = false)
         : m_floatValue(v.toFloat()), m_quirk(q), m_type(t), m_isFloat(true)
     {
         ASSERT(t != Calculated);
@@ -172,7 +172,7 @@ public:
         m_isFloat = true;    
     }
 
-    void setValue(LengthType t, FractionalLayoutUnit value)
+    void setValue(LengthType t, LayoutUnit value)
     {
         m_type = t;
         m_floatValue = value;
index bfa24ac..8a4033d 100644 (file)
@@ -22,7 +22,7 @@
 #ifndef PopupMenuClient_h
 #define PopupMenuClient_h
 
-#include "LayoutTypes.h"
+#include "LayoutUnit.h"
 #include "PopupMenuStyle.h"
 #include "ScrollTypes.h"
 #include <wtf/Forward.h>
index 1b0fe3e..7a4f6f5 100644 (file)
@@ -26,8 +26,8 @@
 #ifndef AnimationUtilities_h
 #define AnimationUtilities_h
 
-#include "FractionalLayoutUnit.h"
 #include "IntPoint.h"
+#include "LayoutUnit.h"
 #include <wtf/MathExtras.h>
 
 namespace WebCore {
@@ -52,7 +52,7 @@ inline float blend(float from, float to, double progress)
     return static_cast<float>(from + (to - from) * progress);
 }
 
-inline FractionalLayoutUnit blend(FractionalLayoutUnit from, FractionalLayoutUnit to, double progress)
+inline LayoutUnit blend(LayoutUnit from, LayoutUnit to, double progress)
 {  
     return from + (to - from) * progress;
 }
index d3ccc80..d7a00ea 100644 (file)
 #include "FloatPoint.h"
 
 #include "AffineTransform.h"
-#include "FractionalLayoutPoint.h"
 #include "FloatConversion.h"
-#include "FractionalLayoutSize.h"
 #include "IntPoint.h"
+#include "LayoutPoint.h"
+#include "LayoutSize.h"
 #include "TransformationMatrix.h"
 #include <limits>
 #include <math.h>
@@ -42,7 +42,7 @@ FloatPoint::FloatPoint(const IntPoint& p) : m_x(p.x()), m_y(p.y())
 {
 }
 
-FloatPoint::FloatPoint(const FractionalLayoutPoint& p) : m_x(p.x()), m_y(p.y())
+FloatPoint::FloatPoint(const LayoutPoint& p) : m_x(p.x()), m_y(p.y())
 {
 }
 
@@ -61,13 +61,13 @@ float FloatPoint::length() const
     return sqrtf(lengthSquared());
 }
 
-void FloatPoint::move(const FractionalLayoutSize& size)
+void FloatPoint::move(const LayoutSize& size)
 {
     m_x += size.width();
     m_y += size.height();
 }
 
-void FloatPoint::moveBy(const FractionalLayoutPoint& point)
+void FloatPoint::moveBy(const LayoutPoint& point)
 {
     m_x += point.x();
     m_y += point.y();
index 58db6ba..70d62bb 100644 (file)
@@ -68,15 +68,15 @@ class AffineTransform;
 class TransformationMatrix;
 class IntPoint;
 class IntSize;
-class FractionalLayoutPoint;
-class FractionalLayoutSize;
+class LayoutPoint;
+class LayoutSize;
 
 class FloatPoint {
 public:
     FloatPoint() : m_x(0), m_y(0) { }
     FloatPoint(float x, float y) : m_x(x), m_y(y) { }
     FloatPoint(const IntPoint&);
-    FloatPoint(const FractionalLayoutPoint&);
+    FloatPoint(const LayoutPoint&);
     explicit FloatPoint(const FloatSize& size) : m_x(size.width()), m_y(size.height()) { }
 
     static FloatPoint zero() { return FloatPoint(); }
@@ -103,7 +103,7 @@ public:
         m_x += a.width();
         m_y += a.height();
     }
-    void move(const FractionalLayoutSize&);
+    void move(const LayoutSize&);
     void move(const FloatSize& a)
     {
         m_x += a.width();
@@ -114,7 +114,7 @@ public:
         m_x += a.x();
         m_y += a.y();
     }
-    void moveBy(const FractionalLayoutPoint&);
+    void moveBy(const LayoutPoint&);
     void moveBy(const FloatPoint& a)
     {
         m_x += a.x();
index 7ced95a..edce8a2 100644 (file)
@@ -28,8 +28,8 @@
 #include "FloatRect.h"
 
 #include "FloatConversion.h"
-#include "FractionalLayoutRect.h"
 #include "IntRect.h"
+#include "LayoutRect.h"
 #include <algorithm>
 #include <math.h>
 #include <wtf/MathExtras.h>
@@ -43,7 +43,7 @@ FloatRect::FloatRect(const IntRect& r) : m_location(r.location()), m_size(r.size
 {
 }
 
-FloatRect::FloatRect(const FractionalLayoutRect& r) : m_location(r.location()), m_size(r.size())
+FloatRect::FloatRect(const LayoutRect& r) : m_location(r.location()), m_size(r.size())
 {
 }
 
index 9e09ac9..fcef94a 100644 (file)
@@ -74,7 +74,7 @@ namespace WebCore {
 class VGRect;
 #endif
 
-class FractionalLayoutRect;
+class LayoutRect;
 class IntRect;
 class IntPoint;
 
@@ -91,7 +91,7 @@ public:
     FloatRect(float x, float y, float width, float height)
         : m_location(FloatPoint(x, y)), m_size(FloatSize(width, height)) { }
     FloatRect(const IntRect&);
-    FloatRect(const FractionalLayoutRect&);
+    FloatRect(const LayoutRect&);
 
     static FloatRect narrowPrecision(double x, double y, double width, double height);
 
index 2b62a9d..e11b828 100644 (file)
@@ -27,9 +27,9 @@
 #include "config.h"
 #include "FloatSize.h"
 
-#include "FractionalLayoutSize.h"
 #include "FloatConversion.h"
 #include "IntSize.h"
+#include "LayoutSize.h"
 #include <limits>
 #include <math.h>
 
@@ -41,7 +41,7 @@ FloatSize::FloatSize(const IntSize& size) : m_width(size.width()), m_height(size
 {
 }
 
-FloatSize::FloatSize(const FractionalLayoutSize& size) : m_width(size.width()), m_height(size.height())
+FloatSize::FloatSize(const LayoutSize& size) : m_width(size.width()), m_height(size.height())
 {
 }
 
index 2c9cc18..2ca22cd 100644 (file)
@@ -60,14 +60,14 @@ typedef struct _NSSize NSSize;
 namespace WebCore {
 
 class IntSize;
-class FractionalLayoutSize;
+class LayoutSize;
 
 class FloatSize {
 public:
     FloatSize() : m_width(0), m_height(0) { }
     FloatSize(float width, float height) : m_width(width), m_height(height) { }
     FloatSize(const IntSize&);
-    FloatSize(const FractionalLayoutSize&);
+    FloatSize(const LayoutSize&);
 
     static FloatSize narrowPrecision(double width, double height);
 
diff --git a/Source/WebCore/platform/graphics/FractionalLayoutBoxExtent.h b/Source/WebCore/platform/graphics/FractionalLayoutBoxExtent.h
deleted file mode 100644 (file)
index 28bdb9c..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2012, 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 FractionalLayoutBoxExtent_h
-#define FractionalLayoutBoxExtent_h
-
-#include "FractionalLayoutUnit.h"
-#include "TextDirection.h"
-#include "WritingMode.h"
-
-namespace WebCore {
-
-class FractionalLayoutBoxExtent {
-public:
-    FractionalLayoutBoxExtent() : m_top(0), m_right(0), m_bottom(0), m_left(0) { }
-    FractionalLayoutBoxExtent(FractionalLayoutUnit top, FractionalLayoutUnit right, FractionalLayoutUnit bottom, FractionalLayoutUnit left)
-        : m_top(top), m_right(right), m_bottom(bottom), m_left(left) { }
-
-    inline FractionalLayoutUnit top() const { return m_top; }
-    inline FractionalLayoutUnit right() const { return m_right; }
-    inline FractionalLayoutUnit bottom() const { return m_bottom; }
-    inline FractionalLayoutUnit left() const { return m_left; }
-
-    inline void setTop(FractionalLayoutUnit value) { m_top = value; }
-    inline void setRight(FractionalLayoutUnit value) { m_right = value; }
-    inline void setBottom(FractionalLayoutUnit value) { m_bottom = value; }
-    inline void setLeft(FractionalLayoutUnit value) { m_left = value; }
-
-    FractionalLayoutUnit logicalTop(WritingMode) const;
-    FractionalLayoutUnit logicalBottom(WritingMode) const;
-    FractionalLayoutUnit logicalLeft(WritingMode) const;
-    FractionalLayoutUnit logicalRight(WritingMode) const;
-
-    FractionalLayoutUnit before(WritingMode) const;
-    FractionalLayoutUnit after(WritingMode) const;
-    FractionalLayoutUnit start(WritingMode, TextDirection) const;
-    FractionalLayoutUnit end(WritingMode, TextDirection) const;
-
-    void setBefore(WritingMode, FractionalLayoutUnit);
-    void setAfter(WritingMode, FractionalLayoutUnit);
-    void setStart(WritingMode, TextDirection, FractionalLayoutUnit);
-    void setEnd(WritingMode, TextDirection, FractionalLayoutUnit);
-
-    FractionalLayoutUnit& mutableLogicalLeft(WritingMode);
-    FractionalLayoutUnit& mutableLogicalRight(WritingMode);
-
-    FractionalLayoutUnit& mutableBefore(WritingMode);
-    FractionalLayoutUnit& mutableAfter(WritingMode);
-
-private:
-    FractionalLayoutUnit m_top;
-    FractionalLayoutUnit m_right;
-    FractionalLayoutUnit m_bottom;
-    FractionalLayoutUnit m_left;
-};
-
-} // namespace WebCore
-
-#endif // FractionalLayoutBoxExtent_h
diff --git a/Source/WebCore/platform/graphics/FractionalLayoutPoint.h b/Source/WebCore/platform/graphics/FractionalLayoutPoint.h
deleted file mode 100644 (file)
index fc830e6..0000000
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * Copyright (c) 2012, 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 FractionalLayoutPoint_h
-#define FractionalLayoutPoint_h
-
-#include "FloatPoint.h"
-#include "FractionalLayoutSize.h"
-#include <wtf/MathExtras.h>
-
-#if PLATFORM(QT)
-#include <qglobal.h>
-QT_BEGIN_NAMESPACE
-class QPoint;
-class QPointF;
-QT_END_NAMESPACE
-#endif
-
-namespace WebCore {
-
-class FractionalLayoutPoint {
-public:
-    FractionalLayoutPoint() : m_x(0), m_y(0) { }
-    FractionalLayoutPoint(FractionalLayoutUnit x, FractionalLayoutUnit y) : m_x(x), m_y(y) { }
-    FractionalLayoutPoint(const IntPoint& point) : m_x(point.x()), m_y(point.y()) { }
-    explicit FractionalLayoutPoint(const FloatPoint& size) : m_x(size.x()), m_y(size.y()) { }
-    explicit FractionalLayoutPoint(const FractionalLayoutSize& size) : m_x(size.width()), m_y(size.height()) { }
-
-    static FractionalLayoutPoint zero() { return FractionalLayoutPoint(); }
-
-    FractionalLayoutUnit x() const { return m_x; }
-    FractionalLayoutUnit y() const { return m_y; }
-
-    void setX(FractionalLayoutUnit x) { m_x = x; }
-    void setY(FractionalLayoutUnit y) { m_y = y; }
-
-    void move(const FractionalLayoutSize& s) { move(s.width(), s.height()); } 
-    void moveBy(const FractionalLayoutPoint& offset) { move(offset.x(), offset.y()); }
-    void move(FractionalLayoutUnit dx, FractionalLayoutUnit dy) { m_x += dx; m_y += dy; }
-    void scale(float sx, float sy)
-    {
-        m_x *= sx;
-        m_y *= sy;
-    }
-    
-    FractionalLayoutPoint expandedTo(const FractionalLayoutPoint& other) const
-    {
-        return FractionalLayoutPoint(std::max(m_x, other.m_x), std::max(m_y, other.m_y));
-    }
-
-    FractionalLayoutPoint shrunkTo(const FractionalLayoutPoint& other) const
-    {
-        return FractionalLayoutPoint(std::min(m_x, other.m_x), std::min(m_y, other.m_y));
-    }
-
-    void clampNegativeToZero()
-    {
-        *this = expandedTo(zero());
-    }
-
-    FractionalLayoutPoint transposedPoint() const
-    {
-        return FractionalLayoutPoint(m_y, m_x);
-    }
-
-#if PLATFORM(QT)
-    explicit FractionalLayoutPoint(const QPoint&);
-    explicit FractionalLayoutPoint(const QPointF&);
-    operator QPointF() const;
-#endif
-
-private:
-    FractionalLayoutUnit m_x, m_y;
-};
-
-inline FractionalLayoutPoint& operator+=(FractionalLayoutPoint& a, const FractionalLayoutSize& b)
-{
-    a.move(b.width(), b.height());
-    return a;
-}
-
-inline FractionalLayoutPoint& operator-=(FractionalLayoutPoint& a, const FractionalLayoutSize& b)
-{
-    a.move(-b.width(), -b.height());
-    return a;
-}
-
-inline FractionalLayoutPoint operator+(const FractionalLayoutPoint& a, const FractionalLayoutSize& b)
-{
-    return FractionalLayoutPoint(a.x() + b.width(), a.y() + b.height());
-}
-
-inline FractionalLayoutPoint operator+(const FractionalLayoutPoint& a, const FractionalLayoutPoint& b)
-{
-    return FractionalLayoutPoint(a.x() + b.x(), a.y() + b.y());
-}
-
-inline FractionalLayoutSize operator-(const FractionalLayoutPoint& a, const FractionalLayoutPoint& b)
-{
-    return FractionalLayoutSize(a.x() - b.x(), a.y() - b.y());
-}
-
-inline FractionalLayoutPoint operator-(const FractionalLayoutPoint& a, const FractionalLayoutSize& b)
-{
-    return FractionalLayoutPoint(a.x() - b.width(), a.y() - b.height());
-}
-
-inline FractionalLayoutPoint operator-(const FractionalLayoutPoint& point)
-{
-    return FractionalLayoutPoint(-point.x(), -point.y());
-}
-
-inline bool operator==(const FractionalLayoutPoint& a, const FractionalLayoutPoint& b)
-{
-    return a.x() == b.x() && a.y() == b.y();
-}
-
-inline bool operator!=(const FractionalLayoutPoint& a, const FractionalLayoutPoint& b)
-{
-    return a.x() != b.x() || a.y() != b.y();
-}
-
-inline FractionalLayoutPoint toPoint(const FractionalLayoutSize& size)
-{
-    return FractionalLayoutPoint(size.width(), size.height());
-}
-
-inline FractionalLayoutSize toSize(const FractionalLayoutPoint& a)
-{
-    return FractionalLayoutSize(a.x(), a.y());
-}
-
-inline IntPoint flooredIntPoint(const FractionalLayoutPoint& point)
-{
-    return IntPoint(point.x().floor(), point.y().floor());
-}
-
-inline IntPoint roundedIntPoint(const FractionalLayoutPoint& point)
-{
-    return IntPoint(point.x().round(), point.y().round());
-}
-
-inline IntPoint roundedIntPoint(const FractionalLayoutSize& size)
-{
-    return IntPoint(size.width().round(), size.height().round());
-}
-
-inline IntPoint ceiledIntPoint(const FractionalLayoutPoint& point)
-{
-    return IntPoint(point.x().ceil(), point.y().ceil());
-}
-
-inline FractionalLayoutPoint flooredFractionalLayoutPoint(const FloatPoint& p)
-{
-    return FractionalLayoutPoint(FractionalLayoutUnit::fromFloatFloor(p.x()), FractionalLayoutUnit::fromFloatFloor(p.y()));
-}
-
-inline FractionalLayoutPoint ceiledFractionalLayoutPoint(const FloatPoint& p)
-{
-    return FractionalLayoutPoint(FractionalLayoutUnit::fromFloatCeil(p.x()), FractionalLayoutUnit::fromFloatCeil(p.y()));
-}
-
-} // namespace WebCore
-
-#endif // FractionalLayoutPoint_h
diff --git a/Source/WebCore/platform/graphics/FractionalLayoutRect.h b/Source/WebCore/platform/graphics/FractionalLayoutRect.h
deleted file mode 100644 (file)
index 449100d..0000000
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
- * Copyright (c) 2012, 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 FractionalLayoutRect_h
-#define FractionalLayoutRect_h
-
-#include "FractionalLayoutBoxExtent.h"
-#include "FractionalLayoutPoint.h"
-#include "IntRect.h"
-#include <wtf/Vector.h>
-
-#if PLATFORM(QT)
-#include <qglobal.h>
-QT_BEGIN_NAMESPACE
-class QRect;
-class QRectF;
-QT_END_NAMESPACE
-#endif
-
-namespace WebCore {
-
-class FloatRect;
-
-class FractionalLayoutRect {
-public:
-    FractionalLayoutRect() { }
-    FractionalLayoutRect(const FractionalLayoutPoint& location, const FractionalLayoutSize& size)
-        : m_location(location), m_size(size) { }
-    FractionalLayoutRect(FractionalLayoutUnit x, FractionalLayoutUnit y, FractionalLayoutUnit width, FractionalLayoutUnit height)
-        : m_location(FractionalLayoutPoint(x, y)), m_size(FractionalLayoutSize(width, height)) { }
-    FractionalLayoutRect(const FloatPoint& location, const FloatSize& size)
-        : m_location(location), m_size(size) { }
-    FractionalLayoutRect(const IntRect& rect) : m_location(rect.location()), m_size(rect.size()) { }
-
-    explicit FractionalLayoutRect(const FloatRect&); // don't do this implicitly since it's lossy
-        
-    FractionalLayoutPoint location() const { return m_location; }
-    FractionalLayoutSize size() const { return m_size; }
-
-    IntPoint pixelSnappedLocation() const { return roundedIntPoint(m_location); }
-    IntSize pixelSnappedSize() const { return IntSize(snapSizeToPixel(m_size.width(), m_location.x()), snapSizeToPixel(m_size.height(), m_location.y())); }
-
-    void setLocation(const FractionalLayoutPoint& location) { m_location = location; }
-    void setSize(const FractionalLayoutSize& size) { m_size = size; }
-
-    FractionalLayoutUnit x() const { return m_location.x(); }
-    FractionalLayoutUnit y() const { return m_location.y(); }
-    FractionalLayoutUnit maxX() const { return x() + width(); }
-    FractionalLayoutUnit maxY() const { return y() + height(); }
-    FractionalLayoutUnit width() const { return m_size.width(); }
-    FractionalLayoutUnit height() const { return m_size.height(); }
-
-    int pixelSnappedX() const { return x().round(); }
-    int pixelSnappedY() const { return y().round(); }
-    int pixelSnappedWidth() const { return snapSizeToPixel(width(), x()); }
-    int pixelSnappedHeight() const { return snapSizeToPixel(height(), y()); }
-    int pixelSnappedMaxX() const { return (m_location.x() + m_size.width()).round(); }
-    int pixelSnappedMaxY() const { return (m_location.y() + m_size.height()).round(); }
-
-    void setX(FractionalLayoutUnit x) { m_location.setX(x); }
-    void setY(FractionalLayoutUnit y) { m_location.setY(y); }
-    void setWidth(FractionalLayoutUnit width) { m_size.setWidth(width); }
-    void setHeight(FractionalLayoutUnit height) { m_size.setHeight(height); }
-
-    bool isEmpty() const { return m_size.isEmpty(); }
-
-    // NOTE: The result is rounded to integer values, and thus may be not the exact
-    // center point.
-    FractionalLayoutPoint center() const { return FractionalLayoutPoint(x() + width() / 2, y() + height() / 2); }
-
-    void move(const FractionalLayoutSize& size) { m_location += size; } 
-    void moveBy(const FractionalLayoutPoint& offset) { m_location.move(offset.x(), offset.y()); }
-    void move(FractionalLayoutUnit dx, FractionalLayoutUnit dy) { m_location.move(dx, dy); } 
-
-    void expand(const FractionalLayoutSize& size) { m_size += size; }
-    void expand(const FractionalLayoutBoxExtent& box)
-    {
-        m_location.move(-box.left(), -box.top());
-        m_size.expand(box.left() + box.right(), box.top() + box.bottom());
-    }
-    void expand(FractionalLayoutUnit dw, FractionalLayoutUnit dh) { m_size.expand(dw, dh); }
-    void contract(const FractionalLayoutSize& size) { m_size -= size; }
-    void contract(FractionalLayoutUnit dw, FractionalLayoutUnit dh) { m_size.expand(-dw, -dh); }
-
-    void shiftXEdgeTo(FractionalLayoutUnit edge)
-    {
-        FractionalLayoutUnit delta = edge - x();
-        setX(edge);
-        setWidth(std::max<FractionalLayoutUnit>(0, width() - delta));
-    }
-    void shiftMaxXEdgeTo(FractionalLayoutUnit edge)
-    {
-        FractionalLayoutUnit delta = edge - maxX();
-        setWidth(std::max<FractionalLayoutUnit>(0, width() + delta));
-    }
-    void shiftYEdgeTo(FractionalLayoutUnit edge)
-    {
-        FractionalLayoutUnit delta = edge - y();
-        setY(edge);
-        setHeight(std::max<FractionalLayoutUnit>(0, height() - delta));
-    }
-    void shiftMaxYEdgeTo(FractionalLayoutUnit edge)
-    {
-        FractionalLayoutUnit delta = edge - maxY();
-        setHeight(std::max<FractionalLayoutUnit>(0, height() + delta));
-    }
-
-    FractionalLayoutPoint minXMinYCorner() const { return m_location; } // typically topLeft
-    FractionalLayoutPoint maxXMinYCorner() const { return FractionalLayoutPoint(m_location.x() + m_size.width(), m_location.y()); } // typically topRight
-    FractionalLayoutPoint minXMaxYCorner() const { return FractionalLayoutPoint(m_location.x(), m_location.y() + m_size.height()); } // typically bottomLeft
-    FractionalLayoutPoint maxXMaxYCorner() const { return FractionalLayoutPoint(m_location.x() + m_size.width(), m_location.y() + m_size.height()); } // typically bottomRight
-    
-    bool intersects(const FractionalLayoutRect&) const;
-    bool contains(const FractionalLayoutRect&) const;
-
-    // This checks to see if the rect contains x,y in the traditional sense.
-    // Equivalent to checking if the rect contains a 1x1 rect below and to the right of (px,py).
-    bool contains(FractionalLayoutUnit px, FractionalLayoutUnit py) const
-        { return px >= x() && px < maxX() && py >= y() && py < maxY(); }
-    bool contains(const FractionalLayoutPoint& point) const { return contains(point.x(), point.y()); }
-
-    void intersect(const FractionalLayoutRect&);
-    void unite(const FractionalLayoutRect&);
-    void uniteIfNonZero(const FractionalLayoutRect&);
-
-    void inflateX(FractionalLayoutUnit dx)
-    {
-        m_location.setX(m_location.x() - dx);
-        m_size.setWidth(m_size.width() + dx + dx);
-    }
-    void inflateY(FractionalLayoutUnit dy)
-    {
-        m_location.setY(m_location.y() - dy);
-        m_size.setHeight(m_size.height() + dy + dy);
-    }
-    void inflate(FractionalLayoutUnit d) { inflateX(d); inflateY(d); }
-    void scale(float s);
-
-    FractionalLayoutRect transposedRect() const { return FractionalLayoutRect(m_location.transposedPoint(), m_size.transposedSize()); }
-
-    static FractionalLayoutRect infiniteRect()
-    {
-        // Return a rect that is slightly smaller than the true max rect to allow pixelSnapping to round up to the nearest IntRect without overflowing.
-        return FractionalLayoutRect(FractionalLayoutUnit::nearlyMin() / 2, FractionalLayoutUnit::nearlyMin() / 2, FractionalLayoutUnit::nearlyMax(), FractionalLayoutUnit::nearlyMax());
-    }
-
-#if PLATFORM(QT)
-    explicit FractionalLayoutRect(const QRect&);
-    explicit FractionalLayoutRect(const QRectF&);
-    operator QRectF() const;
-#endif
-
-private:
-    FractionalLayoutPoint m_location;
-    FractionalLayoutSize m_size;
-};
-
-inline FractionalLayoutRect intersection(const FractionalLayoutRect& a, const FractionalLayoutRect& b)
-{
-    FractionalLayoutRect c = a;
-    c.intersect(b);
-    return c;
-}
-
-inline FractionalLayoutRect unionRect(const FractionalLayoutRect& a, const FractionalLayoutRect& b)
-{
-    FractionalLayoutRect c = a;
-    c.unite(b);
-    return c;
-}
-
-FractionalLayoutRect unionRect(const Vector<FractionalLayoutRect>&);
-
-inline bool operator==(const FractionalLayoutRect& a, const FractionalLayoutRect& b)
-{
-    return a.location() == b.location() && a.size() == b.size();
-}
-
-inline bool operator!=(const FractionalLayoutRect& a, const FractionalLayoutRect& b)
-{
-    return a.location() != b.location() || a.size() != b.size();
-}
-
-inline IntRect pixelSnappedIntRect(const FractionalLayoutRect& rect)
-{
-#if ENABLE(SUBPIXEL_LAYOUT)
-    return IntRect(roundedIntPoint(rect.location()), IntSize(snapSizeToPixel(rect.width(), rect.x()),
-                                                             snapSizeToPixel(rect.height(), rect.y())));
-
-#else
-    return IntRect(rect);
-#endif
-}
-
-IntRect enclosingIntRect(const FractionalLayoutRect&);
-FractionalLayoutRect enclosingFractionalLayoutRect(const FloatRect&);
-
-} // namespace WebCore
-
-#endif // FractionalLayoutRect_h
index dd3b7a9..b5f8c6f 100644 (file)
@@ -32,7 +32,7 @@
 #include "FloatPoint.h"
 #include "FloatRect.h"
 #include "GraphicsContext.h"
-#include "LayoutTypesInlineMethods.h"
+#include "LayoutRect.h"
 #include "RotateTransformOperation.h"
 #include "TextStream.h"
 #include <wtf/HashMap.h>
index 1b05d3f..3c6ea50 100644 (file)
@@ -22,7 +22,7 @@
 #if USE(ACCELERATED_COMPOSITING)
 #include "GraphicsLayerAnimation.h"
 
-#include "FractionalLayoutSize.h"
+#include "LayoutSize.h"
 #include "UnitBezier.h"
 #include <wtf/CurrentTime.h>
 
index fadceab..61ed5ee 100644 (file)
@@ -26,8 +26,8 @@
 #include "config.h"
 #include "IntRect.h"
 
-#include "FractionalLayoutRect.h"
 #include "FloatRect.h"
+#include "LayoutRect.h"
 #include <algorithm>
 
 using std::max;
@@ -41,7 +41,7 @@ IntRect::IntRect(const FloatRect& r)
 {
 }
 
-IntRect::IntRect(const FractionalLayoutRect& r)
+IntRect::IntRect(const LayoutRect& r)
     : m_location(r.x(), r.y())
     , m_size(r.width(), r.height())
 {
index 04996e6..70f2cc3 100644 (file)
@@ -77,7 +77,7 @@ struct SkIRect;
 namespace WebCore {
 
 class FloatRect;
-class FractionalLayoutRect;
+class LayoutRect;
 
 class IntRect {
     WTF_MAKE_FAST_ALLOCATED;
@@ -89,7 +89,7 @@ public:
         : m_location(IntPoint(x, y)), m_size(IntSize(width, height)) { }
 
     explicit IntRect(const FloatRect&); // don't do this implicitly since it's lossy
-    explicit IntRect(const FractionalLayoutRect&); // don't do this implicitly since it's lossy
+    explicit IntRect(const LayoutRect&); // don't do this implicitly since it's lossy
         
     IntPoint location() const { return m_location; }
     IntSize size() const { return m_size; }
  */
 
 #include "config.h"
-#include "FractionalLayoutBoxExtent.h"
+#include "LayoutBoxExtent.h"
 
 namespace WebCore {
 
-FractionalLayoutUnit FractionalLayoutBoxExtent::logicalTop(WritingMode writingMode) const
+LayoutUnit LayoutBoxExtent::logicalTop(WritingMode writingMode) const
 {
     return isHorizontalWritingMode(writingMode) ? m_top : m_left;
 }
 
-FractionalLayoutUnit FractionalLayoutBoxExtent::logicalBottom(WritingMode writingMode) const
+LayoutUnit LayoutBoxExtent::logicalBottom(WritingMode writingMode) const
 {
     return isHorizontalWritingMode(writingMode) ? m_bottom : m_right;
 }
 
-FractionalLayoutUnit FractionalLayoutBoxExtent::logicalLeft(WritingMode writingMode) const
+LayoutUnit LayoutBoxExtent::logicalLeft(WritingMode writingMode) const
 {
     return isHorizontalWritingMode(writingMode) ? m_left : m_top;
 }
 
-FractionalLayoutUnit FractionalLayoutBoxExtent::logicalRight(WritingMode writingMode) const
+LayoutUnit LayoutBoxExtent::logicalRight(WritingMode writingMode) const
 {
     return isHorizontalWritingMode(writingMode) ? m_right : m_bottom;
 }
 
-FractionalLayoutUnit FractionalLayoutBoxExtent::before(WritingMode writingMode) const
+LayoutUnit LayoutBoxExtent::before(WritingMode writingMode) const
 {
     switch (writingMode) {
     case TopToBottomWritingMode:
@@ -69,7 +69,7 @@ FractionalLayoutUnit FractionalLayoutBoxExtent::before(WritingMode writingMode)
     return m_top;
 }
 
-FractionalLayoutUnit FractionalLayoutBoxExtent::after(WritingMode writingMode) const
+LayoutUnit LayoutBoxExtent::after(WritingMode writingMode) const
 {
     switch (writingMode) {
     case TopToBottomWritingMode:
@@ -85,21 +85,21 @@ FractionalLayoutUnit FractionalLayoutBoxExtent::after(WritingMode writingMode) c
     return m_bottom;
 }
 
-FractionalLayoutUnit FractionalLayoutBoxExtent::start(WritingMode writingMode, TextDirection direction) const
+LayoutUnit LayoutBoxExtent::start(WritingMode writingMode, TextDirection direction) const
 {
     if (isHorizontalWritingMode(writingMode))
         return isLeftToRightDirection(direction) ? m_left : m_right;
     return isLeftToRightDirection(direction) ? m_top : m_bottom;
 }
 
-FractionalLayoutUnit FractionalLayoutBoxExtent::end(WritingMode writingMode, TextDirection direction) const
+LayoutUnit LayoutBoxExtent::end(WritingMode writingMode, TextDirection direction) const
 {
     if (isHorizontalWritingMode(writingMode))
         return isLeftToRightDirection(direction) ? m_right : m_left;
     return isLeftToRightDirection(direction) ? m_bottom : m_top;
 }
 
-void FractionalLayoutBoxExtent::setBefore(WritingMode writingMode, FractionalLayoutUnit value)
+void LayoutBoxExtent::setBefore(WritingMode writingMode, LayoutUnit value)
 {
     switch (writingMode) {
     case TopToBottomWritingMode:
@@ -120,7 +120,7 @@ void FractionalLayoutBoxExtent::setBefore(WritingMode writingMode, FractionalLay
     }
 }
 
-void FractionalLayoutBoxExtent::setAfter(WritingMode writingMode, FractionalLayoutUnit value)
+void LayoutBoxExtent::setAfter(WritingMode writingMode, LayoutUnit value)
 {
     switch (writingMode) {
     case TopToBottomWritingMode:
@@ -141,7 +141,7 @@ void FractionalLayoutBoxExtent::setAfter(WritingMode writingMode, FractionalLayo
     }
 }
 
-void FractionalLayoutBoxExtent::setStart(WritingMode writingMode, TextDirection direction, FractionalLayoutUnit value)
+void LayoutBoxExtent::setStart(WritingMode writingMode, TextDirection direction, LayoutUnit value)
 {
     if (isHorizontalWritingMode(writingMode)) {
         if (isLeftToRightDirection(direction))
@@ -156,7 +156,7 @@ void FractionalLayoutBoxExtent::setStart(WritingMode writingMode, TextDirection
     }
 }
 
-void FractionalLayoutBoxExtent::setEnd(WritingMode writingMode, TextDirection direction, FractionalLayoutUnit value)
+void LayoutBoxExtent::setEnd(WritingMode writingMode, TextDirection direction, LayoutUnit value)
 {
     if (isHorizontalWritingMode(writingMode)) {
         if (isLeftToRightDirection(direction))
@@ -171,23 +171,23 @@ void FractionalLayoutBoxExtent::setEnd(WritingMode writingMode, TextDirection di
     }
 }
 
-FractionalLayoutUnit& FractionalLayoutBoxExtent::mutableLogicalLeft(WritingMode writingMode)
+LayoutUnit& LayoutBoxExtent::mutableLogicalLeft(WritingMode writingMode)
 {
     return isHorizontalWritingMode(writingMode) ? m_left : m_top;
 }
 
-FractionalLayoutUnit& FractionalLayoutBoxExtent::mutableLogicalRight(WritingMode writingMode)
+LayoutUnit& LayoutBoxExtent::mutableLogicalRight(WritingMode writingMode)
 {
     return isHorizontalWritingMode(writingMode) ? m_right : m_bottom;
 }
 
-FractionalLayoutUnit& FractionalLayoutBoxExtent::mutableBefore(WritingMode writingMode)
+LayoutUnit& LayoutBoxExtent::mutableBefore(WritingMode writingMode)
 {
     return isHorizontalWritingMode(writingMode) ? (isFlippedBlocksWritingMode(writingMode) ? m_bottom : m_top) :
                                                   (isFlippedBlocksWritingMode(writingMode) ? m_right: m_left);
 }
 
-FractionalLayoutUnit& FractionalLayoutBoxExtent::mutableAfter(WritingMode writingMode)
+LayoutUnit& LayoutBoxExtent::mutableAfter(WritingMode writingMode)
 {
     return isHorizontalWritingMode(writingMode) ? (isFlippedBlocksWritingMode(writingMode) ? m_top : m_bottom) :
                                                   (isFlippedBlocksWritingMode(writingMode) ? m_left: m_right);
diff --git a/Source/WebCore/platform/graphics/LayoutBoxExtent.h b/Source/WebCore/platform/graphics/LayoutBoxExtent.h
new file mode 100644 (file)
index 0000000..1c57275
--- /dev/null
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2012, 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 LayoutBoxExtent_h
+#define LayoutBoxExtent_h
+
+#include "LayoutUnit.h"
+#include "TextDirection.h"
+#include "WritingMode.h"
+
+namespace WebCore {
+
+class LayoutBoxExtent {
+public:
+    LayoutBoxExtent() : m_top(0), m_right(0), m_bottom(0), m_left(0) { }
+    LayoutBoxExtent(LayoutUnit top, LayoutUnit right, LayoutUnit bottom, LayoutUnit left)
+        : m_top(top), m_right(right), m_bottom(bottom), m_left(left) { }
+
+    inline LayoutUnit top() const { return m_top; }
+    inline LayoutUnit right() const { return m_right; }
+    inline LayoutUnit bottom() const { return m_bottom; }
+    inline LayoutUnit left() const { return m_left; }
+
+    inline void setTop(LayoutUnit value) { m_top = value; }
+    inline void setRight(LayoutUnit value) { m_right = value; }
+    inline void setBottom(LayoutUnit value) { m_bottom = value; }
+    inline void setLeft(LayoutUnit value) { m_left = value; }
+
+    LayoutUnit logicalTop(WritingMode) const;
+    LayoutUnit logicalBottom(WritingMode) const;
+    LayoutUnit logicalLeft(WritingMode) const;
+    LayoutUnit logicalRight(WritingMode) const;
+
+    LayoutUnit before(WritingMode) const;
+    LayoutUnit after(WritingMode) const;
+    LayoutUnit start(WritingMode, TextDirection) const;
+    LayoutUnit end(WritingMode, TextDirection) const;
+
+    void setBefore(WritingMode, LayoutUnit);
+    void setAfter(WritingMode, LayoutUnit);
+    void setStart(WritingMode, TextDirection, LayoutUnit);
+    void setEnd(WritingMode, TextDirection, LayoutUnit);
+
+    LayoutUnit& mutableLogicalLeft(WritingMode);
+    LayoutUnit& mutableLogicalRight(WritingMode);
+
+    LayoutUnit& mutableBefore(WritingMode);
+    LayoutUnit& mutableAfter(WritingMode);
+
+private:
+    LayoutUnit m_top;
+    LayoutUnit m_right;
+    LayoutUnit m_bottom;
+    LayoutUnit m_left;
+};
+
+} // namespace WebCore
+
+#endif // LayoutBoxExtent_h
diff --git a/Source/WebCore/platform/graphics/LayoutPoint.h b/Source/WebCore/platform/graphics/LayoutPoint.h
new file mode 100644 (file)
index 0000000..647a651
--- /dev/null
@@ -0,0 +1,222 @@
+/*
+ * Copyright (c) 2012, 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 LayoutPoint_h
+#define LayoutPoint_h
+
+#include "FloatPoint.h"
+#include "LayoutSize.h"
+#include <wtf/MathExtras.h>
+
+#if PLATFORM(QT)
+#include <qglobal.h>
+QT_BEGIN_NAMESPACE
+class QPoint;
+class QPointF;
+QT_END_NAMESPACE
+#endif
+
+namespace WebCore {
+
+class LayoutPoint {
+public:
+    LayoutPoint() : m_x(0), m_y(0) { }
+    LayoutPoint(LayoutUnit x, LayoutUnit y) : m_x(x), m_y(y) { }
+    LayoutPoint(const IntPoint& point) : m_x(point.x()), m_y(point.y()) { }
+    explicit LayoutPoint(const FloatPoint& size) : m_x(size.x()), m_y(size.y()) { }
+    explicit LayoutPoint(const LayoutSize& size) : m_x(size.width()), m_y(size.height()) { }
+
+    static LayoutPoint zero() { return LayoutPoint(); }
+
+    LayoutUnit x() const { return m_x; }
+    LayoutUnit y() const { return m_y; }
+
+    void setX(LayoutUnit x) { m_x = x; }
+    void setY(LayoutUnit y) { m_y = y; }
+
+    void move(const LayoutSize& s) { move(s.width(), s.height()); } 
+    void moveBy(const LayoutPoint& offset) { move(offset.x(), offset.y()); }
+    void move(LayoutUnit dx, LayoutUnit dy) { m_x += dx; m_y += dy; }
+    void scale(float sx, float sy)
+    {
+        m_x *= sx;
+        m_y *= sy;
+    }
+    
+    LayoutPoint expandedTo(const LayoutPoint& other) const
+    {
+        return LayoutPoint(std::max(m_x, other.m_x), std::max(m_y, other.m_y));
+    }
+
+    LayoutPoint shrunkTo(const LayoutPoint& other) const
+    {
+        return LayoutPoint(std::min(m_x, other.m_x), std::min(m_y, other.m_y));
+    }
+
+    void clampNegativeToZero()
+    {
+        *this = expandedTo(zero());
+    }
+
+    LayoutPoint transposedPoint() const
+    {
+        return LayoutPoint(m_y, m_x);
+    }
+
+#if PLATFORM(QT)
+    explicit LayoutPoint(const QPoint&);
+    explicit LayoutPoint(const QPointF&);
+    operator QPointF() const;
+#endif
+
+private:
+    LayoutUnit m_x, m_y;
+};
+
+inline LayoutPoint& operator+=(LayoutPoint& a, const LayoutSize& b)
+{
+    a.move(b.width(), b.height());
+    return a;
+}
+
+inline LayoutPoint& operator-=(LayoutPoint& a, const LayoutSize& b)
+{
+    a.move(-b.width(), -b.height());
+    return a;
+}
+
+inline LayoutPoint operator+(const LayoutPoint& a, const LayoutSize& b)
+{
+    return LayoutPoint(a.x() + b.width(), a.y() + b.height());
+}
+
+inline LayoutPoint operator+(const LayoutPoint& a, const LayoutPoint& b)
+{
+    return LayoutPoint(a.x() + b.x(), a.y() + b.y());
+}
+
+inline LayoutSize operator-(const LayoutPoint& a, const LayoutPoint& b)
+{
+    return LayoutSize(a.x() - b.x(), a.y() - b.y());
+}
+
+inline LayoutPoint operator-(const LayoutPoint& a, const LayoutSize& b)
+{
+    return LayoutPoint(a.x() - b.width(), a.y() - b.height());
+}
+
+inline LayoutPoint operator-(const LayoutPoint& point)
+{
+    return LayoutPoint(-point.x(), -point.y());
+}
+
+inline bool operator==(const LayoutPoint& a, const LayoutPoint& b)
+{
+    return a.x() == b.x() && a.y() == b.y();
+}
+
+inline bool operator!=(const LayoutPoint& a, const LayoutPoint& b)
+{
+    return a.x() != b.x() || a.y() != b.y();
+}
+
+inline LayoutPoint toPoint(const LayoutSize& size)
+{
+    return LayoutPoint(size.width(), size.height());
+}
+
+inline LayoutPoint toLayoutPoint(const LayoutSize& p)
+{
+    return LayoutPoint(p.width(), p.height());
+}
+
+inline LayoutSize toSize(const LayoutPoint& a)
+{
+    return LayoutSize(a.x(), a.y());
+}
+
+inline IntPoint flooredIntPoint(const LayoutPoint& point)
+{
+    return IntPoint(point.x().floor(), point.y().floor());
+}
+
+inline IntPoint roundedIntPoint(const LayoutPoint& point)
+{
+    return IntPoint(point.x().round(), point.y().round());
+}
+
+inline IntPoint roundedIntPoint(const LayoutSize& size)
+{
+    return IntPoint(size.width().round(), size.height().round());
+}
+
+inline IntPoint ceiledIntPoint(const LayoutPoint& point)
+{
+    return IntPoint(point.x().ceil(), point.y().ceil());
+}
+
+inline LayoutPoint flooredLayoutPoint(const FloatPoint& p)
+{
+    return LayoutPoint(LayoutUnit::fromFloatFloor(p.x()), LayoutUnit::fromFloatFloor(p.y()));
+}
+
+inline LayoutPoint ceiledLayoutPoint(const FloatPoint& p)
+{
+    return LayoutPoint(LayoutUnit::fromFloatCeil(p.x()), LayoutUnit::fromFloatCeil(p.y()));
+}
+
+inline IntSize pixelSnappedIntSize(const LayoutSize& s, const LayoutPoint& p)
+{
+    return IntSize(snapSizeToPixel(s.width(), p.x()), snapSizeToPixel(s.height(), p.y()));
+}
+
+inline LayoutPoint roundedLayoutPoint(const FloatPoint& p)
+{
+#if ENABLE(SUBPIXEL_LAYOUT)
+    return LayoutPoint(p);
+#else
+    return roundedIntPoint(p);
+#endif
+}
+
+inline LayoutSize toLayoutSize(const LayoutPoint& p)
+{
+    return LayoutSize(p.x(), p.y());
+}
+
+inline LayoutPoint flooredLayoutPoint(const FloatSize& s)
+{
+    return flooredLayoutPoint(FloatPoint(s));
+}
+
+
+} // namespace WebCore
+
+#endif // LayoutPoint_h
  */
 
 #include "config.h"
-#include "FractionalLayoutRect.h"
+#include "LayoutRect.h"
 
 #include "FloatRect.h"
-#include "FractionalLayoutUnit.h"
+#include "LayoutUnit.h"
 #include <algorithm>
 
 using std::max;
@@ -40,13 +40,13 @@ using std::min;
 
 namespace WebCore {
 
-FractionalLayoutRect::FractionalLayoutRect(const FloatRect& r)
-    : m_location(FractionalLayoutPoint(r.location()))
-    , m_size(FractionalLayoutSize(r.size()))
+LayoutRect::LayoutRect(const FloatRect& r)
+    : m_location(LayoutPoint(r.location()))
+    , m_size(LayoutSize(r.size()))
 {
 }
 
-bool FractionalLayoutRect::intersects(const FractionalLayoutRect& other) const
+bool LayoutRect::intersects(const LayoutRect& other) const
 {
     // Checking emptiness handles negative widths as well as zero.
     return !isEmpty() && !other.isEmpty()
@@ -54,28 +54,28 @@ bool FractionalLayoutRect::intersects(const FractionalLayoutRect& other) const
         && y() < other.maxY() && other.y() < maxY();
 }
 
-bool FractionalLayoutRect::contains(const FractionalLayoutRect& other) const
+bool LayoutRect::contains(const LayoutRect& other) const
 {
     return x() <= other.x() && maxX() >= other.maxX()
         && y() <= other.y() && maxY() >= other.maxY();
 }
 
-void FractionalLayoutRect::intersect(const FractionalLayoutRect& other)
+void LayoutRect::intersect(const LayoutRect& other)
 {
-    FractionalLayoutPoint newLocation(max(x(), other.x()), max(y(), other.y()));
-    FractionalLayoutPoint newMaxPoint(min(maxX(), other.maxX()), min(maxY(), other.maxY()));
+    LayoutPoint newLocation(max(x(), other.x()), max(y(), other.y()));
+    LayoutPoint newMaxPoint(min(maxX(), other.maxX()), min(maxY(), other.maxY()));
 
     // Return a clean empty rectangle for non-intersecting cases.
     if (newLocation.x() >= newMaxPoint.x() || newLocation.y() >= newMaxPoint.y()) {
-        newLocation = FractionalLayoutPoint(0, 0);
-        newMaxPoint = FractionalLayoutPoint(0, 0);
+        newLocation = LayoutPoint(0, 0);
+        newMaxPoint = LayoutPoint(0, 0);
     }
 
     m_location = newLocation;
     m_size = newMaxPoint - newLocation;
 }
 
-void FractionalLayoutRect::unite(const FractionalLayoutRect& other)
+void LayoutRect::unite(const LayoutRect& other)
 {
     // Handle empty special cases first.
     if (other.isEmpty())
@@ -85,14 +85,14 @@ void FractionalLayoutRect::unite(const FractionalLayoutRect& other)
         return;
     }
 
-    FractionalLayoutPoint newLocation(min(x(), other.x()), min(y(), other.y()));
-    FractionalLayoutPoint newMaxPoint(max(maxX(), other.maxX()), max(maxY(), other.maxY()));
+    LayoutPoint newLocation(min(x(), other.x()), min(y(), other.y()));
+    LayoutPoint newMaxPoint(max(maxX(), other.maxX()), max(maxY(), other.maxY()));
 
     m_location = newLocation;
     m_size = newMaxPoint - newLocation;
 }
 
-void FractionalLayoutRect::uniteIfNonZero(const FractionalLayoutRect& other)
+void LayoutRect::uniteIfNonZero(const LayoutRect& other)
 {
     // Handle empty special cases first.
     if (!other.width() && !other.height())
@@ -102,22 +102,22 @@ void FractionalLayoutRect::uniteIfNonZero(const FractionalLayoutRect& other)
         return;
     }
 
-    FractionalLayoutPoint newLocation(min(x(), other.x()), min(y(), other.y()));
-    FractionalLayoutPoint newMaxPoint(max(maxX(), other.maxX()), max(maxY(), other.maxY()));
+    LayoutPoint newLocation(min(x(), other.x()), min(y(), other.y()));
+    LayoutPoint newMaxPoint(max(maxX(), other.maxX()), max(maxY(), other.maxY()));
 
     m_location = newLocation;
     m_size = newMaxPoint - newLocation;
 }
 
-void FractionalLayoutRect::scale(float s)
+void LayoutRect::scale(float s)
 {
     m_location.scale(s, s);
     m_size.scale(s);
 }
 
-FractionalLayoutRect unionRect(const Vector<FractionalLayoutRect>& rects)
+LayoutRect unionRect(const Vector<LayoutRect>& rects)
 {
-    FractionalLayoutRect result;
+    LayoutRect result;
 
     size_t count = rects.size();
     for (size_t i = 0; i < count; ++i)
@@ -126,7 +126,7 @@ FractionalLayoutRect unionRect(const Vector<FractionalLayoutRect>& rects)
     return result;
 }
 
-IntRect enclosingIntRect(const FractionalLayoutRect& rect)
+IntRect enclosingIntRect(const LayoutRect& rect)
 {
     IntPoint location = flooredIntPoint(rect.minXMinYCorner());
     IntPoint maxPoint = ceiledIntPoint(rect.maxXMaxYCorner());
@@ -134,13 +134,13 @@ IntRect enclosingIntRect(const FractionalLayoutRect& rect)
     return IntRect(location, maxPoint - location);
 }
 
-FractionalLayoutRect enclosingFractionalLayoutRect(const FloatRect& rect)
+LayoutRect enclosingLayoutRect(const FloatRect& rect)
 {
 #if ENABLE(SUBPIXEL_LAYOUT)
-    FractionalLayoutPoint location = flooredFractionalLayoutPoint(rect.minXMinYCorner());
-    FractionalLayoutPoint maxPoint = ceiledFractionalLayoutPoint(rect.maxXMaxYCorner());
+    LayoutPoint location = flooredLayoutPoint(rect.minXMinYCorner());
+    LayoutPoint maxPoint = ceiledLayoutPoint(rect.maxXMaxYCorner());
 
-    return FractionalLayoutRect(location, maxPoint - location);
+    return LayoutRect(location, maxPoint - location);
 #else
     return enclosingIntRect(rect);
 #endif
diff --git a/Source/WebCore/platform/graphics/LayoutRect.h b/Source/WebCore/platform/graphics/LayoutRect.h
new file mode 100644 (file)
index 0000000..9c32e70
--- /dev/null
@@ -0,0 +1,243 @@
+/*
+ * Copyright (c) 2012, 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 LayoutRect_h
+#define LayoutRect_h
+
+#include "IntRect.h"
+#include "LayoutBoxExtent.h"
+#include "LayoutPoint.h"
+#include <wtf/Vector.h>
+
+#if PLATFORM(QT)
+#include <qglobal.h>
+QT_BEGIN_NAMESPACE
+class QRect;
+class QRectF;
+QT_END_NAMESPACE
+#endif
+
+namespace WebCore {
+
+class FloatRect;
+
+class LayoutRect {
+public:
+    LayoutRect() { }
+    LayoutRect(const LayoutPoint& location, const LayoutSize& size)
+        : m_location(location), m_size(size) { }
+    LayoutRect(LayoutUnit x, LayoutUnit y, LayoutUnit width, LayoutUnit height)
+        : m_location(LayoutPoint(x, y)), m_size(LayoutSize(width, height)) { }
+    LayoutRect(const FloatPoint& location, const FloatSize& size)
+        : m_location(location), m_size(size) { }
+    LayoutRect(const IntRect& rect) : m_location(rect.location()), m_size(rect.size()) { }
+
+    explicit LayoutRect(const FloatRect&); // don't do this implicitly since it's lossy
+        
+    LayoutPoint location() const { return m_location; }
+    LayoutSize size() const { return m_size; }
+
+    IntPoint pixelSnappedLocation() const { return roundedIntPoint(m_location); }
+    IntSize pixelSnappedSize() const { return IntSize(snapSizeToPixel(m_size.width(), m_location.x()), snapSizeToPixel(m_size.height(), m_location.y())); }
+
+    void setLocation(const LayoutPoint& location) { m_location = location; }
+    void setSize(const LayoutSize& size) { m_size = size; }
+
+    LayoutUnit x() const { return m_location.x(); }
+    LayoutUnit y() const { return m_location.y(); }
+    LayoutUnit maxX() const { return x() + width(); }
+    LayoutUnit maxY() const { return y() + height(); }
+    LayoutUnit width() const { return m_size.width(); }
+    LayoutUnit height() const { return m_size.height(); }
+
+    int pixelSnappedX() const { return x().round(); }
+    int pixelSnappedY() const { return y().round(); }
+    int pixelSnappedWidth() const { return snapSizeToPixel(width(), x()); }
+    int pixelSnappedHeight() const { return snapSizeToPixel(height(), y()); }
+    int pixelSnappedMaxX() const { return (m_location.x() + m_size.width()).round(); }
+    int pixelSnappedMaxY() const { return (m_location.y() + m_size.height()).round(); }
+
+    void setX(LayoutUnit x) { m_location.setX(x); }
+    void setY(LayoutUnit y) { m_location.setY(y); }
+    void setWidth(LayoutUnit width) { m_size.setWidth(width); }
+    void setHeight(LayoutUnit height) { m_size.setHeight(height); }
+
+    bool isEmpty() const { return m_size.isEmpty(); }
+
+    // NOTE: The result is rounded to integer values, and thus may be not the exact
+    // center point.
+    LayoutPoint center() const { return LayoutPoint(x() + width() / 2, y() + height() / 2); }
+
+    void move(const LayoutSize& size) { m_location += size; } 
+    void moveBy(const LayoutPoint& offset) { m_location.move(offset.x(), offset.y()); }
+    void move(LayoutUnit dx, LayoutUnit dy) { m_location.move(dx, dy); } 
+
+    void expand(const LayoutSize& size) { m_size += size; }
+    void expand(const LayoutBoxExtent& box)
+    {
+        m_location.move(-box.left(), -box.top());
+        m_size.expand(box.left() + box.right(), box.top() + box.bottom());
+    }
+    void expand(LayoutUnit dw, LayoutUnit dh) { m_size.expand(dw, dh); }
+    void contract(const LayoutSize& size) { m_size -= size; }
+    void contract(LayoutUnit dw, LayoutUnit dh) { m_size.expand(-dw, -dh); }
+
+    void shiftXEdgeTo(LayoutUnit edge)
+    {
+        LayoutUnit delta = edge - x();
+        setX(edge);
+        setWidth(std::max<LayoutUnit>(0, width() - delta));
+    }
+    void shiftMaxXEdgeTo(LayoutUnit edge)
+    {
+        LayoutUnit delta = edge - maxX();
+        setWidth(std::max<LayoutUnit>(0, width() + delta));
+    }
+    void shiftYEdgeTo(LayoutUnit edge)
+    {
+        LayoutUnit delta = edge - y();
+        setY(edge);
+        setHeight(std::max<LayoutUnit>(0, height() - delta));
+    }
+    void shiftMaxYEdgeTo(LayoutUnit edge)
+    {
+        LayoutUnit delta = edge - maxY();
+        setHeight(std::max<LayoutUnit>(0, height() + delta));
+    }
+
+    LayoutPoint minXMinYCorner() const { return m_location; } // typically topLeft
+    LayoutPoint maxXMinYCorner() const { return LayoutPoint(m_location.x() + m_size.width(), m_location.y()); } // typically topRight
+    LayoutPoint minXMaxYCorner() const { return LayoutPoint(m_location.x(), m_location.y() + m_size.height()); } // typically bottomLeft
+    LayoutPoint maxXMaxYCorner() const { return LayoutPoint(m_location.x() + m_size.width(), m_location.y() + m_size.height()); } // typically bottomRight
+    
+    bool intersects(const LayoutRect&) const;
+    bool contains(const LayoutRect&) const;
+
+    // This checks to see if the rect contains x,y in the traditional sense.
+    // Equivalent to checking if the rect contains a 1x1 rect below and to the right of (px,py).
+    bool contains(LayoutUnit px, LayoutUnit py) const
+        { return px >= x() && px < maxX() && py >= y() && py < maxY(); }
+    bool contains(const LayoutPoint& point) const { return contains(point.x(), point.y()); }
+
+    void intersect(const LayoutRect&);
+    void unite(const LayoutRect&);
+    void uniteIfNonZero(const LayoutRect&);
+
+    void inflateX(LayoutUnit dx)
+    {
+        m_location.setX(m_location.x() - dx);
+        m_size.setWidth(m_size.width() + dx + dx);
+    }
+    void inflateY(LayoutUnit dy)
+    {
+        m_location.setY(m_location.y() - dy);
+        m_size.setHeight(m_size.height() + dy + dy);
+    }
+    void inflate(LayoutUnit d) { inflateX(d); inflateY(d); }
+    void scale(float s);
+
+    LayoutRect transposedRect() const { return LayoutRect(m_location.transposedPoint(), m_size.transposedSize()); }
+
+    static LayoutRect infiniteRect()
+    {
+        // Return a rect that is slightly smaller than the true max rect to allow pixelSnapping to round up to the nearest IntRect without overflowing.
+        return LayoutRect(LayoutUnit::nearlyMin() / 2, LayoutUnit::nearlyMin() / 2, LayoutUnit::nearlyMax(), LayoutUnit::nearlyMax());
+    }
+
+#if PLATFORM(QT)
+    explicit LayoutRect(const QRect&);
+    explicit LayoutRect(const QRectF&);
+    operator QRectF() const;
+#endif
+
+private:
+    LayoutPoint m_location;
+    LayoutSize m_size;
+};
+
+inline LayoutRect intersection(const LayoutRect& a, const LayoutRect& b)
+{
+    LayoutRect c = a;
+    c.intersect(b);
+    return c;
+}
+
+inline LayoutRect unionRect(const LayoutRect& a, const LayoutRect& b)
+{
+    LayoutRect c = a;
+    c.unite(b);
+    return c;
+}
+
+LayoutRect unionRect(const Vector<LayoutRect>&);
+
+inline bool operator==(const LayoutRect& a, const LayoutRect& b)
+{
+    return a.location() == b.location() && a.size() == b.size();
+}
+
+inline bool operator!=(const LayoutRect& a, const LayoutRect& b)
+{
+    return a.location() != b.location() || a.size() != b.size();
+}
+
+inline IntRect pixelSnappedIntRect(const LayoutRect& rect)
+{
+#if ENABLE(SUBPIXEL_LAYOUT)
+    return IntRect(roundedIntPoint(rect.location()), IntSize(snapSizeToPixel(rect.width(), rect.x()),
+                                                             snapSizeToPixel(rect.height(), rect.y())));
+
+#else
+    return IntRect(rect);
+#endif
+}
+
+IntRect enclosingIntRect(const LayoutRect&);
+LayoutRect enclosingLayoutRect(const FloatRect&);
+
+
+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 IntRect pixelSnappedIntRect(LayoutPoint location, LayoutSize size)
+{
+    return IntRect(roundedIntPoint(location), pixelSnappedIntSize(size, location));
+}
+
+} // namespace WebCore
+
+#endif // LayoutRect_h
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef FractionalLayoutSize_h
-#define FractionalLayoutSize_h
+#ifndef LayoutSize_h
+#define LayoutSize_h
 
 #include "FloatSize.h"
-#include "FractionalLayoutUnit.h"
 #include "IntSize.h"
+#include "LayoutUnit.h"
 
 #if PLATFORM(QT)
 #include <qglobal.h>
@@ -45,28 +45,28 @@ QT_END_NAMESPACE
 
 namespace WebCore {
 
-class FractionalLayoutPoint;
+class LayoutPoint;
 
-class FractionalLayoutSize {
+class LayoutSize {
 public:
-    FractionalLayoutSize() : m_width(0), m_height(0) { }
-    FractionalLayoutSize(const IntSize& size) : m_width(size.width()), m_height(size.height()) { }
-    FractionalLayoutSize(FractionalLayoutUnit width, FractionalLayoutUnit height) : m_width(width), m_height(height) { }
+    LayoutSize() : m_width(0), m_height(0) { }
+    LayoutSize(const IntSize& size) : m_width(size.width()), m_height(size.height()) { }
+    LayoutSize(LayoutUnit width, LayoutUnit height) : m_width(width), m_height(height) { }
 
-    explicit FractionalLayoutSize(const FloatSize& size) : m_width(size.width()), m_height(size.height()) { }
+    explicit LayoutSize(const FloatSize& size) : m_width(size.width()), m_height(size.height()) { }
     
-    FractionalLayoutUnit width() const { return m_width; }
-    FractionalLayoutUnit height() const { return m_height; }
+    LayoutUnit width() const { return m_width; }
+    LayoutUnit height() const { return m_height; }
 
-    void setWidth(FractionalLayoutUnit width) { m_width = width; }
-    void setHeight(FractionalLayoutUnit height) { m_height = height; }
+    void setWidth(LayoutUnit width) { m_width = width; }
+    void setHeight(LayoutUnit height) { m_height = height; }
 
     bool isEmpty() const { return m_width <= 0 || m_height <= 0; }
     bool isZero() const { return !m_width && !m_height; }
 
     float aspectRatio() const { return static_cast<float>(m_width) / static_cast<float>(m_height); }
     
-    void expand(FractionalLayoutUnit width, FractionalLayoutUnit height)
+    void expand(LayoutUnit width, LayoutUnit height)
     {
         m_width += width;
         m_height += height;
@@ -84,24 +84,24 @@ public:
         m_height *= heightScale;
     }
     
-    FractionalLayoutSize expandedTo(const FractionalLayoutSize& other) const
+    LayoutSize expandedTo(const LayoutSize& other) const
     {
-        return FractionalLayoutSize(m_width > other.m_width ? m_width : other.m_width,
+        return LayoutSize(m_width > other.m_width ? m_width : other.m_width,
             m_height > other.m_height ? m_height : other.m_height);
     }
 
-    FractionalLayoutSize shrunkTo(const FractionalLayoutSize& other) const
+    LayoutSize shrunkTo(const LayoutSize& other) const
     {
-        return FractionalLayoutSize(m_width < other.m_width ? m_width : other.m_width,
+        return LayoutSize(m_width < other.m_width ? m_width : other.m_width,
             m_height < other.m_height ? m_height : other.m_height);
     }
 
     void clampNegativeToZero()
     {
-        *this = expandedTo(FractionalLayoutSize());
+        *this = expandedTo(LayoutSize());
     }
     
-    void clampToMinimumSize(const FractionalLayoutSize& minimumSize)
+    void clampToMinimumSize(const LayoutSize& minimumSize)
     {
         if (m_width < minimumSize.width())
             m_width = minimumSize.width();
@@ -109,70 +109,79 @@ public:
             m_height = minimumSize.height();
     }
 
-    FractionalLayoutSize transposedSize() const
+    LayoutSize transposedSize() const
     {
-        return FractionalLayoutSize(m_height, m_width);
+        return LayoutSize(m_height, m_width);
     }
 
 #if PLATFORM(QT)
-    explicit FractionalLayoutSize(const QSize&);
-    explicit FractionalLayoutSize(const QSizeF&);
+    explicit LayoutSize(const QSize&);
+    explicit LayoutSize(const QSizeF&);
     operator QSizeF() const;
 #endif
 
 private:
-    FractionalLayoutUnit m_width, m_height;
+    LayoutUnit m_width, m_height;
 };
 
-inline FractionalLayoutSize& operator+=(FractionalLayoutSize& a, const FractionalLayoutSize& b)
+inline LayoutSize& operator+=(LayoutSize& a, const LayoutSize& b)
 {
     a.setWidth(a.width() + b.width());
     a.setHeight(a.height() + b.height());
     return a;
 }
 
-inline FractionalLayoutSize& operator-=(FractionalLayoutSize& a, const FractionalLayoutSize& b)
+inline LayoutSize& operator-=(LayoutSize& a, const LayoutSize& b)
 {
     a.setWidth(a.width() - b.width());
     a.setHeight(a.height() - b.height());
     return a;
 }
 
-inline FractionalLayoutSize operator+(const FractionalLayoutSize& a, const FractionalLayoutSize& b)
+inline LayoutSize operator+(const LayoutSize& a, const LayoutSize& b)
 {
-    return FractionalLayoutSize(a.width() + b.width(), a.height() + b.height());
+    return LayoutSize(a.width() + b.width(), a.height() + b.height());
 }
 
-inline FractionalLayoutSize operator-(const FractionalLayoutSize& a, const FractionalLayoutSize& b)
+inline LayoutSize operator-(const LayoutSize& a, const LayoutSize& b)
 {
-    return FractionalLayoutSize(a.width() - b.width(), a.height() - b.height());
+    return LayoutSize(a.width() - b.width(), a.height() - b.height());
 }
 
-inline FractionalLayoutSize operator-(const FractionalLayoutSize& size)
+inline LayoutSize operator-(const LayoutSize& size)
 {
-    return FractionalLayoutSize(-size.width(), -size.height());
+    return LayoutSize(-size.width(), -size.height());
 }
 
-inline bool operator==(const FractionalLayoutSize& a, const FractionalLayoutSize& b)
+inline bool operator==(const LayoutSize& a, const LayoutSize& b)
 {
     return a.width() == b.width() && a.height() == b.height();
 }
 
-inline bool operator!=(const FractionalLayoutSize& a, const FractionalLayoutSize& b)
+inline bool operator!=(const LayoutSize& a, const LayoutSize& b)
 {
     return a.width() != b.width() || a.height() != b.height();
 }
 
-inline IntSize flooredIntSize(const FractionalLayoutSize& s)
+inline IntSize flooredIntSize(const LayoutSize& s)
 {
     return IntSize(s.width().floor(), s.height().floor());
 }
 
-inline IntSize roundedIntSize(const FractionalLayoutSize& s)
+inline IntSize roundedIntSize(const LayoutSize& s)
 {
     return IntSize(s.width().round(), s.height().round());
 }
 
+inline LayoutSize roundedLayoutSize(const FloatSize& s)
+{
+#if ENABLE(SUBPIXEL_LAYOUT)
+    return LayoutSize(s);
+#else
+    return roundedIntSize(s);
+#endif
+}
+
 } // namespace WebCore
 
-#endif // FractionalLayoutSize_h
+#endif // LayoutSize_h
index bdeaaa0..2bd0a8e 100644 (file)
@@ -34,7 +34,7 @@
 
 #include "IntRect.h"
 #include "KURL.h"
-#include "LayoutTypesInlineMethods.h"
+#include "LayoutRect.h"
 #include "Timer.h"
 #include <wtf/Forward.h>
 #include <wtf/HashSet.h>
index edf0f12..8ad38b9 100644 (file)
@@ -35,7 +35,7 @@
 #include "CustomFilterParameterList.h"
 #include "CustomFilterProgram.h"
 #include "FilterOperation.h"
-#include "LayoutTypes.h"
+#include "LayoutSize.h"
 
 namespace WebCore {
 
index 426756e..2e128e7 100644 (file)
@@ -31,7 +31,7 @@
 #define CustomFilterParameterList_h
 
 #if ENABLE(CSS_SHADERS)
-#include "LayoutTypes.h"
+#include "LayoutSize.h"
 #include <wtf/Vector.h>
 
 namespace WebCore {
index 906706b..4894577 100644 (file)
@@ -30,7 +30,7 @@
 
 #include "Color.h"
 #include "FilterEffect.h"
-#include "LayoutTypes.h"
+#include "LayoutSize.h"
 #include "Length.h"
 #include <wtf/OwnPtr.h>
 #include <wtf/PassOwnPtr.h>
index beb649b..c1da85b 100644 (file)
@@ -29,7 +29,6 @@
 #if ENABLE(CSS_FILTERS)
 
 #include "FilterOperation.h"
-#include "LayoutTypes.h"
 #include <wtf/RefPtr.h>
 #include <wtf/Vector.h>
 
index 053f263..3103c01 100644 (file)
@@ -34,7 +34,7 @@
 
 #include "CustomFilterParameter.h"
 #include "CustomFilterValidatedProgram.h"
-#include "FractionalLayoutSize.h"
+#include "LayoutSize.h"
 #include <wtf/UnusedParam.h>
 
 namespace WebCore {
index 282a65f..ad2f93a 100644 (file)
@@ -34,7 +34,7 @@
 #include "CustomFilterConstants.h"
 #include "CustomFilterParameterList.h"
 #include "FilterOperation.h"
-#include "LayoutTypes.h"
+#include "LayoutSize.h"
 
 namespace WebCore {
 
 */
 
 #include "config.h"
-#include "FractionalLayoutPoint.h"
+#include "LayoutPoint.h"
 
 #include <QPoint>
 #include <QPointF>
 
 namespace WebCore {
 
-FractionalLayoutPoint::FractionalLayoutPoint(const QPoint& point)
+LayoutPoint::LayoutPoint(const QPoint& point)
     : m_x(point.x())
     , m_y(point.y())
 {
 }
 
-FractionalLayoutPoint::FractionalLayoutPoint(const QPointF& point)
+LayoutPoint::LayoutPoint(const QPointF& point)
     : m_x(point.x())
     , m_y(point.y())
 {
 }
 
-FractionalLayoutPoint::operator QPointF() const
+LayoutPoint::operator QPointF() const
 {
     return QPointF(m_x, m_y);
 }
 */
 
 #include "config.h"
-#include "FractionalLayoutRect.h"
+#include "LayoutRect.h"
 
 #include <QRect>
 #include <QRectF>
 
 namespace WebCore {
 
-FractionalLayoutRect::FractionalLayoutRect(const QRect& r)
+LayoutRect::LayoutRect(const QRect& r)
     : m_location(r.topLeft())
     , m_size(r.width(), r.height())
 {
 }
 
-FractionalLayoutRect::FractionalLayoutRect(const QRectF& r)
+LayoutRect::LayoutRect(const QRectF& r)
     : m_location(r.topLeft())
     , m_size(r.width(), r.height())
 {
 }
 
-FractionalLayoutRect::operator QRectF() const
+LayoutRect::operator QRectF() const
 {
     return QRectF(x(), y(), width(), height());
 }
 
 #include "config.h"
 
-#include "FractionalLayoutSize.h"
+#include "LayoutSize.h"
 
 #include <QSize>
 #include <QSizeF>
 
 namespace WebCore {
 
-FractionalLayoutSize::FractionalLayoutSize(const QSize& size)
+LayoutSize::LayoutSize(const QSize& size)
     : m_width(size.width())
     , m_height(size.height())
 {
 }
 
-FractionalLayoutSize::FractionalLayoutSize(const QSizeF& size)
+LayoutSize::LayoutSize(const QSizeF& size)
     : m_width(size.width())
     , m_height(size.height())
 {
 }
 
-FractionalLayoutSize::operator QSizeF() const
+LayoutSize::operator QSizeF() const
 {
     return QSizeF(width(), height());
 }
index b7e091b..5354f81 100644 (file)
@@ -25,7 +25,7 @@
 #ifndef TransformOperations_h
 #define TransformOperations_h
 
-#include "LayoutTypes.h"
+#include "LayoutSize.h"
 #include "TransformOperation.h"
 #include <wtf/RefPtr.h>
 #include <wtf/Vector.h>
index f34295f..1d1d355 100644 (file)
@@ -30,7 +30,7 @@
 #include "FloatPoint.h"
 #include "FloatQuad.h"
 #include "IntSize.h"
-#include "LayoutTypesInlineMethods.h"
+#include "LayoutSize.h"
 #include "TransformationMatrix.h"
 #include <wtf/OwnPtr.h>
 
index a2fb7b6..4b237f8 100644 (file)
@@ -31,8 +31,8 @@
 #include "FloatPoint3D.h"
 #include "FloatRect.h"
 #include "FloatQuad.h"
-#include "FractionalLayoutRect.h"
 #include "IntRect.h"
+#include "LayoutRect.h"
 
 #include <wtf/Assertions.h>
 #include <wtf/MathExtras.h>
@@ -617,10 +617,10 @@ FloatQuad TransformationMatrix::projectQuad(const FloatQuad& q, bool* clamped) c
 static float clampEdgeValue(float f)
 {
     ASSERT(!isnan(f));
-    return min<float>(max<float>(f, -FractionalLayoutUnit::max() / 2), FractionalLayoutUnit::max() / 2);
+    return min<float>(max<float>(f, -LayoutUnit::max() / 2), LayoutUnit::max() / 2);
 }
 
-FractionalLayoutRect TransformationMatrix::clampedBoundsOfProjectedQuad(const FloatQuad& q) const
+LayoutRect TransformationMatrix::clampedBoundsOfProjectedQuad(const FloatQuad& q) const
 {
     FloatRect mappedQuadBounds = projectQuad(q).boundingBox();
 
@@ -629,18 +629,17 @@ FractionalLayoutRect TransformationMatrix::clampedBoundsOfProjectedQuad(const Fl
 
     float right;
     if (isinf(mappedQuadBounds.x()) && isinf(mappedQuadBounds.width()))
-        right = FractionalLayoutUnit::max() / 2;
+        right = LayoutUnit::max() / 2;
     else
         right = clampEdgeValue(ceilf(mappedQuadBounds.maxX()));
 
     float bottom;
     if (isinf(mappedQuadBounds.y()) && isinf(mappedQuadBounds.height()))
-        bottom = FractionalLayoutUnit::max() / 2;
+        bottom = LayoutUnit::max() / 2;
     else
         bottom = clampEdgeValue(ceilf(mappedQuadBounds.maxY()));
 
-    return FractionalLayoutRect(FractionalLayoutUnit::clamp(left), FractionalLayoutUnit::clamp(top), 
-                                FractionalLayoutUnit::clamp(right - left), FractionalLayoutUnit::clamp(bottom - top));
+    return LayoutRect(LayoutUnit::clamp(left), LayoutUnit::clamp(top),  LayoutUnit::clamp(right - left), LayoutUnit::clamp(bottom - top));
 }
 
 FloatPoint TransformationMatrix::mapPoint(const FloatPoint& p) const
@@ -670,9 +669,9 @@ IntRect TransformationMatrix::mapRect(const IntRect &rect) const
     return enclosingIntRect(mapRect(FloatRect(rect)));
 }
 
-FractionalLayoutRect TransformationMatrix::mapRect(const FractionalLayoutRect& r) const
+LayoutRect TransformationMatrix::mapRect(const LayoutRect& r) const
 {
-    return enclosingFractionalLayoutRect(mapRect(FloatRect(r)));
+    return enclosingLayoutRect(mapRect(FloatRect(r)));
 }
 
 FloatRect TransformationMatrix::mapRect(const FloatRect& r) const
index 49e4b07..8b4d683 100644 (file)
@@ -64,7 +64,7 @@ namespace WebCore {
 
 class AffineTransform;
 class IntRect;
-class FractionalLayoutRect;
+class LayoutRect;
 class FloatPoint3D;
 class FloatRect;
 class FloatQuad;
@@ -157,7 +157,7 @@ public:
     // Rounds the resulting mapped rectangle out. This is helpful for bounding
     // box computations but may not be what is wanted in other contexts.
     IntRect mapRect(const IntRect&) const;
-    FractionalLayoutRect mapRect(const FractionalLayoutRect&) const;
+    LayoutRect mapRect(const LayoutRect&) const;
 
     // If the matrix has 3D components, the z component of the result is
     // dropped, effectively projecting the quad into the z=0 plane
@@ -173,7 +173,7 @@ public:
     FloatQuad projectQuad(const FloatQuad&,  bool* clamped = 0) const;
     // Projects the four corners of the quad and takes a bounding box,
     // while sanitizing values created when the w component is negative.
-    FractionalLayoutRect clampedBoundsOfProjectedQuad(const FloatQuad&) const;
+    LayoutRect clampedBoundsOfProjectedQuad(const FloatQuad&) const;
 
     double m11() const { return m_matrix[0][0]; }
     void setM11(double f) { m_matrix[0][0] = f; }
index 9f6120a..9d0adc1 100644 (file)
@@ -21,7 +21,7 @@
 #ifndef AutoTableLayout_h
 #define AutoTableLayout_h
 
-#include "LayoutTypes.h"
+#include "LayoutUnit.h"
 #include "Length.h"
 #include "TableLayout.h"
 #include <wtf/Vector.h>
index dc2584d..2d5638a 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef ColumnInfo_h
 #define ColumnInfo_h
 
-#include "LayoutTypesInlineMethods.h"
+#include "LayoutUnit.h"
 #include <wtf/Vector.h>
 
 namespace WebCore {
index cd93b5f..8be114d 100644 (file)
@@ -34,7 +34,7 @@
 
 #include "ExclusionShape.h"
 #include "FloatRect.h"
-#include "LayoutTypesInlineMethods.h"
+#include "LayoutUnit.h"
 #include <wtf/OwnPtr.h>
 #include <wtf/PassOwnPtr.h>
 #include <wtf/Vector.h>
@@ -78,14 +78,14 @@ private:
     {
         ASSERT(m_shape);
         // Use fromFloatCeil() to ensure that the returned LayoutUnit value is within the shape's bounds.
-        return FractionalLayoutUnit::fromFloatCeil(m_shape->shapeLogicalBoundingBox().y());
+        return LayoutUnit::fromFloatCeil(m_shape->shapeLogicalBoundingBox().y());
     }
 
     inline LayoutUnit shapeLogicalBoundsMaxY() const
     {
         ASSERT(m_shape);
         // Use fromFloatFloor() to ensure that the returned LayoutUnit value is within the shape's bounds.
-        return FractionalLayoutUnit::fromFloatFloor(m_shape->shapeLogicalBoundingBox().maxY());
+        return LayoutUnit::fromFloatFloor(m_shape->shapeLogicalBoundingBox().maxY());
     }
 
     RenderBlock* m_block;
index 4304e16..f73188f 100644 (file)
 #include "FilterEffect.h"
 #include "FilterOperations.h"
 #include "FloatRect.h"
-#include "FractionalLayoutRect.h"
 #include "GraphicsContext.h"
 #include "ImageBuffer.h"
-#include "LayoutTypesInlineMethods.h"
+#include "LayoutRect.h"
 #include "SVGFilterBuilder.h"
 #include "SourceGraphic.h"
 
index f1d9d02..21ed65c 100644 (file)
@@ -21,7 +21,7 @@
 #ifndef FixedTableLayout_h
 #define FixedTableLayout_h
 
-#include "LayoutTypes.h"
+#include "LayoutUnit.h"
 #include "Length.h"
 #include "TableLayout.h"
 #include <wtf/Vector.h>
index ebf886c..46d05bc 100644 (file)
@@ -23,7 +23,7 @@
 #ifndef GapRects_h
 #define GapRects_h
 
-#include "LayoutTypes.h"
+#include "LayoutRect.h"
 
 namespace WebCore {
 
index 9129eed..7b3c19e 100644 (file)
@@ -25,7 +25,7 @@
 #include "FloatQuad.h"
 #include "FloatRect.h"
 #include "HitTestRequest.h"
-#include "LayoutTypesInlineMethods.h"
+#include "LayoutRect.h"
 #include "TextDirection.h"
 #include <wtf/Forward.h>
 #include <wtf/ListHashSet.h>
index 6d6c33e..cb3fc84 100644 (file)
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "HitTestingTransformState.h"
 
-#include "FractionalLayoutRect.h"
+#include "LayoutRect.h"
 #include <wtf/PassOwnPtr.h>
 
 namespace WebCore {
@@ -80,7 +80,7 @@ FloatQuad HitTestingTransformState::mappedArea() const
     return m_accumulatedTransform.inverse().projectQuad(m_lastPlanarArea);
 }
 
-FractionalLayoutRect HitTestingTransformState::boundsOfMappedArea() const
+LayoutRect HitTestingTransformState::boundsOfMappedArea() const
 {
     return m_accumulatedTransform.inverse().clampedBoundsOfProjectedQuad(m_lastPlanarArea);
 }
index b583038..95ec25b 100644 (file)
@@ -59,7 +59,7 @@ public:
     FloatPoint mappedPoint() const;
     FloatQuad mappedQuad() const;
     FloatQuad mappedArea() const;
-    FractionalLayoutRect boundsOfMappedArea() const;
+    LayoutRect boundsOfMappedArea() const;
     void flatten();
 
     FloatPoint m_lastPlanarPoint;
index 66bc11e..36aaf95 100644 (file)
@@ -677,8 +677,8 @@ void InlineFlowBox::placeBoxesInBlockDirection(LayoutUnit top, LayoutUnit maxHei
 
                 RenderRubyRun* rubyRun = toRenderRubyRun(curr->renderer());
                 if (RenderRubyBase* rubyBase = rubyRun->rubyBase()) {
-                    LayoutUnit bottomRubyBaseLeading = (curr->logicalHeight() - rubyBase->logicalBottom()) + rubyBase->logicalHeight() - (rubyBase->lastRootBox() ? rubyBase->lastRootBox()->lineBottom() : ZERO_LAYOUT_UNIT);
-                    LayoutUnit topRubyBaseLeading = rubyBase->logicalTop() + (rubyBase->firstRootBox() ? rubyBase->firstRootBox()->lineTop() : ZERO_LAYOUT_UNIT);
+                    LayoutUnit bottomRubyBaseLeading = (curr->logicalHeight() - rubyBase->logicalBottom()) + rubyBase->logicalHeight() - (rubyBase->lastRootBox() ? rubyBase->lastRootBox()->lineBottom() : LayoutUnit());
+                    LayoutUnit topRubyBaseLeading = rubyBase->logicalTop() + (rubyBase->firstRootBox() ? rubyBase->firstRootBox()->lineTop() : LayoutUnit());
                     newLogicalTop += !renderer()->style()->isFlippedLinesWritingMode() ? topRubyBaseLeading : bottomRubyBaseLeading;
                     boxHeight -= (topRubyBaseLeading + bottomRubyBaseLeading);
                 }
@@ -791,7 +791,7 @@ inline void InlineFlowBox::addBorderOutsetVisualOverflow(LayoutRect& logicalVisu
     if (!style->hasBorderImageOutsets())
         return;
 
-    FractionalLayoutBoxExtent borderOutsets = style->borderImageOutsets();
+    LayoutBoxExtent borderOutsets = style->borderImageOutsets();
 
     LayoutUnit borderOutsetLogicalTop = borderOutsets.logicalTop(style->writingMode());
     LayoutUnit borderOutsetLogicalBottom = borderOutsets.logicalBottom(style->writingMode());
@@ -806,8 +806,8 @@ inline void InlineFlowBox::addBorderOutsetVisualOverflow(LayoutRect& logicalVisu
     LayoutUnit logicalTopVisualOverflow = min(pixelSnappedLogicalTop() - outsetLogicalTop, logicalVisualOverflow.y());
     LayoutUnit logicalBottomVisualOverflow = max(pixelSnappedLogicalBottom() + outsetLogicalBottom, logicalVisualOverflow.maxY());
 
-    LayoutUnit outsetLogicalLeft = includeLogicalLeftEdge() ? borderOutsetLogicalLeft : ZERO_LAYOUT_UNIT;
-    LayoutUnit outsetLogicalRight = includeLogicalRightEdge() ? borderOutsetLogicalRight : ZERO_LAYOUT_UNIT;
+    LayoutUnit outsetLogicalLeft = includeLogicalLeftEdge() ? borderOutsetLogicalLeft : LayoutUnit();
+    LayoutUnit outsetLogicalRight = includeLogicalRightEdge() ? borderOutsetLogicalRight : LayoutUnit();
 
     LayoutUnit logicalLeftVisualOverflow = min(pixelSnappedLogicalLeft() - outsetLogicalLeft, logicalVisualOverflow.x());
     LayoutUnit logicalRightVisualOverflow = max(pixelSnappedLogicalRight() + outsetLogicalRight, logicalVisualOverflow.maxX());
@@ -1142,8 +1142,8 @@ void InlineFlowBox::paintFillLayer(const PaintInfo& paintInfo, const Color& c, c
             for (InlineFlowBox* curr = this; curr; curr = curr->prevLineBox())
                 totalLogicalWidth += curr->logicalWidth();
         }
-        LayoutUnit stripX = rect.x() - (isHorizontal() ? logicalOffsetOnLine : ZERO_LAYOUT_UNIT);
-        LayoutUnit stripY = rect.y() - (isHorizontal() ? ZERO_LAYOUT_UNIT : logicalOffsetOnLine);
+        LayoutUnit stripX = rect.x() - (isHorizontal() ? logicalOffsetOnLine : LayoutUnit());
+        LayoutUnit stripY = rect.y() - (isHorizontal() ? LayoutUnit() : logicalOffsetOnLine);
         LayoutUnit stripWidth = isHorizontal() ? totalLogicalWidth : static_cast<LayoutUnit>(width());
         LayoutUnit stripHeight = isHorizontal() ? static_cast<LayoutUnit>(height()) : totalLogicalWidth;
 
@@ -1269,8 +1269,8 @@ void InlineFlowBox::paintBoxDecorations(PaintInfo& paintInfo, const LayoutPoint&
                 LayoutUnit totalLogicalWidth = logicalOffsetOnLine;
                 for (InlineFlowBox* curr = this; curr; curr = curr->nextLineBox())
                     totalLogicalWidth += curr->logicalWidth();
-                LayoutUnit stripX = adjustedPaintoffset.x() - (isHorizontal() ? logicalOffsetOnLine : ZERO_LAYOUT_UNIT);
-                LayoutUnit stripY = adjustedPaintoffset.y() - (isHorizontal() ? ZERO_LAYOUT_UNIT : logicalOffsetOnLine);
+                LayoutUnit stripX = adjustedPaintoffset.x() - (isHorizontal() ? logicalOffsetOnLine : LayoutUnit());
+                LayoutUnit stripY = adjustedPaintoffset.y() - (isHorizontal() ? LayoutUnit() : logicalOffsetOnLine);
                 LayoutUnit stripWidth = isHorizontal() ? totalLogicalWidth : frameRect.width();
                 LayoutUnit stripHeight = isHorizontal() ? frameRect.height() : totalLogicalWidth;
 
@@ -1341,8 +1341,8 @@ void InlineFlowBox::paintMask(PaintInfo& paintInfo, const LayoutPoint& paintOffs
         LayoutUnit totalLogicalWidth = logicalOffsetOnLine;
         for (InlineFlowBox* curr = this; curr; curr = curr->nextLineBox())
             totalLogicalWidth += curr->logicalWidth();
-        LayoutUnit stripX = adjustedPaintOffset.x() - (isHorizontal() ? logicalOffsetOnLine : ZERO_LAYOUT_UNIT);
-        LayoutUnit stripY = adjustedPaintOffset.y() - (isHorizontal() ? ZERO_LAYOUT_UNIT : logicalOffsetOnLine);
+        LayoutUnit stripX = adjustedPaintOffset.x() - (isHorizontal() ? logicalOffsetOnLine : LayoutUnit());
+        LayoutUnit stripY = adjustedPaintOffset.y() - (isHorizontal() ? LayoutUnit() : logicalOffsetOnLine);
         LayoutUnit stripWidth = isHorizontal() ? totalLogicalWidth : frameRect.width();
         LayoutUnit stripHeight = isHorizontal() ? frameRect.height() : totalLogicalWidth;
 
@@ -1439,7 +1439,7 @@ LayoutUnit InlineFlowBox::computeOverAnnotationAdjustment(LayoutUnit allowedPosi
                 continue;
             
             if (!rubyRun->style()->isFlippedLinesWritingMode()) {
-                LayoutUnit topOfFirstRubyTextLine = rubyText->logicalTop() + (rubyText->firstRootBox() ? rubyText->firstRootBox()->lineTop() : ZERO_LAYOUT_UNIT);
+                LayoutUnit topOfFirstRubyTextLine = rubyText->logicalTop() + (rubyText->firstRootBox() ? rubyText->firstRootBox()->lineTop() : LayoutUnit());
                 if (topOfFirstRubyTextLine >= 0)
                     continue;
                 topOfFirstRubyTextLine += curr->logicalTop();
index 48b720c..44bdd58 100644 (file)
@@ -209,7 +209,7 @@ public:
     // respectively are flipped when compared to their physical counterparts.  For example minX is on the left in vertical-lr, but it is on the right in vertical-rl.
     LayoutRect layoutOverflowRect(LayoutUnit lineTop, LayoutUnit lineBottom) const
     { 
-        return m_overflow ? m_overflow->layoutOverflowRect() : enclosingLayoutRect(frameRectIncludingLineHeight(lineTop, lineBottom));
+        return m_overflow ? m_overflow->layoutOverflowRect() : enclosingIntRect(frameRectIncludingLineHeight(lineTop, lineBottom));
     }
     LayoutUnit logicalLeftLayoutOverflow() const
     {
@@ -243,7 +243,7 @@ public:
 
     LayoutRect visualOverflowRect(LayoutUnit lineTop, LayoutUnit lineBottom) const
     { 
-        return m_overflow ? m_overflow->visualOverflowRect() : enclosingLayoutRect(frameRectIncludingLineHeight(lineTop, lineBottom));
+        return m_overflow ? m_overflow->visualOverflowRect() : enclosingIntRect(frameRectIncludingLineHeight(lineTop, lineBottom));
     }
     LayoutUnit logicalLeftVisualOverflow() const { return m_overflow ? (isHorizontal() ? m_overflow->visualOverflowRect().x() : m_overflow->visualOverflowRect().y()) : static_cast<LayoutUnit>(logicalLeft()); }
     LayoutUnit logicalRightVisualOverflow() const { return m_overflow ? (isHorizontal() ? m_overflow->visualOverflowRect().maxX() : m_overflow->visualOverflowRect().maxY()) : static_cast<LayoutUnit>(ceilf(logicalRight())); }
index d074b84..0658ea8 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef LayoutRepainter_h
 #define LayoutRepainter_h
 
-#include "LayoutTypesInlineMethods.h"
+#include "LayoutRect.h"
 
 namespace WebCore {
 
index 6c3cfe5..16e0100 100644 (file)
@@ -27,7 +27,7 @@
 #define LayoutState_h
 
 #include "ColumnInfo.h"
-#include "LayoutTypes.h"
+#include "LayoutRect.h"
 #include <wtf/HashMap.h>
 #include <wtf/Noncopyable.h>
 
diff --git a/Source/WebCore/rendering/LayoutTypes.h b/Source/WebCore/rendering/LayoutTypes.h
deleted file mode 100644 (file)
index ff7e6c2..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * 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.
- */
-
-// These typedefs are being used to abstract layout and hit testing off
-// of integers and eventually replace them with floats. Once this transition
-// is complete, these types will be removed. Progress can be tracked at
-// https://bugs.webkit.org/show_bug.cgi?id=60318
-
-#ifndef LayoutTypes_h
-#define LayoutTypes_h
-
-namespace WebCore {
-
-class FractionalLayoutBoxExtent;
-class FractionalLayoutPoint;
-class FractionalLayoutRect;
-class FractionalLayoutSize;
-class FractionalLayoutUnit;
-
-typedef FractionalLayoutBoxExtent LayoutBoxExtent;
-typedef FractionalLayoutPoint LayoutPoint;
-typedef FractionalLayoutRect LayoutRect;
-typedef FractionalLayoutSize LayoutSize;
-typedef FractionalLayoutUnit LayoutUnit;
-
-#define MAX_LAYOUT_UNIT LayoutUnit::max()
-#define MIN_LAYOUT_UNIT LayoutUnit::min()
-#define ZERO_LAYOUT_UNIT LayoutUnit(0)
-
-} // namespace WebCore
-
-#endif // LayoutTypes_h
diff --git a/Source/WebCore/rendering/LayoutTypesInlineMethods.h b/Source/WebCore/rendering/LayoutTypesInlineMethods.h
deleted file mode 100644 (file)
index 3cb4a0f..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * 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
index 88a3c7a..2781496 100644 (file)
@@ -32,7 +32,7 @@
 
 #include "GraphicsContext.h"
 #include "IntRect.h"
-#include "LayoutTypesInlineMethods.h"
+#include "LayoutRect.h"
 #include "PaintPhase.h"
 #include <limits>
 #include <wtf/HashMap.h>
index 4708985..ce55070 100644 (file)
@@ -181,8 +181,8 @@ RenderBlock::MarginInfo::MarginInfo(RenderBlock* block, LayoutUnit beforeBorderP
     m_quirkContainer = block->isTableCell() || block->isBody() || blockStyle->marginBeforeCollapse() == MDISCARD
         || blockStyle->marginAfterCollapse() == MDISCARD;
 
-    m_positiveMargin = m_canCollapseMarginBeforeWithChildren ? block->maxPositiveMarginBefore() : ZERO_LAYOUT_UNIT;
-    m_negativeMargin = m_canCollapseMarginBeforeWithChildren ? block->maxNegativeMarginBefore() : ZERO_LAYOUT_UNIT;
+    m_positiveMargin = m_canCollapseMarginBeforeWithChildren ? block->maxPositiveMarginBefore() : LayoutUnit();
+    m_negativeMargin = m_canCollapseMarginBeforeWithChildren ? block->maxNegativeMarginBefore() : LayoutUnit();
 }
 
 // -------------------------------------------------------------------------------------------------------
@@ -1294,7 +1294,7 @@ bool RenderBlock::isSelfCollapsingBlock() const
     // (c) have border/padding,
     // (d) have a min-height
     // (e) have specified that one of our margins can't collapse using a CSS extension
-    if (logicalHeight() > ZERO_LAYOUT_UNIT
+    if (logicalHeight() > 0
         || isTable() || borderAndPaddingLogicalHeight()
         || style()->logicalMinHeight().isPositive()
         || style()->marginBeforeCollapse() == MSEPARATE || style()->marginAfterCollapse() == MSEPARATE)
@@ -1426,7 +1426,7 @@ void RenderBlock::updateRegionsAndExclusionsLogicalSize()
 
     // Compute the maximum logical height content may cause this block to expand to
     // FIXME: These should eventually use the const computeLogicalHeight rather than updateLogicalHeight
-    setLogicalHeight(MAX_LAYOUT_UNIT / 2);
+    setLogicalHeight(LayoutUnit::max() / 2);
     updateLogicalHeight();
 
 #if ENABLE(CSS_EXCLUSIONS)
@@ -1447,7 +1447,7 @@ void RenderBlock::computeExclusionShapeSize()
     ExclusionShapeInsideInfo* exclusionShapeInsideInfo = this->exclusionShapeInsideInfo();
     if (exclusionShapeInsideInfo) {
         bool percentageLogicalHeightResolvable = percentageLogicalHeightIsResolvableFromBlock(this, false);
-        exclusionShapeInsideInfo->computeShapeSize(logicalWidth(), percentageLogicalHeightResolvable ? logicalHeight() : ZERO_LAYOUT_UNIT);
+        exclusionShapeInsideInfo->computeShapeSize(logicalWidth(), percentageLogicalHeightResolvable ? logicalHeight() : LayoutUnit());
     }
 }
 #endif
@@ -1478,11 +1478,11 @@ void RenderBlock::checkForPaginationLogicalHeightChange(LayoutUnit& pageLogicalH
             // avoid doing two layout passes.
             updateLogicalHeight();
             LayoutUnit columnHeight = contentLogicalHeight();
-            if (columnHeight > ZERO_LAYOUT_UNIT) {
+            if (columnHeight > 0) {
                 pageLogicalHeight = columnHeight;
                 hasSpecifiedPageLogicalHeight = true;
             }
-            setLogicalHeight(ZERO_LAYOUT_UNIT);
+            setLogicalHeight(0);
         }
         if (colInfo->columnHeight() != pageLogicalHeight && everHadLayout()) {
             colInfo->setColumnHeight(pageLogicalHeight);
@@ -1519,7 +1519,7 @@ void RenderBlock::layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeigh
     clearFloats();
 
     LayoutUnit previousHeight = logicalHeight();
-    setLogicalHeight(ZERO_LAYOUT_UNIT);
+    setLogicalHeight(0);
 
     bool pageLogicalHeightChanged = false;
     bool hasSpecifiedPageLogicalHeight = false;
@@ -1555,9 +1555,9 @@ void RenderBlock::layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeigh
         setPaginationStrut(0);
     }
 
-    LayoutUnit repaintLogicalTop = ZERO_LAYOUT_UNIT;
-    LayoutUnit repaintLogicalBottom = ZERO_LAYOUT_UNIT;
-    LayoutUnit maxFloatLogicalBottom = ZERO_LAYOUT_UNIT;
+    LayoutUnit repaintLogicalTop = 0;
+    LayoutUnit repaintLogicalBottom = 0;
+    LayoutUnit maxFloatLogicalBottom = 0;
     if (!firstChild() && !isAnonymousBlock())
         setChildrenInline(true);
     if (childrenInline())
@@ -1694,9 +1694,9 @@ void RenderBlock::computeOverflow(LayoutUnit oldClientAfterEdge, bool recomputeF
         LayoutRect clientRect(clientBoxRect());
         LayoutRect rectToApply;
         if (isHorizontalWritingMode())
-            rectToApply = LayoutRect(clientRect.x(), clientRect.y(), 1, max(ZERO_LAYOUT_UNIT, oldClientAfterEdge - clientRect.y()));
+            rectToApply = LayoutRect(clientRect.x(), clientRect.y(), 1, max<LayoutUnit>(0, oldClientAfterEdge - clientRect.y()));
         else
-            rectToApply = LayoutRect(clientRect.x(), clientRect.y(), max(ZERO_LAYOUT_UNIT, oldClientAfterEdge - clientRect.x()), 1);
+            rectToApply = LayoutRect(clientRect.x(), clientRect.y(), max<LayoutUnit>(0, oldClientAfterEdge - clientRect.x()), 1);
         addLayoutOverflow(rectToApply);
     }
         
@@ -1809,7 +1809,7 @@ void RenderBlock::adjustFloatingBlock(const MarginInfo& marginInfo)
     // for by simply calling canCollapseWithMarginBefore.  See
     // http://www.hixie.ch/tests/adhoc/css/box/block/margin-collapse/046.html for
     // an example of this scenario.
-    LayoutUnit marginOffset = marginInfo.canCollapseWithMarginBefore() ? ZERO_LAYOUT_UNIT : marginInfo.margin();
+    LayoutUnit marginOffset = marginInfo.canCollapseWithMarginBefore() ? LayoutUnit() : marginInfo.margin();
     setLogicalHeight(logicalHeight() + marginOffset);
     positionNewFloats();
     setLogicalHeight(logicalHeight() - marginOffset);
@@ -2209,8 +2209,8 @@ LayoutUnit RenderBlock::estimateLogicalTopPosition(RenderBox* child, const Margi
     // relayout if there are intruding floats.
     LayoutUnit logicalTopEstimate = logicalHeight();
     if (!marginInfo.canCollapseWithMarginBefore()) {
-        LayoutUnit positiveMarginBefore = ZERO_LAYOUT_UNIT;
-        LayoutUnit negativeMarginBefore = ZERO_LAYOUT_UNIT;
+        LayoutUnit positiveMarginBefore = 0;
+        LayoutUnit negativeMarginBefore = 0;
         if (child->selfNeedsLayout()) {
             // Try to do a basic estimation of how the collapse is going to go.
             marginBeforeEstimateForChild(child, positiveMarginBefore, negativeMarginBefore);
@@ -2799,9 +2799,9 @@ void RenderBlock::paintColumnRules(PaintInfo& paintInfo, const LayoutPoint& pain
 
     if (colInfo->progressionAxis() == ColumnInfo::InlineAxis) {
         bool leftToRight = style()->isLeftToRightDirection() ^ colInfo->progressionIsReversed();
-        LayoutUnit currLogicalLeftOffset = leftToRight ? ZERO_LAYOUT_UNIT : contentLogicalWidth();
+        LayoutUnit currLogicalLeftOffset = leftToRight ? LayoutUnit() : contentLogicalWidth();
         LayoutUnit ruleAdd = logicalLeftOffsetForContent();
-        LayoutUnit ruleLogicalLeft = leftToRight ? ZERO_LAYOUT_UNIT : contentLogicalWidth();
+        LayoutUnit ruleLogicalLeft = leftToRight ? LayoutUnit() : contentLogicalWidth();
         LayoutUnit inlineDirectionSize = colInfo->desiredColumnWidth();
         BoxSide boxSide = isHorizontalWritingMode()
             ? leftToRight ? BSLeft : BSRight
@@ -2991,7 +2991,7 @@ bool RenderBlock::paintChild(RenderBox* child, PaintInfo& paintInfo, const Layou
     if (checkAfterAlways
         && (absoluteChildY + child->height()) > paintInfo.rect.y()
         && (absoluteChildY + child->height()) < paintInfo.rect.maxY()) {
-        view()->setBestTruncatedAt(absoluteChildY + child->height() + max(ZERO_LAYOUT_UNIT, child->collapsedMarginAfter()), this, true);
+        view()->setBestTruncatedAt(absoluteChildY + child->height() + max<LayoutUnit>(0, child->collapsedMarginAfter()), this, true);
         return false;
     }
     return true;
@@ -3517,14 +3517,14 @@ LayoutRect RenderBlock::blockSelectionGap(RenderBlock* rootBlock, const LayoutPo
 {
     LayoutUnit logicalTop = lastLogicalTop;
     LayoutUnit logicalHeight = blockDirectionOffset(rootBlock, offsetFromRootBlock) + logicalBottom - logicalTop;
-    if (logicalHeight <= ZERO_LAYOUT_UNIT)
+    if (logicalHeight <= 0)
         return LayoutRect();
 
     // Get the selection offsets for the bottom of the gap
     LayoutUnit logicalLeft = max(lastLogicalLeft, logicalLeftSelectionOffset(rootBlock, logicalBottom));
     LayoutUnit logicalRight = min(lastLogicalRight, logicalRightSelectionOffset(rootBlock, logicalBottom));
     LayoutUnit logicalWidth = logicalRight - logicalLeft;
-    if (logicalWidth <= ZERO_LAYOUT_UNIT)
+    if (logicalWidth <= 0)
         return LayoutRect();
 
     LayoutRect gapRect = rootBlock->logicalRectToPhysicalRect(rootBlockPhysicalPosition, LayoutRect(logicalLeft, logicalTop, logicalWidth, logicalHeight));
@@ -3540,7 +3540,7 @@ LayoutRect RenderBlock::logicalLeftSelectionGap(RenderBlock* rootBlock, const La
     LayoutUnit rootBlockLogicalLeft = max(logicalLeftSelectionOffset(rootBlock, logicalTop), logicalLeftSelectionOffset(rootBlock, logicalTop + logicalHeight));
     LayoutUnit rootBlockLogicalRight = min(inlineDirectionOffset(rootBlock, offsetFromRootBlock) + floorToInt(logicalLeft), min(logicalRightSelectionOffset(rootBlock, logicalTop), logicalRightSelectionOffset(rootBlock, logicalTop + logicalHeight)));
     LayoutUnit rootBlockLogicalWidth = rootBlockLogicalRight - rootBlockLogicalLeft;
-    if (rootBlockLogicalWidth <= ZERO_LAYOUT_UNIT)
+    if (rootBlockLogicalWidth <= 0)
         return LayoutRect();
 
     LayoutRect gapRect = rootBlock->logicalRectToPhysicalRect(rootBlockPhysicalPosition, LayoutRect(rootBlockLogicalLeft, rootBlockLogicalTop, rootBlockLogicalWidth, logicalHeight));
@@ -3556,7 +3556,7 @@ LayoutRect RenderBlock::logicalRightSelectionGap(RenderBlock* rootBlock, const L
     LayoutUnit rootBlockLogicalLeft = max(inlineDirectionOffset(rootBlock, offsetFromRootBlock) + floorToInt(logicalRight), max(logicalLeftSelectionOffset(rootBlock, logicalTop), logicalLeftSelectionOffset(rootBlock, logicalTop + logicalHeight)));
     LayoutUnit rootBlockLogicalRight = min(logicalRightSelectionOffset(rootBlock, logicalTop), logicalRightSelectionOffset(rootBlock, logicalTop + logicalHeight));
     LayoutUnit rootBlockLogicalWidth = rootBlockLogicalRight - rootBlockLogicalLeft;
-    if (rootBlockLogicalWidth <= ZERO_LAYOUT_UNIT)
+    if (rootBlockLogicalWidth <= 0)
         return LayoutRect();
 
     LayoutRect gapRect = rootBlock->logicalRectToPhysicalRect(rootBlockPhysicalPosition, LayoutRect(rootBlockLogicalLeft, rootBlockLogicalTop, rootBlockLogicalWidth, logicalHeight));
@@ -3816,8 +3816,8 @@ void RenderBlock::removeFloatingObject(RenderBox* o)
                 LayoutUnit logicalBottom = logicalBottomForFloat(r);
 
                 // Fix for https://bugs.webkit.org/show_bug.cgi?id=54995.
-                if (logicalBottom < 0 || logicalBottom < logicalTop || logicalTop == MAX_LAYOUT_UNIT)
-                    logicalBottom = MAX_LAYOUT_UNIT;
+                if (logicalBottom < 0 || logicalBottom < logicalTop || logicalTop == LayoutUnit::max())
+                    logicalBottom = LayoutUnit::max();
                 else {
                     // Special-case zero- and less-than-zero-height floats: those don't touch
                     // the line that they're on, but it still needs to be dirtied. This is
@@ -4270,7 +4270,7 @@ LayoutUnit RenderBlock::nextFloatLogicalBottomBelow(LayoutUnit logicalHeight) co
     if (!m_floatingObjects)
         return logicalHeight;
 
-    LayoutUnit bottom = MAX_LAYOUT_UNIT;
+    LayoutUnit bottom = LayoutUnit::max();
     const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
     FloatingObjectSetIterator end = floatingObjectSet.end();
     for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++it) {
@@ -4280,14 +4280,14 @@ LayoutUnit RenderBlock::nextFloatLogicalBottomBelow(LayoutUnit logicalHeight) co
             bottom = min(floatBottom, bottom);
     }
 
-    return bottom == MAX_LAYOUT_UNIT ? ZERO_LAYOUT_UNIT : bottom;
+    return bottom == LayoutUnit::max() ? LayoutUnit() : bottom;
 }
 
 LayoutUnit RenderBlock::lowestFloatLogicalBottom(FloatingObject::Type floatType) const
 {
     if (!m_floatingObjects)
-        return ZERO_LAYOUT_UNIT;
-    LayoutUnit lowestFloatBottom = ZERO_LAYOUT_UNIT;
+        return 0;
+    LayoutUnit lowestFloatBottom = 0;
     const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
     FloatingObjectSetIterator end = floatingObjectSet.end();
     for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++it) {
@@ -4305,7 +4305,7 @@ void RenderBlock::markLinesDirtyInBlockRange(LayoutUnit logicalTop, LayoutUnit l
 
     RootInlineBox* lowestDirtyLine = lastRootBox();
     RootInlineBox* afterLowest = lowestDirtyLine;
-    while (lowestDirtyLine && lowestDirtyLine->lineBottomWithLeading() >= logicalBottom && logicalBottom < MAX_LAYOUT_UNIT) {
+    while (lowestDirtyLine && lowestDirtyLine->lineBottomWithLeading() >= logicalBottom && logicalBottom < LayoutUnit::max()) {
         afterLowest = lowestDirtyLine;
         lowestDirtyLine = lowestDirtyLine->prevRootBox();
     }
@@ -4396,8 +4396,8 @@ void RenderBlock::clearFloats()
         addIntrudingFloats(block, logicalLeftOffset, logicalTopOffset);
 
     if (childrenInline()) {
-        LayoutUnit changeLogicalTop = MAX_LAYOUT_UNIT;
-        LayoutUnit changeLogicalBottom = MIN_LAYOUT_UNIT;
+        LayoutUnit changeLogicalTop = LayoutUnit::max();
+        LayoutUnit changeLogicalBottom = LayoutUnit::min();
         if (m_floatingObjects) {
             const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
             FloatingObjectSetIterator end = floatingObjectSet.end();
@@ -4478,7 +4478,7 @@ LayoutUnit RenderBlock::addOverhangingFloats(RenderBlock* child, bool makeChildP
     FloatingObjectSetIterator childEnd = child->m_floatingObjects->set().end();
     for (FloatingObjectSetIterator childIt = child->m_floatingObjects->set().begin(); childIt != childEnd; ++childIt) {
         FloatingObject* r = *childIt;
-        LayoutUnit logicalBottomForFloat = min(this->logicalBottomForFloat(r), MAX_LAYOUT_UNIT - childLogicalTop);
+        LayoutUnit logicalBottomForFloat = min(this->logicalBottomForFloat(r), LayoutUnit::max() - childLogicalTop);
         LayoutUnit logicalBottom = childLogicalTop + logicalBottomForFloat;
         lowestFloatLogicalBottom = max(lowestFloatLogicalBottom, logicalBottom);
 
@@ -4663,7 +4663,7 @@ LayoutUnit RenderBlock::getClearDelta(RenderBox* child, LayoutUnit logicalTop)
     }
 
     // We also clear floats if we are too big to sit on the same line as a float (and wish to avoid floats by default).
-    LayoutUnit result = clearSet ? max(ZERO_LAYOUT_UNIT, logicalBottom - logicalTop) : ZERO_LAYOUT_UNIT;
+    LayoutUnit result = clearSet ? max<LayoutUnit>(0, logicalBottom - logicalTop) : LayoutUnit();
     if (!result && child->avoidsFloats()) {
         LayoutUnit newLogicalTop = logicalTop;
         while (true) {
@@ -5783,7 +5783,7 @@ void RenderBlock::computeInlinePreferredLogicalWidths()
 
     RenderStyle* styleToUse = style();
     RenderBlock* containingBlock = this->containingBlock();
-    LayoutUnit cw = containingBlock ? containingBlock->contentLogicalWidth() : ZERO_LAYOUT_UNIT;
+    LayoutUnit cw = containingBlock ? containingBlock->contentLogicalWidth() : LayoutUnit();
 
     // If we are at the start of a line, we want to ignore all white-space.
     // Also strip spaces if we previously had text that ended in a trailing space.
@@ -6160,8 +6160,8 @@ void RenderBlock::computeBlockPreferredLogicalWidths()
     }
 
     // Always make sure these values are non-negative.
-    m_minPreferredLogicalWidth = max(ZERO_LAYOUT_UNIT, m_minPreferredLogicalWidth);
-    m_maxPreferredLogicalWidth = max(ZERO_LAYOUT_UNIT, m_maxPreferredLogicalWidth);
+    m_minPreferredLogicalWidth = max<LayoutUnit>(0, m_minPreferredLogicalWidth);
+    m_maxPreferredLogicalWidth = max<LayoutUnit>(0, m_maxPreferredLogicalWidth);
 
     m_maxPreferredLogicalWidth = max(floatLeftWidth + floatRightWidth, m_maxPreferredLogicalWidth);
 }
@@ -6592,7 +6592,7 @@ static int getHeightForLineCount(RenderBlock* block, int l, bool includeBottom,
         if (block->childrenInline()) {
             for (RootInlineBox* box = block->firstRootBox(); box; box = box->nextRootBox()) {
                 if (++count == l)
-                    return box->lineBottom() + (includeBottom ? (block->borderBottom() + block->paddingBottom()) : ZERO_LAYOUT_UNIT);
+                    return box->lineBottom() + (includeBottom ? (block->borderBottom() + block->paddingBottom()) : LayoutUnit());
             }
         }
         else {
@@ -6601,7 +6601,7 @@ static int getHeightForLineCount(RenderBlock* block, int l, bool includeBottom,
                 if (shouldCheckLines(obj)) {
                     int result = getHeightForLineCount(toRenderBlock(obj), l, false, count);
                     if (result != -1)
-                        return result + obj->y() + (includeBottom ? (block->borderBottom() + block->paddingBottom()) : ZERO_LAYOUT_UNIT);
+                        return result + obj->y() + (includeBottom ? (block->borderBottom() + block->paddingBottom()) : LayoutUnit());
                 } else if (!obj->isFloatingOrOutOfFlowPositioned() && !obj->isRunIn())
                     normalFlowChildWithoutLines = obj;
             }
@@ -6690,11 +6690,11 @@ void RenderBlock::borderFitAdjust(LayoutRect& rect) const
         return;
 
     // Walk any normal flow lines to snugly fit.
-    LayoutUnit left = MAX_LAYOUT_UNIT;
-    LayoutUnit right = MIN_LAYOUT_UNIT;
+    LayoutUnit left = LayoutUnit::max();
+    LayoutUnit right = LayoutUnit::min();
     LayoutUnit oldWidth = rect.width();
     adjustForBorderFit(0, left, right);
-    if (left != MAX_LAYOUT_UNIT) {
+    if (left != LayoutUnit::max()) {
         left = min(left, oldWidth - (borderRight() + paddingRight()));
 
         left -= (borderLeft() + paddingLeft());
@@ -6703,7 +6703,7 @@ void RenderBlock::borderFitAdjust(LayoutRect& rect) const
             rect.expand(-left, 0);
         }
     }
-    if (right != MIN_LAYOUT_UNIT) {
+    if (right != LayoutUnit::min()) {
         right = max(right, borderLeft() + paddingLeft());
 
         right += (borderRight() + paddingRight());
@@ -6890,8 +6890,8 @@ void RenderBlock::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint& a
         // FIXME: This is wrong for block-flows that are horizontal.
         // https://bugs.webkit.org/show_bug.cgi?id=46781
         bool prevInlineHasLineBox = toRenderInline(inlineElementContinuation()->node()->renderer())->firstLineBox(); 
-        float topMargin = prevInlineHasLineBox ? collapsedMarginBefore() : ZERO_LAYOUT_UNIT;
-        float bottomMargin = nextInlineHasLineBox ? collapsedMarginAfter() : ZERO_LAYOUT_UNIT;
+        float topMargin = prevInlineHasLineBox ? collapsedMarginBefore() : LayoutUnit();
+        float bottomMargin = nextInlineHasLineBox ? collapsedMarginAfter() : LayoutUnit();
         LayoutRect rect(additionalOffset.x(), additionalOffset.y() - topMargin, width(), height() + topMargin + bottomMargin);
         if (!rect.isEmpty())
             rects.append(pixelSnappedIntRect(rect));
@@ -6996,7 +6996,7 @@ LayoutUnit RenderBlock::applyBeforeBreak(RenderBox* child, LayoutUnit logicalOff
         if (checkColumnBreaks)
             view()->layoutState()->addForcedColumnBreak(child, logicalOffset);
         if (checkRegionBreaks) {
-            LayoutUnit offsetBreakAdjustment = ZERO_LAYOUT_UNIT;
+            LayoutUnit offsetBreakAdjustment = 0;
             if (enclosingRenderFlowThread()->addForcedRegionBreak(offsetFromLogicalTopOfFirstPage() + logicalOffset, child, true, &offsetBreakAdjustment))
                 return logicalOffset + offsetBreakAdjustment;
         }
@@ -7018,8 +7018,8 @@ LayoutUnit RenderBlock::applyAfterBreak(RenderBox* child, LayoutUnit logicalOffs
         if (checkColumnBreaks)
             view()->layoutState()->addForcedColumnBreak(child, logicalOffset);
         if (checkRegionBreaks) {
-            LayoutUnit marginOffset = marginInfo.canCollapseWithMarginBefore() ? ZERO_LAYOUT_UNIT : marginInfo.margin();
-            LayoutUnit offsetBreakAdjustment = ZERO_LAYOUT_UNIT;
+            LayoutUnit marginOffset = marginInfo.canCollapseWithMarginBefore() ? LayoutUnit() : marginInfo.margin();
+            LayoutUnit offsetBreakAdjustment = 0;
             if (enclosingRenderFlowThread()->addForcedRegionBreak(offsetFromLogicalTopOfFirstPage() + logicalOffset + marginOffset, child, false, &offsetBreakAdjustment))
                 return logicalOffset + offsetBreakAdjustment;
         }
@@ -7081,7 +7081,7 @@ LayoutUnit RenderBlock::adjustForUnsplittableChild(RenderBox* child, LayoutUnit
         || (checkRegionBreaks && child->style()->regionBreakInside() == PBAVOID);
     if (!isUnsplittable)
         return logicalOffset;
-    LayoutUnit childLogicalHeight = logicalHeightForChild(child) + (includeMargins ? marginBeforeForChild(child) + marginAfterForChild(child) : ZERO_LAYOUT_UNIT);
+    LayoutUnit childLogicalHeight = logicalHeightForChild(child) + (includeMargins ? marginBeforeForChild(child) + marginAfterForChild(child) : LayoutUnit());
     LayoutState* layoutState = view()->layoutState();
     if (layoutState->m_columnInfo)
         layoutState->m_columnInfo->updateMinimumColumnHeight(childLogicalHeight);
@@ -7159,12 +7159,12 @@ void RenderBlock::adjustLinePositionForPagination(RootInlineBox* lineBox, Layout
             return;
         if (lineHeight > pageLogicalHeight) {
             // Split the top margin in order to avoid splitting the visible part of the line.
-            remainingLogicalHeight -= min(lineHeight - pageLogicalHeight, max(ZERO_LAYOUT_UNIT, logicalVisualOverflow.y() - lineBox->lineTopWithLeading()));
+            remainingLogicalHeight -= min(lineHeight - pageLogicalHeight, max<LayoutUnit>(0, logicalVisualOverflow.y() - lineBox->lineTopWithLeading()));
         }
-        LayoutUnit totalLogicalHeight = lineHeight + max(ZERO_LAYOUT_UNIT, logicalOffset);
+        LayoutUnit totalLogicalHeight = lineHeight + max<LayoutUnit>(0, logicalOffset);
         LayoutUnit pageLogicalHeightAtNewOffset = hasUniformPageLogicalHeight ? pageLogicalHeight : pageLogicalHeightForOffset(logicalOffset + remainingLogicalHeight);
         if (lineBox == firstRootBox() && totalLogicalHeight < pageLogicalHeightAtNewOffset && !isOutOfFlowPositioned() && !isTableCell())
-            setPaginationStrut(remainingLogicalHeight + max(ZERO_LAYOUT_UNIT, logicalOffset));
+            setPaginationStrut(remainingLogicalHeight + max<LayoutUnit>(0, logicalOffset));
         else {
             delta += remainingLogicalHeight;
             lineBox->setPaginationStrut(remainingLogicalHeight);
@@ -7252,7 +7252,7 @@ LayoutUnit RenderBlock::offsetFromLogicalTopOfFirstPage() const
 {
     LayoutState* layoutState = view()->layoutState();
     if (layoutState && !layoutState->isPaginated())
-        return ZERO_LAYOUT_UNIT;
+        return 0;
     if (layoutState) {
         // FIXME: Sanity check that the renderer in the layout state is ours, since otherwise the computation will be off.
         // Right now this assert gets hit inside computeLogicalHeight for percentage margins, since they're computed using
@@ -7268,7 +7268,7 @@ LayoutUnit RenderBlock::offsetFromLogicalTopOfFirstPage() const
     // FIXME: This is a slower path that doesn't use layout state and relies on getting your logical top inside the enclosing flow thread. It doesn't
     // work with columns or pages currently, but it should once they have been switched over to using flow threads.
     if (!inRenderFlowThread())
-        return ZERO_LAYOUT_UNIT;
+        return 0;
 
     const RenderBlock* currentBlock = this;
     LayoutRect blockRect(0, 0, width(), height());
@@ -7277,7 +7277,7 @@ LayoutUnit RenderBlock::offsetFromLogicalTopOfFirstPage() const
         RenderBlock* containerBlock = currentBlock->containingBlock();
         ASSERT(containerBlock);
         if (!containerBlock)
-            return ZERO_LAYOUT_UNIT;
+            return 0;
         LayoutPoint currentBlockLocation = currentBlock->location();
 
         if (containerBlock->style()->writingMode() != currentBlock->style()->writingMode()) {
index cb4158b..9fe2348 100644 (file)
@@ -149,7 +149,7 @@ public:
     // compute the region all over again when you already know it.
     LayoutUnit availableLogicalWidthForLine(LayoutUnit position, bool firstLine, RenderRegion* region, LayoutUnit offsetFromLogicalTopOfFirstPage, LayoutUnit logicalHeight = 0) const
     {
-        return max(ZERO_LAYOUT_UNIT, logicalRightOffsetForLine(position, firstLine, region, offsetFromLogicalTopOfFirstPage, logicalHeight)
+        return max<LayoutUnit>(0, logicalRightOffsetForLine(position, firstLine, region, offsetFromLogicalTopOfFirstPage, logicalHeight)
             - logicalLeftOffsetForLine(position, firstLine, region, offsetFromLogicalTopOfFirstPage, logicalHeight));
     }
     LayoutUnit logicalRightOffsetForLine(LayoutUnit position, bool firstLine, RenderRegion* region, LayoutUnit offsetFromLogicalTopOfFirstPage, LayoutUnit logicalHeight = 0) const 
@@ -297,12 +297,12 @@ public:
     unsigned columnCount(ColumnInfo*) const;
     LayoutRect columnRectAt(ColumnInfo*, unsigned) const;
 
-    LayoutUnit paginationStrut() const { return m_rareData ? m_rareData->m_paginationStrut : ZERO_LAYOUT_UNIT; }
+    LayoutUnit paginationStrut() const { return m_rareData ? m_rareData->m_paginationStrut : LayoutUnit(); }
     void setPaginationStrut(LayoutUnit);
     
     // The page logical offset is the object's offset from the top of the page in the page progression
     // direction (so an x-offset in vertical text and a y-offset for horizontal text).
-    LayoutUnit pageLogicalOffset() const { return m_rareData ? m_rareData->m_pageLogicalOffset : ZERO_LAYOUT_UNIT; }
+    LayoutUnit pageLogicalOffset() const { return m_rareData ? m_rareData->m_pageLogicalOffset : LayoutUnit(); }
     void setPageLogicalOffset(LayoutUnit);
 
     RootInlineBox* lineGridBox() const { return m_rareData ? m_rareData->m_lineGridBox : 0; }
@@ -371,7 +371,7 @@ public:
     LayoutUnit logicalRightOffsetForContent(RenderRegion*, LayoutUnit offsetFromLogicalTopOfFirstPage) const;
     LayoutUnit availableLogicalWidthForContent(RenderRegion* region, LayoutUnit offsetFromLogicalTopOfFirstPage) const
     { 
-        return max(ZERO_LAYOUT_UNIT, logicalRightOffsetForContent(region, offsetFromLogicalTopOfFirstPage) -
+        return max<LayoutUnit>(0, logicalRightOffsetForContent(region, offsetFromLogicalTopOfFirstPage) -
             logicalLeftOffsetForContent(region, offsetFromLogicalTopOfFirstPage)); }
     LayoutUnit startOffsetForContent(RenderRegion* region, LayoutUnit offsetFromLogicalTopOfFirstPage) const
     {
@@ -1144,20 +1144,20 @@ protected:
 
         static LayoutUnit positiveMarginBeforeDefault(const RenderBlock* block)
         { 
-            return std::max(block->marginBefore(), ZERO_LAYOUT_UNIT);
+            return std::max<LayoutUnit>(block->marginBefore(), 0);
         }
         
         static LayoutUnit negativeMarginBeforeDefault(const RenderBlock* block)
         { 
-            return std::max(-block->marginBefore(), ZERO_LAYOUT_UNIT);
+            return std::max<LayoutUnit>(-block->marginBefore(), 0);
         }
         static LayoutUnit positiveMarginAfterDefault(const RenderBlock* block)
         {
-            return std::max(block->marginAfter(), ZERO_LAYOUT_UNIT);
+            return std::max<LayoutUnit>(block->marginAfter(), 0);
         }
         static LayoutUnit negativeMarginAfterDefault(const RenderBlock* block)
         {
-            return std::max(-block->marginAfter(), ZERO_LAYOUT_UNIT);
+            return std::max<LayoutUnit>(-block->marginAfter(), 0);
         }
         
         MarginValues m_margins;
index 3b27abd..2e58ea6 100644 (file)
@@ -1248,8 +1248,8 @@ public:
     void updateRepaintRangeFromBox(RootInlineBox* box, LayoutUnit paginationDelta = 0)
     {
         m_usesRepaintBounds = true;
-        m_repaintLogicalTop = min(m_repaintLogicalTop, box->logicalTopVisualOverflow() + min(paginationDelta, ZERO_LAYOUT_UNIT));
-        m_repaintLogicalBottom = max(m_repaintLogicalBottom, box->logicalBottomVisualOverflow() + max(paginationDelta, ZERO_LAYOUT_UNIT));
+        m_repaintLogicalTop = min(m_repaintLogicalTop, box->logicalTopVisualOverflow() + min<LayoutUnit>(paginationDelta, 0));
+        m_repaintLogicalBottom = max(m_repaintLogicalBottom, box->logicalBottomVisualOverflow() + max<LayoutUnit>(paginationDelta, 0));
     }
     
     bool endLineMatched() const { return m_endLineMatched; }
@@ -1753,7 +1753,7 @@ void RenderBlock::checkFloatsInCleanLine(RootInlineBox* line, Vector<FloatWithRe
             LayoutUnit floatTop = isHorizontalWritingMode() ? floats[floatIndex].rect.y() : floats[floatIndex].rect.x();
             LayoutUnit floatHeight = isHorizontalWritingMode() ? max(floats[floatIndex].rect.height(), newSize.height())
                                                                  : max(floats[floatIndex].rect.width(), newSize.width());
-            floatHeight = min(floatHeight, MAX_LAYOUT_UNIT - floatTop);
+            floatHeight = min(floatHeight, LayoutUnit::max() - floatTop);
             line->markDirty();
             markLinesDirtyInBlockRange(line->lineBottomWithLeading(), floatTop + floatHeight, line);
             floats[floatIndex].rect.setSize(newSize);
@@ -2918,7 +2918,7 @@ InlineIterator RenderBlock::LineBreaker::nextLineBreak(InlineBidiResolver& resol
 
 void RenderBlock::addOverflowFromInlineChildren()
 {
-    LayoutUnit endPadding = hasOverflowClip() ? paddingEnd() : ZERO_LAYOUT_UNIT;
+    LayoutUnit endPadding = hasOverflowClip() ? paddingEnd() : LayoutUnit();
     // FIXME: Need to find another way to do this, since scrollbars could show when we don't want them to.
     if (hasOverflowClip() && !endPadding && node() && node()->isRootEditableElement() && style()->isLeftToRightDirection())
         endPadding = 1;
index 683c238..ee07eba 100644 (file)
@@ -363,7 +363,7 @@ int RenderBox::scrollWidth() const
     // FIXME: Need to work right with writing modes.
     if (style()->isLeftToRightDirection())
         return snapSizeToPixel(max(clientWidth(), layoutOverflowRect().maxX() - borderLeft()), x() + clientLeft());
-    return clientWidth() - min(ZERO_LAYOUT_UNIT, layoutOverflowRect().x() - borderLeft());
+    return clientWidth() - min<LayoutUnit>(0, layoutOverflowRect().x() - borderLeft());
 }
 
 int RenderBox::scrollHeight() const
@@ -1179,7 +1179,7 @@ LayoutUnit RenderBox::shrinkLogicalWidthToAvoidFloats(LayoutUnit childMarginStar
     LayoutUnit logicalTopPosition = logicalTop();
     LayoutUnit adjustedPageOffsetForContainingBlock = offsetFromLogicalTopOfFirstPage - logicalTop();
     if (region) {
-        LayoutUnit offsetFromLogicalTopOfRegion = region ? region->logicalTopForFlowThreadContent() - offsetFromLogicalTopOfFirstPage : ZERO_LAYOUT_UNIT;
+        LayoutUnit offsetFromLogicalTopOfRegion = region ? region->logicalTopForFlowThreadContent() - offsetFromLogicalTopOfFirstPage : LayoutUnit();
         logicalTopPosition = max(logicalTopPosition, logicalTopPosition + offsetFromLogicalTopOfRegion);
         containingBlockRegion = cb->clampToStartAndEndRegions(region);
     }
@@ -1241,7 +1241,7 @@ LayoutUnit RenderBox::containingBlockAvailableLineWidthInRegion(RenderRegion* re
     LayoutUnit logicalTopPosition = logicalTop();
     LayoutUnit adjustedPageOffsetForContainingBlock = offsetFromLogicalTopOfFirstPage - logicalTop();
     if (region) {
-        LayoutUnit offsetFromLogicalTopOfRegion = region ? region->logicalTopForFlowThreadContent() - offsetFromLogicalTopOfFirstPage : ZERO_LAYOUT_UNIT;
+        LayoutUnit offsetFromLogicalTopOfRegion = region ? region->logicalTopForFlowThreadContent() - offsetFromLogicalTopOfFirstPage : LayoutUnit();
         logicalTopPosition = max(logicalTopPosition, logicalTopPosition + offsetFromLogicalTopOfRegion);
         containingBlockRegion = cb->clampToStartAndEndRegions(region);
     }
@@ -3533,7 +3533,7 @@ VisiblePosition RenderBox::positionForPoint(const LayoutPoint& point)
     }
 
     // Pass off to the closest child.
-    LayoutUnit minDist = MAX_LAYOUT_UNIT;
+    LayoutUnit minDist = LayoutUnit::max();
     RenderBox* closestRenderer = 0;
     LayoutPoint adjustedPoint = point;
     if (isTableRow())
@@ -3549,9 +3549,9 @@ VisiblePosition RenderBox::positionForPoint(const LayoutPoint& point)
         
         RenderBox* renderer = toRenderBox(renderObject);
 
-        LayoutUnit top = renderer->borderTop() + renderer->paddingTop() + (isTableRow() ? ZERO_LAYOUT_UNIT : renderer->y());
+        LayoutUnit top = renderer->borderTop() + renderer->paddingTop() + (isTableRow() ? LayoutUnit() : renderer->y());
         LayoutUnit bottom = top + renderer->contentHeight();
-        LayoutUnit left = renderer->borderLeft() + renderer->paddingLeft() + (isTableRow() ? ZERO_LAYOUT_UNIT : renderer->x());
+        LayoutUnit left = renderer->borderLeft() + renderer->paddingLeft() + (isTableRow() ? LayoutUnit() : renderer->x());
         LayoutUnit right = left + renderer->contentWidth();
         
         if (point.x() <= right && point.x() >= left && point.y() <= top && point.y() >= bottom) {
index 0e7312c..8aacde0 100644 (file)
@@ -75,7 +75,7 @@ public:
     LayoutUnit logicalWidth() const { return style()->isHorizontalWritingMode() ? width() : height(); }
     LayoutUnit logicalHeight() const { return style()->isHorizontalWritingMode() ? height() : width(); }
 
-    LayoutUnit constrainLogicalWidthInRegionByMinMax(LayoutUnit, LayoutUnit, RenderBlock*, RenderRegion* = 0, LayoutUnit offsetFromLogicalTopOfFirstPage = ZERO_LAYOUT_UNIT) const;
+    LayoutUnit constrainLogicalWidthInRegionByMinMax(LayoutUnit, LayoutUnit, RenderBlock*, RenderRegion* = 0, LayoutUnit offsetFromLogicalTopOfFirstPage = 0) const;
     LayoutUnit constrainLogicalHeightByMinMax(LayoutUnit) const;
 
     int pixelSnappedLogicalHeight() const { return style()->isHorizontalWritingMode() ? pixelSnappedHeight() : pixelSnappedWidth(); }
@@ -375,7 +375,7 @@ public:
     virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logicalTop, LogicalExtentComputedValues&) const;
 
     RenderBoxRegionInfo* renderBoxRegionInfo(RenderRegion*, LayoutUnit offsetFromLogicalTopOfFirstPage, RenderBoxRegionInfoFlags = CacheRenderBoxRegionInfo) const;
-    void computeLogicalWidthInRegion(LogicalExtentComputedValues&, RenderRegion* = 0, LayoutUnit offsetFromLogicalTopOfFirstPage = ZERO_LAYOUT_UNIT) const;
+    void computeLogicalWidthInRegion(LogicalExtentComputedValues&, RenderRegion* = 0, LayoutUnit offsetFromLogicalTopOfFirstPage = 0) const;
 
     bool stretchesToViewport() const
     {
index 3ee8827..1277a7c 100644 (file)
@@ -552,7 +552,7 @@ int RenderBoxModelObject::pixelSnappedOffsetHeight() const
 
 LayoutUnit RenderBoxModelObject::computedCSSPaddingTop() const
 {
-    LayoutUnit w = ZERO_LAYOUT_UNIT;
+    LayoutUnit w = 0;
     RenderView* renderView = 0;
     Length padding = style()->paddingTop();
     if (padding.isPercent())
@@ -564,7 +564,7 @@ LayoutUnit RenderBoxModelObject::computedCSSPaddingTop() const
 
 LayoutUnit RenderBoxModelObject::computedCSSPaddingBottom() const
 {
-    LayoutUnit w = ZERO_LAYOUT_UNIT;
+    LayoutUnit w = 0;
     RenderView* renderView = 0;
     Length padding = style()->paddingBottom();
     if (padding.isPercent())
@@ -576,7 +576,7 @@ LayoutUnit RenderBoxModelObject::computedCSSPaddingBottom() const
 
 LayoutUnit RenderBoxModelObject::computedCSSPaddingLeft() const
 {
-    LayoutUnit w = ZERO_LAYOUT_UNIT;
+    LayoutUnit w = 0;
     RenderView* renderView = 0;
     Length padding = style()->paddingLeft();
     if (padding.isPercent())
@@ -588,7 +588,7 @@ LayoutUnit RenderBoxModelObject::computedCSSPaddingLeft() const
 
 LayoutUnit RenderBoxModelObject::computedCSSPaddingRight() const
 {
-    LayoutUnit w = ZERO_LAYOUT_UNIT;
+    LayoutUnit w = 0;
     RenderView* renderView = 0;
     Length padding = style()->paddingRight();
     if (padding.isPercent())
@@ -600,7 +600,7 @@ LayoutUnit RenderBoxModelObject::computedCSSPaddingRight() const
 
 LayoutUnit RenderBoxModelObject::computedCSSPaddingBefore() const
 {
-    LayoutUnit w = ZERO_LAYOUT_UNIT;
+    LayoutUnit w = 0;
     RenderView* renderView = 0;
     Length padding = style()->paddingBefore();
     if (padding.isPercent())
@@ -612,7 +612,7 @@ LayoutUnit RenderBoxModelObject::computedCSSPaddingBefore() const
 
 LayoutUnit RenderBoxModelObject::computedCSSPaddingAfter() const
 {
-    LayoutUnit w = ZERO_LAYOUT_UNIT;
+    LayoutUnit w = 0;
     RenderView* renderView = 0;
     Length padding = style()->paddingAfter();
     if (padding.isPercent())
@@ -624,7 +624,7 @@ LayoutUnit RenderBoxModelObject::computedCSSPaddingAfter() const
 
 LayoutUnit RenderBoxModelObject::computedCSSPaddingStart() const
 {
-    LayoutUnit w = ZERO_LAYOUT_UNIT;
+    LayoutUnit w = 0;
     RenderView* renderView = 0;
     Length padding = style()->paddingStart();
     if (padding.isPercent())
@@ -636,7 +636,7 @@ LayoutUnit RenderBoxModelObject::computedCSSPaddingStart() const
 
 LayoutUnit RenderBoxModelObject::computedCSSPaddingEnd() const
 {
-    LayoutUnit w = ZERO_LAYOUT_UNIT;
+    LayoutUnit w = 0;
     RenderView* renderView = 0;
     Length padding = style()->paddingEnd();
     if (padding.isPercent())
@@ -800,8 +800,8 @@ void RenderBoxModelObject::paintFillLayerExtended(const PaintInfo& paintInfo, co
     
     int bLeft = includeLeftEdge ? borderLeft() : 0;
     int bRight = includeRightEdge ? borderRight() : 0;
-    LayoutUnit pLeft = includeLeftEdge ? paddingLeft() : ZERO_LAYOUT_UNIT;
-    LayoutUnit pRight = includeRightEdge ? paddingRight() : ZERO_LAYOUT_UNIT;
+    LayoutUnit pLeft = includeLeftEdge ? paddingLeft() : LayoutUnit();
+    LayoutUnit pRight = includeRightEdge ? paddingRight() : LayoutUnit();
 
     GraphicsContextStateSaver clipWithScrollingStateSaver(*context, clippedWithLocalScrolling);
     LayoutRect scrolledPaintRect = rect;
@@ -825,10 +825,10 @@ void RenderBoxModelObject::paintFillLayerExtended(const PaintInfo& paintInfo, co
         // Clip to the padding or content boxes as necessary.
         if (!clipToBorderRadius) {
             bool includePadding = bgLayer->clip() == ContentFillBox;
-            LayoutRect clipRect = LayoutRect(scrolledPaintRect.x() + bLeft + (includePadding ? pLeft : ZERO_LAYOUT_UNIT),
-                scrolledPaintRect.y() + borderTop() + (includePadding ? paddingTop() : ZERO_LAYOUT_UNIT),
-                scrolledPaintRect.width() - bLeft - bRight - (includePadding ? pLeft + pRight : ZERO_LAYOUT_UNIT),
-                scrolledPaintRect.height() - borderTop() - borderBottom() - (includePadding ? paddingTop() + paddingBottom() : ZERO_LAYOUT_UNIT));
+            LayoutRect clipRect = LayoutRect(scrolledPaintRect.x() + bLeft + (includePadding ? pLeft : LayoutUnit()),
+                scrolledPaintRect.y() + borderTop() + (includePadding ? paddingTop() : LayoutUnit()),
+                scrolledPaintRect.width() - bLeft - bRight - (includePadding ? pLeft + pRight : LayoutUnit()),
+                scrolledPaintRect.height() - borderTop() - borderBottom() - (includePadding ? paddingTop() + paddingBottom() : LayoutUnit()));
             backgroundClipStateSaver.save();
             context->clip(clipRect);
         }
@@ -2729,7 +2729,7 @@ LayoutRect RenderBoxModelObject::localCaretRectForEmptyElement(LayoutUnit width,
             x -= textIndentOffset;
         break;
     }
-    x = min(x, max(maxX - caretWidth, ZERO_LAYOUT_UNIT));
+    x = min(x, max<LayoutUnit>(maxX - caretWidth, 0));
 
     LayoutUnit y = paddingTop() + borderTop();
 
index 4e08d99..1cfe412 100644 (file)
@@ -24,7 +24,7 @@
 #ifndef RenderBoxModelObject_h
 #define RenderBoxModelObject_h
 
-#include "LayoutTypesInlineMethods.h"
+#include "LayoutRect.h"
 #include "RenderLayerModelObject.h"
 #include "ShadowData.h"
 
index 05aecae..3323986 100644 (file)
@@ -532,7 +532,7 @@ void RenderDeprecatedFlexibleBox::layoutHorizontalBox(bool relayoutChildren)
                     for (RenderBox* child = iterator.first(); child; child = iterator.next()) {
                         LayoutUnit allowedFlex = allowedChildFlex(child, expanding, i);
                         if (allowedFlex) {
-                            LayoutUnit projectedFlex = (allowedFlex == MAX_LAYOUT_UNIT) ? allowedFlex : LayoutUnit(allowedFlex * (totalFlex / child->style()->boxFlex()));
+                            LayoutUnit projectedFlex = (allowedFlex == LayoutUnit::max()) ? allowedFlex : LayoutUnit(allowedFlex * (totalFlex / child->style()->boxFlex()));
                             spaceAvailableThisPass = expanding ? min(spaceAvailableThisPass, projectedFlex) : max(spaceAvailableThisPass, projectedFlex);
                         }
                     }
@@ -786,7 +786,7 @@ void RenderDeprecatedFlexibleBox::layoutVerticalBox(bool relayoutChildren)
                     for (RenderBox* child = iterator.first(); child; child = iterator.next()) {
                         LayoutUnit allowedFlex = allowedChildFlex(child, expanding, i);
                         if (allowedFlex) {
-                            LayoutUnit projectedFlex = (allowedFlex == MAX_LAYOUT_UNIT) ? allowedFlex : static_cast<LayoutUnit>(allowedFlex * (totalFlex / child->style()->boxFlex()));
+                            LayoutUnit projectedFlex = (allowedFlex == LayoutUnit::max()) ? allowedFlex : static_cast<LayoutUnit>(allowedFlex * (totalFlex / child->style()->boxFlex()));
                             spaceAvailableThisPass = expanding ? min(spaceAvailableThisPass, projectedFlex) : max(spaceAvailableThisPass, projectedFlex);
                         }
                     }
@@ -1032,7 +1032,7 @@ LayoutUnit RenderDeprecatedFlexibleBox::allowedChildFlex(RenderBox* child, bool
     if (expanding) {
         if (isHorizontal()) {
             // FIXME: For now just handle fixed values.
-            LayoutUnit maxWidth = MAX_LAYOUT_UNIT;
+            LayoutUnit maxWidth = LayoutUnit::max();
             LayoutUnit width = contentWidthForChild(child);
             if (!child->style()->maxWidth().isUndefined() && child->style()->maxWidth().isFixed())
                 maxWidth = child->style()->maxWidth().value();
@@ -1040,16 +1040,16 @@ LayoutUnit RenderDeprecatedFlexibleBox::allowedChildFlex(RenderBox* child, bool
                 maxWidth = child->maxPreferredLogicalWidth();
             else if (child->style()->maxWidth().type() == MinIntrinsic)
                 maxWidth = child->minPreferredLogicalWidth();
-            if (maxWidth == MAX_LAYOUT_UNIT)
+            if (maxWidth == LayoutUnit::max())
                 return maxWidth;
             return max<LayoutUnit>(0, maxWidth - width);
         } else {
             // FIXME: For now just handle fixed values.
-            LayoutUnit maxHeight = MAX_LAYOUT_UNIT;
+            LayoutUnit maxHeight = LayoutUnit::max();
             LayoutUnit height = contentHeightForChild(child);
             if (!child->style()->maxHeight().isUndefined() && child->style()->maxHeight().isFixed())
                 maxHeight = child->style()->maxHeight().value();
-            if (maxHeight == MAX_LAYOUT_UNIT)
+            if (maxHeight == LayoutUnit::max())
                 return maxHeight;
             return max<LayoutUnit>(0, maxHeight - height);
         }
index d663c3b..1ebae53 100644 (file)
@@ -149,11 +149,11 @@ void RenderFieldset::paintBoxDecorations(PaintInfo& paintInfo, const LayoutPoint
     // cases the legend is embedded in the right and bottom borders respectively.
     // https://bugs.webkit.org/show_bug.cgi?id=47236
     if (style()->isHorizontalWritingMode()) {
-        LayoutUnit yOff = (legend->y() > 0) ? ZERO_LAYOUT_UNIT : (legend->height() - borderTop()) / 2;
+        LayoutUnit yOff = (legend->y() > 0) ? LayoutUnit() : (legend->height() - borderTop()) / 2;
         paintRect.setHeight(paintRect.height() - yOff);
         paintRect.setY(paintRect.y() + yOff);
     } else {
-        LayoutUnit xOff = (legend->x() > 0) ? ZERO_LAYOUT_UNIT : (legend->width() - borderLeft()) / 2;
+        LayoutUnit xOff = (legend->x() > 0) ? LayoutUnit() : (legend->width() - borderLeft()) / 2;
         paintRect.setWidth(paintRect.width() - xOff);
         paintRect.setX(paintRect.x() + xOff);
     }
@@ -200,11 +200,11 @@ void RenderFieldset::paintMask(PaintInfo& paintInfo, const LayoutPoint& paintOff
     // cases the legend is embedded in the right and bottom borders respectively.
     // https://bugs.webkit.org/show_bug.cgi?id=47236
     if (style()->isHorizontalWritingMode()) {
-        LayoutUnit yOff = (legend->y() > 0) ? ZERO_LAYOUT_UNIT : (legend->height() - borderTop()) / 2;
+        LayoutUnit yOff = (legend->y() > 0) ? LayoutUnit() : (legend->height() - borderTop()) / 2;
         paintRect.expand(0, -yOff);
         paintRect.move(0, yOff);
     } else {
-        LayoutUnit xOff = (legend->x() > 0) ? ZERO_LAYOUT_UNIT : (legend->width() - borderLeft()) / 2;
+        LayoutUnit xOff = (legend->x() > 0) ? LayoutUnit() : (legend->width() - borderLeft()) / 2;
         paintRect.expand(-xOff, 0);
         paintRect.move(xOff, 0);
     }
index e16b321..44a9a52 100644 (file)
@@ -371,7 +371,7 @@ void RenderFlexibleBox::paintChildren(PaintInfo& paintInfo, const LayoutPoint& p
 
 void RenderFlexibleBox::repositionLogicalHeightDependentFlexItems(OrderIterator& iterator, WTF::Vector<LineContext>& lineContexts, LayoutUnit& oldClientAfterEdge)
 {
-    LayoutUnit crossAxisStartEdge = lineContexts.isEmpty() ? ZERO_LAYOUT_UNIT : lineContexts[0].crossAxisOffset;
+    LayoutUnit crossAxisStartEdge = lineContexts.isEmpty() ? LayoutUnit() : lineContexts[0].crossAxisOffset;
     alignFlexLines(iterator, lineContexts);
 
     // If we have a single line flexbox, the line height is all the available space.
@@ -894,7 +894,7 @@ bool RenderFlexibleBox::computeNextFlexLine(OrderIterator& iterator, OrderedFlex
     if (!iterator.currentChild())
         return false;
 
-    LayoutUnit lineBreakLength = mainAxisContentExtent(MAX_LAYOUT_UNIT);
+    LayoutUnit lineBreakLength = mainAxisContentExtent(LayoutUnit::max());
 
     for (RenderBox* child = iterator.currentChild(); child; child = iterator.next()) {
         if (child->isOutOfFlowPositioned()) {
@@ -1234,7 +1234,7 @@ void RenderFlexibleBox::alignChildren(OrderIterator& iterator, const WTF::Vector
 
     RenderBox* child = iterator.first();
     for (size_t lineNumber = 0; lineNumber < lineContexts.size(); ++lineNumber) {
-        LayoutUnit minMarginAfterBaseline = MAX_LAYOUT_UNIT;
+        LayoutUnit minMarginAfterBaseline = LayoutUnit::max();
         LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisExtent;
         LayoutUnit maxAscent = lineContexts[lineNumber].maxAscent;
 
@@ -1319,7 +1319,7 @@ void RenderFlexibleBox::applyStretchAlignmentToChild(RenderBox* child, LayoutUni
     } else if (isColumnFlow() && child->style()->logicalWidth().isAuto()) {
         // FIXME: If the child doesn't have orthogonal flow, then it already has an override width set, so use it.
         if (hasOrthogonalFlow(child)) {
-            LayoutUnit childWidth = std::max(ZERO_LAYOUT_UNIT, lineCrossAxisExtent - crossAxisMarginExtentForChild(child));
+            LayoutUnit childWidth = std::max<LayoutUnit>(0, lineCrossAxisExtent - crossAxisMarginExtentForChild(child));
             childWidth = child->constrainLogicalWidthInRegionByMinMax(childWidth, childWidth, this);
 
             if (childWidth != child->logicalWidth()) {
index 5af8d56..e99f533 100644 (file)
@@ -200,7 +200,7 @@ void RenderFlowThread::updateLogicalWidth()
         RenderRegion* region = *iter;
         LayoutUnit regionLogicalWidth = region->pageLogicalWidth();
         if (regionLogicalWidth != logicalWidth) {
-            LayoutUnit logicalLeft = style()->direction() == LTR ? ZERO_LAYOUT_UNIT : logicalWidth - regionLogicalWidth;
+            LayoutUnit logicalLeft = style()->direction() == LTR ? LayoutUnit() : logicalWidth - regionLogicalWidth;
             region->setRenderBoxRegionInfo(this, logicalLeft, regionLogicalWidth, false);
         }
     }
@@ -326,7 +326,7 @@ RenderRegion* RenderFlowThread::regionAtBlockOffset(LayoutUnit offset, bool exte
     // the last valid region. It is similar to auto extending the size of the last region. 
     RenderRegion* lastValidRegion = 0;
 
-    LayoutUnit accumulatedLogicalHeight = ZERO_LAYOUT_UNIT;
+    LayoutUnit accumulatedLogicalHeight = 0;
     
     // FIXME: The regions are always in order, optimize this search.
     for (RenderRegionList::const_iterator iter = m_regionList.begin(); iter != m_regionList.end(); ++iter) {
@@ -362,7 +362,7 @@ RenderRegion* RenderFlowThread::regionAtBlockOffset(LayoutUnit offset, bool exte
 LayoutUnit RenderFlowThread::pageLogicalTopForOffset(LayoutUnit offset) const
 {
     RenderRegion* region = regionAtBlockOffset(offset);
-    return region ? region->pageLogicalTopForOffset(offset) : ZERO_LAYOUT_UNIT;
+    return region ? region->pageLogicalTopForOffset(offset) : LayoutUnit();
 }
 
 LayoutUnit RenderFlowThread::pageLogicalWidthForOffset(LayoutUnit offset) const
@@ -375,9 +375,9 @@ LayoutUnit RenderFlowThread::pageLogicalHeightForOffset(LayoutUnit offset) const
 {
     RenderRegion* region = regionAtBlockOffset(offset);
     if (!region)
-        return ZERO_LAYOUT_UNIT;
+        return 0;
     if (region->needsOverrideLogicalContentHeightComputation())
-        return MAX_LAYOUT_UNIT / 2;
+        return LayoutUnit::max() / 2;
     return region->pageLogicalHeight();
 }
 
@@ -385,9 +385,9 @@ LayoutUnit RenderFlowThread::pageRemainingLogicalHeightForOffset(LayoutUnit offs
 {
     RenderRegion* region = regionAtBlockOffset(offset);
     if (!region)
-        return ZERO_LAYOUT_UNIT;
+        return 0;
     if (region->needsOverrideLogicalContentHeightComputation())
-        return MAX_LAYOUT_UNIT / 2;
+        return LayoutUnit::max() / 2;
 
     LayoutUnit pageLogicalTop = region->pageLogicalTopForOffset(offset);
     LayoutUnit pageLogicalHeight = region->pageLogicalHeight();
@@ -486,7 +486,7 @@ LayoutUnit RenderFlowThread::contentLogicalWidthOfFirstRegion() const
 {
     RenderRegion* firstValidRegionInFlow = firstRegion();
     if (!firstValidRegionInFlow)
-        return ZERO_LAYOUT_UNIT;
+        return 0;
     return isHorizontalWritingMode() ? firstValidRegionInFlow->contentWidth() : firstValidRegionInFlow->contentHeight();
 }
 
@@ -494,7 +494,7 @@ LayoutUnit RenderFlowThread::contentLogicalHeightOfFirstRegion() const
 {
     RenderRegion* firstValidRegionInFlow = firstRegion();
     if (!firstValidRegionInFlow)
-        return ZERO_LAYOUT_UNIT;
+        return 0;
     return isHorizontalWritingMode() ? firstValidRegionInFlow->contentHeight() : firstValidRegionInFlow->contentWidth();
 }
 
@@ -502,7 +502,7 @@ LayoutUnit RenderFlowThread::contentLogicalLeftOfFirstRegion() const
 {
     RenderRegion* firstValidRegionInFlow = firstRegion();
     if (!firstValidRegionInFlow)
-        return ZERO_LAYOUT_UNIT;
+        return 0;
     return isHorizontalWritingMode() ? firstValidRegionInFlow->flowThreadPortionRect().x() : firstValidRegionInFlow->flowThreadPortionRect().y();
 }
 
@@ -786,7 +786,7 @@ void RenderFlowThread::updateRegionsFlowThreadPortionRect()
         LayoutUnit regionLogicalWidth = region->pageLogicalWidth();
         LayoutUnit regionLogicalHeight = region->logicalHeightOfAllFlowThreadContent();
 
-        LayoutRect regionRect(style()->direction() == LTR ? ZERO_LAYOUT_UNIT : logicalWidth() - regionLogicalWidth, logicalHeight, regionLogicalWidth, regionLogicalHeight);
+        LayoutRect regionRect(style()->direction() == LTR ? LayoutUnit() : logicalWidth() - regionLogicalWidth, logicalHeight, regionLogicalWidth, regionLogicalHeight);
 
         // When a flow thread has more than one auto logical height region,
         // we have to take into account the override logical content height value,
@@ -882,7 +882,7 @@ bool RenderFlowThread::addForcedRegionBreak(LayoutUnit offsetBreakInFlowThread,
         updateRegionsFlowThreadPortionRect();
 
     if (offsetBreakAdjustment)
-        *offsetBreakAdjustment = max<LayoutUnit>(ZERO_LAYOUT_UNIT, currentRegionOffsetInFlowThread - offsetBreakInFlowThread);
+        *offsetBreakAdjustment = max<LayoutUnit>(0, currentRegionOffsetInFlowThread - offsetBreakInFlowThread);
 
     return overrideLogicalContentHeightComputed;
 }
index dffc502..15dc884 100644 (file)
@@ -29,7 +29,7 @@
 #include "FloatPoint.h"
 #include "FloatQuad.h"
 #include "IntSize.h"
-#include "LayoutTypesInlineMethods.h"
+#include "LayoutSize.h"
 #include "TransformationMatrix.h"
 #include <wtf/OwnPtr.h>
 
index 4546684..4bc6e97 100644 (file)
@@ -29,7 +29,7 @@
 #include "CachedImage.h"
 #include "CachedResourceHandle.h"
 #include "Image.h"
-#include "LayoutTypesInlineMethods.h"
+#include "LayoutSize.h"
 #include "StyleImage.h"
 
 namespace WebCore {
index 51f54b4..a8f180a 100644 (file)
@@ -949,8 +949,8 @@ LayoutRect RenderInline::linesVisualOverflowBoundingBox() const
         return LayoutRect();
 
     // Return the width of the minimal left side and the maximal right side.
-    LayoutUnit logicalLeftSide = MAX_LAYOUT_UNIT;
-    LayoutUnit logicalRightSide = MIN_LAYOUT_UNIT;
+    LayoutUnit logicalLeftSide = LayoutUnit::max();
+    LayoutUnit logicalRightSide = LayoutUnit::min();
     for (InlineFlowBox* curr = firstLineBox(); curr; curr = curr->nextLineBox()) {
         logicalLeftSide = min(logicalLeftSide, curr->logicalLeftVisualOverflow());
         logicalRightSide = max(logicalRightSide, curr->logicalRightVisualOverflow());
index d85fd65..fcd52fd 100644 (file)
@@ -2057,7 +2057,7 @@ void RenderLayer::resize(const PlatformMouseEvent& evt, const LayoutSize& oldOff
             styledElement->setInlineStyleProperty(CSSPropertyMarginLeft, String::number(renderer->marginLeft() / zoomFactor) + "px", false);
             styledElement->setInlineStyleProperty(CSSPropertyMarginRight, String::number(renderer->marginRight() / zoomFactor) + "px", false);
         }
-        LayoutUnit baseWidth = renderer->width() - (isBoxSizingBorder ? ZERO_LAYOUT_UNIT : renderer->borderAndPaddingWidth());
+        LayoutUnit baseWidth = renderer->width() - (isBoxSizingBorder ? LayoutUnit() : renderer->borderAndPaddingWidth());
         baseWidth = baseWidth / zoomFactor;
         styledElement->setInlineStyleProperty(CSSPropertyWidth, String::number(roundToInt(baseWidth + difference.width())) + "px", false);
     }
@@ -2068,7 +2068,7 @@ void RenderLayer::resize(const PlatformMouseEvent& evt, const LayoutSize& oldOff
             styledElement->setInlineStyleProperty(CSSPropertyMarginTop, String::number(renderer->marginTop() / zoomFactor) + "px", false);
             styledElement->setInlineStyleProperty(CSSPropertyMarginBottom, String::number(renderer->marginBottom() / zoomFactor) + "px", false);
         }
-        LayoutUnit baseHeight = renderer->height() - (isBoxSizingBorder ? ZERO_LAYOUT_UNIT : renderer->borderAndPaddingHeight());
+        LayoutUnit baseHeight = renderer->height() - (isBoxSizingBorder ? LayoutUnit() : renderer->borderAndPaddingHeight());
         baseHeight = baseHeight / zoomFactor;
         styledElement->setInlineStyleProperty(CSSPropertyHeight, String::number(roundToInt(baseHeight + difference.height())) + "px", false);
     }
index cf2be23..e514a5a 100644 (file)
@@ -36,8 +36,7 @@
 #include "CachedSVGDocument.h"
 #endif
 #include "FilterOperation.h"
-#include "FractionalLayoutRect.h"
-#include "LayoutTypes.h"
+#include "LayoutRect.h"
 #include <wtf/HashMap.h>
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefPtr.h>
index a7a3791..bd77f7f 100644 (file)
@@ -1505,7 +1505,7 @@ void RenderListMarker::updateMargins()
                     case NoneListStyle:
                         break;
                     default:
-                        marginStart = m_text.isEmpty() ? ZERO_LAYOUT_UNIT : -minPreferredLogicalWidth() - offset / 2;
+                        marginStart = m_text.isEmpty() ? LayoutUnit() : -minPreferredLogicalWidth() - offset / 2;
                 }
             }
             marginEnd = -marginStart - minPreferredLogicalWidth();
index 77bf34a..d54c909 100644 (file)
@@ -125,13 +125,13 @@ int RenderMarquee::computePosition(EMarqueeDirection dir, bool stopAtContentEdge
         }
         if (dir == MRIGHT) {
             if (stopAtContentEdge)
-                return max(ZERO_LAYOUT_UNIT, ltr ? (contentWidth - clientWidth) : (clientWidth - contentWidth));
+                return max<LayoutUnit>(0, ltr ? (contentWidth - clientWidth) : (clientWidth - contentWidth));
             else
                 return ltr ? contentWidth : clientWidth;
         }
         else {
             if (stopAtContentEdge)
-                return min(ZERO_LAYOUT_UNIT, ltr ? (contentWidth - clientWidth) : (clientWidth - contentWidth));
+                return min<LayoutUnit>(0, ltr ? (contentWidth - clientWidth) : (clientWidth - contentWidth));
             else
                 return ltr ? -clientWidth : -contentWidth;
         }
index 295e242..df42f16 100644 (file)
@@ -24,7 +24,7 @@
 #ifndef RenderMenuList_h
 #define RenderMenuList_h
 
-#include "LayoutTypes.h"
+#include "LayoutRect.h"
 #include "PopupMenu.h"
 #include "PopupMenuClient.h"
 #include "RenderDeprecatedFlexibleBox.h"
index 221cb4d..ba3ccd9 100644 (file)
@@ -37,8 +37,8 @@ RenderMultiColumnBlock::RenderMultiColumnBlock(Node* node)
     : RenderBlock(node)
     , m_flowThread(0)
     , m_columnCount(1)
-    , m_columnWidth(ZERO_LAYOUT_UNIT)
-    , m_columnHeight(ZERO_LAYOUT_UNIT)
+    , m_columnWidth(0)
+    , m_columnHeight(0)
 {
 }
 
@@ -83,13 +83,13 @@ void RenderMultiColumnBlock::checkForPaginationLogicalHeightChange(LayoutUnit& /
     // We don't actually update any of the variables. We just subclassed to adjust our column height.
     updateLogicalHeight();
     LayoutUnit newContentLogicalHeight = contentLogicalHeight();
-    if (newContentLogicalHeight > ZERO_LAYOUT_UNIT) {
+    if (newContentLogicalHeight > 0) {
         // The regions will be invalidated when we lay them out and they change size to
         // the new column height.
         if (columnHeight() != newContentLogicalHeight)
             setColumnHeight(newContentLogicalHeight);
     }
-    setLogicalHeight(ZERO_LAYOUT_UNIT);
+    setLogicalHeight(0);
 
     // Set up our column sets.
     ensureColumnSets();
index 6412506..686fc3c 100644 (file)
@@ -39,8 +39,8 @@ namespace WebCore {
 RenderMultiColumnSet::RenderMultiColumnSet(Node* node, RenderFlowThread* flowThread)
     : RenderRegionSet(node, flowThread)
     , m_computedColumnCount(1)
-    , m_computedColumnWidth(ZERO_LAYOUT_UNIT)
-    , m_computedColumnHeight(ZERO_LAYOUT_UNIT)
+    , m_computedColumnWidth(0)
+    , m_computedColumnHeight(0)
 {
 }
 
@@ -228,9 +228,9 @@ void RenderMultiColumnSet::paintColumnRules(PaintInfo& paintInfo, const LayoutPo
     bool antialias = shouldAntialiasLines(paintInfo.context);
 
     bool leftToRight = style()->isLeftToRightDirection();
-    LayoutUnit currLogicalLeftOffset = leftToRight ? ZERO_LAYOUT_UNIT : contentLogicalWidth();
+    LayoutUnit currLogicalLeftOffset = leftToRight ? LayoutUnit() : contentLogicalWidth();
     LayoutUnit ruleAdd = borderAndPaddingLogicalLeft();
-    LayoutUnit ruleLogicalLeft = leftToRight ? ZERO_LAYOUT_UNIT : contentLogicalWidth();
+    LayoutUnit ruleLogicalLeft = leftToRight ? LayoutUnit() : contentLogicalWidth();
     LayoutUnit inlineDirectionSize = computedColumnWidth();
     BoxSide boxSide = isHorizontalWritingMode()
         ? leftToRight ? BSLeft : BSRight
index 26cad3d..c4efc63 100644 (file)
@@ -434,7 +434,7 @@ static bool isContainedInNodes(Vector<Node*> others, Node* node)
 
 static bool boxIntersectsRegion(LayoutUnit logicalTopForBox, LayoutUnit logicalBottomForBox, LayoutUnit logicalTopForRegion, LayoutUnit logicalBottomForRegion)
 {
-    bool regionIsEmpty = logicalBottomForRegion != MAX_LAYOUT_UNIT && logicalTopForRegion != MIN_LAYOUT_UNIT
+    bool regionIsEmpty = logicalBottomForRegion != LayoutUnit::max() && logicalTopForRegion != LayoutUnit::min()
         && (logicalBottomForRegion - logicalTopForRegion) <= 0;
     return  (logicalBottomForBox - logicalTopForBox) > 0
         && !regionIsEmpty
@@ -448,13 +448,13 @@ void RenderNamedFlowThread::getRanges(Vector<RefPtr<Range> >& rangeObjects, cons
 
     // extend the first region top to contain everything up to its logical height
     if (region->isFirstRegion())
-        logicalTopForRegion = MIN_LAYOUT_UNIT;
+        logicalTopForRegion = LayoutUnit::min();
     else
         logicalTopForRegion =  region->logicalTopForFlowThreadContent();
 
     // extend the last region to contain everything above its y()
     if (region->isLastRegion())
-        logicalBottomForRegion = MAX_LAYOUT_UNIT;
+        logicalBottomForRegion = LayoutUnit::max();
     else
         logicalBottomForRegion = region->logicalBottomForFlowThreadContent();
 
@@ -496,8 +496,8 @@ void RenderNamedFlowThread::getRanges(Vector<RefPtr<Range> >& rangeObjects, cons
             }
 
             LayoutUnit offsetTop = renderer->containingBlock()->offsetFromLogicalTopOfFirstPage();
-            const LayoutPoint logicalOffsetFromTop(isHorizontalWritingMode() ? ZERO_LAYOUT_UNIT :  offsetTop,
-                isHorizontalWritingMode() ? offsetTop : ZERO_LAYOUT_UNIT);
+            const LayoutPoint logicalOffsetFromTop(isHorizontalWritingMode() ? LayoutUnit() :  offsetTop,
+                isHorizontalWritingMode() ? offsetTop : LayoutUnit());
 
             boundingBox.moveBy(logicalOffsetFromTop);
 
index 4bb0a3d..74e5066 100644 (file)
@@ -1450,7 +1450,7 @@ bool RenderObject::repaintAfterLayoutIfNeeded(RenderLayerModelObject* repaintCon
         LayoutUnit shadowRight;
         style()->getBoxShadowHorizontalExtent(shadowLeft, shadowRight);
         int borderRight = isBox() ? toRenderBox(this)->borderRight() : 0;
-        LayoutUnit boxWidth = isBox() ? toRenderBox(this)->width() : ZERO_LAYOUT_UNIT;
+        LayoutUnit boxWidth = isBox() ? toRenderBox(this)->width() : LayoutUnit();
         LayoutUnit minInsetRightShadowExtent = min<LayoutUnit>(-insetShadowExtent.right(), min<LayoutUnit>(newBounds.width(), oldBounds.width()));
         LayoutUnit borderWidth = max<LayoutUnit>(borderRight, max<LayoutUnit>(valueForLength(style()->borderTopRightRadius().width(), boxWidth, v), valueForLength(style()->borderBottomRightRadius().width(), boxWidth, v)));
         LayoutUnit decorationsWidth = max<LayoutUnit>(-outlineStyle->outlineOffset(), borderWidth + minInsetRightShadowExtent) + max<LayoutUnit>(outlineWidth, shadowRight);
@@ -1470,7 +1470,7 @@ bool RenderObject::repaintAfterLayoutIfNeeded(RenderLayerModelObject* repaintCon
         LayoutUnit shadowBottom;
         style()->getBoxShadowVerticalExtent(shadowTop, shadowBottom);
         int borderBottom = isBox() ? toRenderBox(this)->borderBottom() : 0;
-        LayoutUnit boxHeight = isBox() ? toRenderBox(this)->height() : ZERO_LAYOUT_UNIT;
+        LayoutUnit boxHeight = isBox() ? toRenderBox(this)->height() : LayoutUnit();
         LayoutUnit minInsetBottomShadowExtent = min<LayoutUnit>(-insetShadowExtent.bottom(), min<LayoutUnit>(newBounds.height(), oldBounds.height()));
         LayoutUnit borderHeight = max<LayoutUnit>(borderBottom, max<LayoutUnit>(valueForLength(style()->borderBottomLeftRadius().height(), boxHeight, v), valueForLength(style()->borderBottomRightRadius().height(), boxHeight, v)));
         LayoutUnit decorationsHeight = max<LayoutUnit>(-outlineStyle->outlineOffset(), borderHeight + minInsetBottomShadowExtent) + max<LayoutUnit>(outlineWidth, shadowBottom);
index 67a4d37..99424f2 100644 (file)
@@ -30,8 +30,7 @@
 #include "DocumentStyleSheetCollection.h"
 #include "Element.h"
 #include "FloatQuad.h"
-#include "FractionalLayoutUnit.h"
-#include "LayoutTypes.h"
+#include "LayoutRect.h"
 #include "PaintPhase.h"
 #include "RenderObjectChildList.h"
 #include "RenderStyle.h"
index ad332bc..e6b85e9 100644 (file)
@@ -21,7 +21,7 @@
 #ifndef RenderOverflow_h
 #define RenderOverflow_h
 
-#include "LayoutTypes.h"
+#include "LayoutRect.h"
 
 namespace WebCore
 {
index 87f9498..9ef649d 100644 (file)
@@ -370,14 +370,14 @@ void RenderRegion::deleteAllRenderBoxRegionInfo()
 LayoutUnit RenderRegion::logicalTopOfFlowThreadContentRect(const LayoutRect& rect) const
 {
     if (!m_isValid || !flowThread())
-        return ZERO_LAYOUT_UNIT;
+        return 0;
     return flowThread()->isHorizontalWritingMode() ? rect.y() : rect.x();
 }
 
 LayoutUnit RenderRegion::logicalBottomOfFlowThreadContentRect(const LayoutRect& rect) const
 {
     if (!m_isValid || !flowThread())
-        return ZERO_LAYOUT_UNIT;
+        return 0;
     return flowThread()->isHorizontalWritingMode() ? rect.maxY() : rect.maxX();
 }
 
index cd93458..c7d5d55 100644 (file)
@@ -382,7 +382,7 @@ LayoutUnit RenderReplaced::computeReplacedLogicalWidth(bool includeMaxWidth) con
                 // This solves above equation for 'width' (== logicalWidth).
                 LayoutUnit marginStart = minimumValueForLength(style()->marginStart(), logicalWidth);
                 LayoutUnit marginEnd = minimumValueForLength(style()->marginEnd(), logicalWidth);
-                logicalWidth = max(ZERO_LAYOUT_UNIT, logicalWidth - (marginStart + marginEnd + (width() - clientWidth())));
+                logicalWidth = max<LayoutUnit>(0, logicalWidth - (marginStart + marginEnd + (width() - clientWidth())));
                 if (isPercentageIntrinsicSize)
                     logicalWidth = logicalWidth * constrainedSize.width() / 100;
                 return computeReplacedLogicalWidthRespectingMinMaxWidth(logicalWidth, includeMaxWidth);
@@ -460,7 +460,7 @@ void RenderReplaced::computePreferredLogicalWidths()
     m_maxPreferredLogicalWidth = computeMaxPreferredLogicalWidth() + borderAndPadding;
 
     if (style()->maxWidth().isFixed())
-        m_maxPreferredLogicalWidth = min<LayoutUnit>(m_maxPreferredLogicalWidth, style()->maxWidth().value() + (style()->boxSizing() == CONTENT_BOX ? borderAndPadding : ZERO_LAYOUT_UNIT));
+        m_maxPreferredLogicalWidth = min<LayoutUnit>(m_maxPreferredLogicalWidth, style()->maxWidth().value() + (style()->boxSizing() == CONTENT_BOX ? borderAndPadding : LayoutUnit()));
 
     if (hasRelativeDimensions())
         m_minPreferredLogicalWidth = 0;
index 948b526..887b65c 100644 (file)
@@ -321,7 +321,7 @@ LayoutUnit RenderTable::convertStyleLogicalWidthToComputedWidth(const Length& st
     if (isCSSTable && styleLogicalWidth.isFixed() && styleLogicalWidth.isPositive()) {
         recalcBordersInRowDirection();
         if (style()->boxSizing() == CONTENT_BOX)
-            borders = borderStart() + borderEnd() + (collapseBorders() ? ZERO_LAYOUT_UNIT : paddingStart() + paddingEnd());
+            borders = borderStart() + borderEnd() + (collapseBorders() ? LayoutUnit() : paddingStart() + paddingEnd());
     }
     return minimumValueForLength(styleLogicalWidth, availableWidth, view()) + borders;
 }
@@ -434,8 +434,8 @@ void RenderTable::layout()
         }
     }
 
-    LayoutUnit borderAndPaddingBefore = borderBefore() + (collapsing ? ZERO_LAYOUT_UNIT : paddingBefore());
-    LayoutUnit borderAndPaddingAfter = borderAfter() + (collapsing ? ZERO_LAYOUT_UNIT : paddingAfter());
+    LayoutUnit borderAndPaddingBefore = borderBefore() + (collapsing ? LayoutUnit() : paddingBefore());
+    LayoutUnit borderAndPaddingAfter = borderAfter() + (collapsing ? LayoutUnit() : paddingAfter());
 
     setLogicalHeight(logicalHeight() + borderAndPaddingBefore);
 
@@ -446,7 +446,7 @@ void RenderTable::layout()
     LayoutUnit computedLogicalHeight = 0;
     if (logicalHeightLength.isFixed()) {
         // HTML tables size as though CSS height includes border/padding, CSS tables do not.
-        LayoutUnit borders = ZERO_LAYOUT_UNIT;
+        LayoutUnit borders = 0;
         // FIXME: We cannot apply box-sizing: content-box on <table> which other browsers allow.
         if ((node() && node()->hasTagName(tableTag)) || style()->boxSizing() == BORDER_BOX)
             borders = borderAndPaddingBefore + borderAndPaddingAfter;
index f9f9386..589b9de 100644 (file)
@@ -191,14 +191,13 @@ public:
         if (unsigned effectiveColumnCount = numEffCols())
             return static_cast<LayoutUnit>(effectiveColumnCount + 1) * hBorderSpacing();
 
-        return ZERO_LAYOUT_UNIT;
+        return 0;
     }
 
     LayoutUnit bordersPaddingAndSpacingInRowDirection() const
     {
         // 'border-spacing' only applies to separate borders (see 17.6.1 The separated borders model).
-        return borderStart() + borderEnd() +
-               (collapseBorders() ? ZERO_LAYOUT_UNIT : (paddingStart() + paddingEnd() + borderSpacingInRowDirection()));
+        return borderStart() + borderEnd() + (collapseBorders() ? LayoutUnit() : (paddingStart() + paddingEnd() + borderSpacingInRowDirection()));
     }
 
     // Return the first column or column-group.
index 3f8d715..1ab51c0 100644 (file)
@@ -1615,8 +1615,8 @@ LayoutRect RenderText::linesVisualOverflowBoundingBox() const
         return LayoutRect();
 
     // Return the width of the minimal left side and the maximal right side.
-    LayoutUnit logicalLeftSide = MAX_LAYOUT_UNIT;
-    LayoutUnit logicalRightSide = MIN_LAYOUT_UNIT;
+    LayoutUnit logicalLeftSide = LayoutUnit::max();
+    LayoutUnit logicalRightSide = LayoutUnit::min();
     for (InlineTextBox* curr = firstTextBox(); curr; curr = curr->nextTextBox()) {
         logicalLeftSide = min(logicalLeftSide, curr->logicalLeftVisualOverflow());
         logicalRightSide = max(logicalRightSide, curr->logicalRightVisualOverflow());
index 2809110..6e90795 100644 (file)
@@ -26,8 +26,8 @@
 #include "config.h"
 #include "RenderThemeChromiumCommon.h"
 
-#include "FractionalLayoutUnit.h"
 #include "InputTypeNames.h"
+#include "LayoutUnit.h"
 
 namespace WebCore {
 
index 00a261d..5f6d71a 100644 (file)
@@ -27,7 +27,7 @@
 #ifndef RenderThemeChromiumCommon_h
 #define RenderThemeChromiumCommon_h
 
-#include "LayoutTypes.h"
+#include "LayoutUnit.h"
 #include <wtf/text/AtomicString.h>
 
 namespace WebCore {
index ac6bd34..6c08789 100644 (file)
@@ -89,7 +89,7 @@ TextStream& operator<<(TextStream& ts, const IntPoint& p)
     return ts << "(" << p.x() << "," << p.y() << ")";
 }
 
-TextStream& operator<<(TextStream& ts, const FractionalLayoutPoint& p)
+TextStream& operator<<(TextStream& ts, const LayoutPoint& p)
 {
     // FIXME: These should be printed as floats. Keeping them ints for consistency with pervious test expectations.
     return ts << "(" << p.x().toInt() << "," << p.y().toInt() << ")";
index 53f3487..3a83849 100644 (file)
 namespace WebCore {
 
 class Element;
-class FractionalLayoutPoint;
 class FloatPoint;
 class FloatSize;
 class Frame;
 class IntPoint;
 class IntRect;
+class LayoutPoint;
 class RenderObject;
 class TextStream;
 
@@ -70,7 +70,7 @@ static void writeRenderObject(TextStream& ts, const RenderObject& o, RenderAsTex
 
 TextStream& operator<<(TextStream&, const IntPoint&);
 TextStream& operator<<(TextStream&, const IntRect&);
-TextStream& operator<<(TextStream&, const FractionalLayoutPoint&);
+TextStream& operator<<(TextStream&, const LayoutPoint&);
 TextStream& operator<<(TextStream&, const FloatPoint&);
 TextStream& operator<<(TextStream&, const FloatSize&);
 
index 45444ae..da60689 100644 (file)
@@ -127,8 +127,8 @@ public:
         if (m_layoutState) {
             m_layoutState->m_layoutDelta += delta;
 #if !ASSERT_DISABLED && ENABLE(SATURATED_LAYOUT_ARITHMETIC)
-            m_layoutState->m_layoutDeltaXSaturated |= m_layoutState->m_layoutDelta.width() == FractionalLayoutUnit::max() || m_layoutState->m_layoutDelta.width() == FractionalLayoutUnit::min();
-            m_layoutState->m_layoutDeltaYSaturated |= m_layoutState->m_layoutDelta.height() == FractionalLayoutUnit::max() || m_layoutState->m_layoutDelta.height() == FractionalLayoutUnit::min();
+            m_layoutState->m_layoutDeltaXSaturated |= m_layoutState->m_layoutDelta.width() == LayoutUnit::max() || m_layoutState->m_layoutDelta.width() == LayoutUnit::min();
+            m_layoutState->m_layoutDeltaYSaturated |= m_layoutState->m_layoutDelta.height() == LayoutUnit::max() || m_layoutState->m_layoutDelta.height() == LayoutUnit::min();
 #endif
         }
     }
index a44eed6..fd007ce 100644 (file)
@@ -24,7 +24,7 @@
 #ifndef NinePieceImage_h
 #define NinePieceImage_h
 
-#include "LayoutTypes.h"
+#include "LayoutUnit.h"
 #include "LengthBox.h"
 #include "StyleImage.h"
 
index ebe91b4..220cef5 100644 (file)
@@ -37,7 +37,7 @@
 #include "FontBaseline.h"
 #include "FontDescription.h"
 #include "GraphicsTypes.h"
-#include "LayoutTypesInlineMethods.h"
+#include "LayoutBoxExtent.h"
 #include "Length.h"
 #include "LengthBox.h"
 #include "LengthFunctions.h"
index d2a1cd2..381b590 100644 (file)
@@ -22,7 +22,7 @@
 #include "config.h"
 #include "ShadowData.h"
 
-#include "LayoutTypesInlineMethods.h"
+#include "LayoutRect.h"
 
 using namespace std;
 
index 1518edd..77d71e9 100644 (file)
@@ -27,7 +27,7 @@
 
 #include "Color.h"
 #include "FloatRect.h"
-#include "LayoutTypes.h"
+#include "LayoutRect.h"
 #include <wtf/OwnPtr.h>
 #include <wtf/PassOwnPtr.h>
 
index 6a2ffdb..7e5eb5d 100644 (file)
@@ -30,7 +30,7 @@
 
 #include "CachedImageClient.h"
 #include "CachedResourceHandle.h"
-#include "LayoutTypes.h"
+#include "LayoutSize.h"
 #include "StyleImage.h"
 
 namespace WebCore {