Introduce user-defined literal for LayoutUnit
authorross.kirsling@sony.com <ross.kirsling@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Nov 2018 20:47:11 +0000 (20:47 +0000)
committerross.kirsling@sony.com <ross.kirsling@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Nov 2018 20:47:11 +0000 (20:47 +0000)
commitea816a59d5ebf3b139204631527c5048cdb71147
tree857fb4d9c778dec5647b9432a4466a9368398bcb
parenta0d83bd57613fd8fc9c516dfa27a202312ba637d
Introduce user-defined literal for LayoutUnit
https://bugs.webkit.org/show_bug.cgi?id=191915

Reviewed by Dean Jackson.

* platform/LayoutUnit.h:
Introduce a user-defined literal for LayoutUnit, _lu, replacing the existing "fromPixel" factory function.

* layout/FormattingContextGeometry.cpp:
* layout/inlineformatting/InlineFormattingContextGeometry.cpp:
* layout/inlineformatting/InlineLineBreaker.cpp:
* page/FrameView.cpp:
* page/FrameViewLayoutContext.h:
* page/Page.cpp:
* page/SpatialNavigation.h:
* platform/ScrollableArea.cpp:
* rendering/EllipsisBox.cpp:
* rendering/FlexibleBoxAlgorithm.cpp:
* rendering/FloatingObjects.cpp:
* rendering/GridLayoutFunctions.cpp:
* rendering/GridTrackSizingAlgorithm.cpp:
* rendering/InlineFlowBox.cpp:
* rendering/InlineTextBox.cpp:
* rendering/LayoutState.h:
* rendering/LogicalSelectionOffsetCaches.h:
* rendering/RenderBlock.cpp:
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
* rendering/RenderBlockFlow.h:
* rendering/RenderBlockLineLayout.cpp:
* rendering/RenderBox.cpp:
* rendering/RenderBoxModelObject.cpp:
* rendering/RenderDeprecatedFlexibleBox.cpp:
* rendering/RenderDeprecatedFlexibleBox.h:
* rendering/RenderElement.cpp:
* rendering/RenderFlexibleBox.cpp:
* rendering/RenderFlexibleBox.h:
* rendering/RenderFragmentContainer.cpp:
* rendering/RenderFragmentedFlow.cpp:
* rendering/RenderGrid.cpp:
* rendering/RenderGrid.h:
* rendering/RenderImage.cpp:
* rendering/RenderLayer.cpp:
* rendering/RenderListMarker.cpp:
* rendering/RenderMultiColumnFlow.cpp:
* rendering/RenderMultiColumnSet.cpp:
* rendering/RenderReplaced.cpp:
* rendering/RenderReplaced.h:
* rendering/RenderRubyRun.h:
* rendering/RenderTable.cpp:
* rendering/RenderTable.h:
* rendering/RenderTableSection.cpp:
* rendering/RenderTheme.cpp:
* rendering/RenderTreeAsText.cpp:
* rendering/RenderView.cpp:
* rendering/RootInlineBox.h:
* rendering/SimpleLineLayout.cpp:
* rendering/SimpleLineLayoutPagination.cpp:
* rendering/TableLayout.h:
* rendering/line/BreakingContext.h:
* rendering/line/LineLayoutState.h:
* rendering/line/LineWidth.h:
* rendering/mathml/MathOperator.cpp:
* rendering/mathml/MathOperator.h:
* rendering/mathml/RenderMathMLBlock.h:
* rendering/mathml/RenderMathMLFraction.cpp:
* rendering/mathml/RenderMathMLFraction.h:
* rendering/mathml/RenderMathMLMath.cpp:
* rendering/mathml/RenderMathMLMath.h:
* rendering/mathml/RenderMathMLMenclose.h:
* rendering/mathml/RenderMathMLOperator.cpp:
* rendering/mathml/RenderMathMLOperator.h:
* rendering/mathml/RenderMathMLPadded.h:
* rendering/mathml/RenderMathMLRoot.cpp:
* rendering/mathml/RenderMathMLRoot.h:
* rendering/mathml/RenderMathMLRow.h:
* rendering/mathml/RenderMathMLScripts.cpp:
* rendering/mathml/RenderMathMLScripts.h:
* rendering/mathml/RenderMathMLSpace.h:
* rendering/mathml/RenderMathMLToken.cpp:
* rendering/mathml/RenderMathMLToken.h:
* rendering/mathml/RenderMathMLUnderOver.h:
* rendering/shapes/ShapeOutsideInfo.cpp:
* rendering/style/CollapsedBorderValue.h:
Update all instances of LayoutUnit(), LayoutUnit(0), LayoutUnit { 0 }, etc. and add any other
literal conversions that will be needed when making non-int LayoutUnit constructors explicit.
For good measure, also mark all default values for LayoutUnit parameters.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238463 268f45cc-cd09-0410-ab3c-d52691b4dbfc
78 files changed:
Source/WebCore/ChangeLog
Source/WebCore/layout/FormattingContextGeometry.cpp
Source/WebCore/layout/inlineformatting/InlineFormattingContextGeometry.cpp
Source/WebCore/layout/inlineformatting/InlineLineBreaker.cpp
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/FrameViewLayoutContext.h
Source/WebCore/page/Page.cpp
Source/WebCore/page/SpatialNavigation.h
Source/WebCore/platform/LayoutUnit.h
Source/WebCore/platform/ScrollableArea.cpp
Source/WebCore/rendering/EllipsisBox.cpp
Source/WebCore/rendering/FlexibleBoxAlgorithm.cpp
Source/WebCore/rendering/FloatingObjects.cpp
Source/WebCore/rendering/GridLayoutFunctions.cpp
Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp
Source/WebCore/rendering/InlineFlowBox.cpp
Source/WebCore/rendering/InlineTextBox.cpp
Source/WebCore/rendering/LayoutState.h
Source/WebCore/rendering/LogicalSelectionOffsetCaches.h
Source/WebCore/rendering/RenderBlock.cpp
Source/WebCore/rendering/RenderBlock.h
Source/WebCore/rendering/RenderBlockFlow.cpp
Source/WebCore/rendering/RenderBlockFlow.h
Source/WebCore/rendering/RenderBlockLineLayout.cpp
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderBoxModelObject.cpp
Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp
Source/WebCore/rendering/RenderDeprecatedFlexibleBox.h
Source/WebCore/rendering/RenderElement.cpp
Source/WebCore/rendering/RenderFlexibleBox.cpp
Source/WebCore/rendering/RenderFlexibleBox.h
Source/WebCore/rendering/RenderFragmentContainer.cpp
Source/WebCore/rendering/RenderFragmentedFlow.cpp
Source/WebCore/rendering/RenderGrid.cpp
Source/WebCore/rendering/RenderGrid.h
Source/WebCore/rendering/RenderImage.cpp
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderListMarker.cpp
Source/WebCore/rendering/RenderMultiColumnFlow.cpp
Source/WebCore/rendering/RenderMultiColumnSet.cpp
Source/WebCore/rendering/RenderReplaced.cpp
Source/WebCore/rendering/RenderReplaced.h
Source/WebCore/rendering/RenderRubyRun.h
Source/WebCore/rendering/RenderTable.cpp
Source/WebCore/rendering/RenderTable.h
Source/WebCore/rendering/RenderTableSection.cpp
Source/WebCore/rendering/RenderTheme.cpp
Source/WebCore/rendering/RenderTreeAsText.cpp
Source/WebCore/rendering/RenderView.cpp
Source/WebCore/rendering/RootInlineBox.h
Source/WebCore/rendering/SimpleLineLayout.cpp
Source/WebCore/rendering/SimpleLineLayoutPagination.cpp
Source/WebCore/rendering/TableLayout.h
Source/WebCore/rendering/line/BreakingContext.h
Source/WebCore/rendering/line/LineLayoutState.h
Source/WebCore/rendering/line/LineWidth.h
Source/WebCore/rendering/mathml/MathOperator.cpp
Source/WebCore/rendering/mathml/MathOperator.h
Source/WebCore/rendering/mathml/RenderMathMLBlock.h
Source/WebCore/rendering/mathml/RenderMathMLFraction.cpp
Source/WebCore/rendering/mathml/RenderMathMLFraction.h
Source/WebCore/rendering/mathml/RenderMathMLMath.cpp
Source/WebCore/rendering/mathml/RenderMathMLMath.h
Source/WebCore/rendering/mathml/RenderMathMLMenclose.h
Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp
Source/WebCore/rendering/mathml/RenderMathMLOperator.h
Source/WebCore/rendering/mathml/RenderMathMLPadded.h
Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp
Source/WebCore/rendering/mathml/RenderMathMLRoot.h
Source/WebCore/rendering/mathml/RenderMathMLRow.h
Source/WebCore/rendering/mathml/RenderMathMLScripts.cpp
Source/WebCore/rendering/mathml/RenderMathMLScripts.h
Source/WebCore/rendering/mathml/RenderMathMLSpace.h
Source/WebCore/rendering/mathml/RenderMathMLToken.cpp
Source/WebCore/rendering/mathml/RenderMathMLToken.h
Source/WebCore/rendering/mathml/RenderMathMLUnderOver.h
Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp
Source/WebCore/rendering/style/CollapsedBorderValue.h