Add absoluteValue method for LayoutUnits to allow overloading abs()
https://bugs.webkit.org/show_bug.cgi?id=85214
Reviewed by Eric Seidel.
Adding an absoluteValue free inline function that operates on LayoutUnits, which
allows us to have one function signature for ints or FractionalLayoutUnits. We
can't simply add a FractionalLayoutUnit flavor of abs because it confuses
some compilers due to the implicit FractionalLayoutUnit constructors that take
ints and floats.
No new tests. No change in behavior.
* page/SpatialNavigation.cpp:
(WebCore::distanceDataForNode):
* rendering/LayoutTypes.h:
(WebCore::absoluteValue):
(WebCore):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::checkPaginationAndFloatsAtEndLine):
* rendering/RenderLineBoxList.cpp:
(WebCore::RenderLineBoxList::rangeIntersectsRect):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::repaintAfterLayoutIfNeeded):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115691 268f45cc-cd09-0410-ab3c-d52691b4dbfc
7 files changed