Prepare functions in LengthFunctions.h for LayoutUnits
authorleviw@chromium.org <leviw@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Apr 2012 04:19:42 +0000 (04:19 +0000)
committerleviw@chromium.org <leviw@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Apr 2012 04:19:42 +0000 (04:19 +0000)
commitf5ba187eff13e24041c4c2e5c87578415580e913
tree3285e0d2a45e92c54679c49a7a170713256df66c
parentaf53b99a5d010ceb114e10bfc3d9ae325089a646
Prepare functions in LengthFunctions.h for LayoutUnits
https://bugs.webkit.org/show_bug.cgi?id=83726

Reviewed by Eric Seidel.

Preparing the functions that live in LengthFunctions for sub-pixel layout, which entails
using and returning LayoutUnits instead of integers. There are a number of rendering
classes that are laid out using integers -- see https://trac.webkit.org/wiki/LayoutUnit
for details -- so this also adds integer-specific versions of the length functions for
explicit use in those classes.

No new tests. No change in behavior.

* css/LengthFunctions.h:
(WebCore): Using LayoutUnits for sub-pixel precision and adding integer-specific versions
of minimumValueForLength and valueForLength that truncate.
* css/LengthFunctions.cpp:
(WebCore):
* dom/Document.cpp:
(WebCore::Document::pageSizeAndMarginsInPixels): Document sizes are integral.
* rendering/RenderFrameSet.cpp:
(WebCore::RenderFrameSet::layOutAxis): The frame tree continues to be integral.
* rendering/RenderMarquee.cpp:
(WebCore::RenderMarquee::timerFired): RenderMarquee scrolling uses integral values.
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::calcRowLogicalHeight): Table layout is integral.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114079 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/css/LengthFunctions.cpp
Source/WebCore/css/LengthFunctions.h
Source/WebCore/dom/Document.cpp
Source/WebCore/rendering/RenderFrameSet.cpp
Source/WebCore/rendering/RenderMarquee.cpp
Source/WebCore/rendering/RenderTableSection.cpp