Consolidate logic for calculating scrollbar page step size
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Aug 2014 23:04:05 +0000 (23:04 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Aug 2014 23:04:05 +0000 (23:04 +0000)
commita7e65efba2faa6de098855e166354ca68a1287ea
tree9befde110e6a82fec46efea43b5cbba5abba8ee8
parentf2b93db7788beabc3ab8945b7af4aceb3c5a13e3
Consolidate logic for calculating scrollbar page step size
https://bugs.webkit.org/show_bug.cgi?id=135670

Reviewed by Simon Fraser.

Consolidate the calculation of the scroll step size into a single place.
Improve the handling of sub-pixel layout behavior by performing proper
rounding on the fractional scroll ranges.

* editing/EditorCommand.cpp:
(WebCore::verticalScrollDistance): Switch to Scrollbar::pageStep method.
* platform/ScrollAnimator.cpp:
(WebCore::ScrollAnimator::handleWheelEvent): Ditto.
* platform/ScrollView.cpp:
(WebCore::ScrollView::updateScrollbars): Ditto.
* platform/Scrollbar.h:
(WebCore::Scrollbar::pageStep): Added.
(WebCore::Scrollbar::pageStepDelta): Added.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateScrollbarsAfterLayout): Switch to Scrollbar method.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172182 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/editing/EditorCommand.cpp
Source/WebCore/platform/ScrollAnimator.cpp
Source/WebCore/platform/ScrollView.cpp
Source/WebCore/platform/Scrollbar.h
Source/WebCore/rendering/RenderLayer.cpp