REGRESSION (r53718): When scrolling a tall window by page, the overlap between pages...
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 4 Feb 2010 17:35:58 +0000 (17:35 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 4 Feb 2010 17:35:58 +0000 (17:35 +0000)
commitb21650b97fccd792a6917fd98c507aa5c4b22792
treed021187083a7bbf5a0ed7187e188f9404cc836a9
parentde5d3dd2c6dfaff9ca5770245dbc3c19a23d395f
REGRESSION (r53718): When scrolling a tall window by page, the overlap between pages is too big
https://bugs.webkit.org/show_bug.cgi?id=34371

Reviewed by Simon Fraser.

WebCore:

Allow ScrollbarTheme to cap the overlap between pages, and set a cap of
40 in ScrollbarThemeMac.

* WebCore.base.exp: Export Scrollbar::maxOverlapBetweenPages().
* editing/EditorCommand.cpp:
(WebCore::verticalScrollDistance): Use Scrollbar methods instead of
constants, and cap the scroll distance if needed.
* platform/ScrollView.cpp:
(WebCore::ScrollView::updateScrollbars): Ditto.
(WebCore::ScrollView::wheelEvent): Ditto.
* platform/Scrollbar.cpp:
(WebCore::Scrollbar::maxOverlapBetweenPages): Added. Returns the
value from the native scrollbar theme.
* platform/Scrollbar.h: Replaced scroll amount constants with static methods.
(WebCore::Scrollbar::pixelsPerLineStep): Replaces cScrollbarPixelsPerLineStep.
(WebCore::Scrollbar::minFractionToStepWhenPaging): Replaces cFractionToStepWhenPaging.
* platform/ScrollbarTheme.h:
(WebCore::ScrollbarTheme::maxOverlapBetweenPages): A base implementation
that returns the largest int.
* platform/gtk/WheelEventGtk.cpp:
(WebCore::PlatformWheelEvent::PlatformWheelEvent): Use Scrollbar methods instead of
constants.
* platform/haiku/PlatformWheelEventHaiku.cpp:
(WebCore::PlatformWheelEvent::PlatformWheelEvent): Use Scrollbar methods instead of
constants.
* platform/mac/ScrollbarThemeMac.h:
(WebCore::ScrollbarThemeMac::maxOverlapBetweenPages): An override
that returns 40.
* platform/mac/WheelEventMac.mm:
(WebCore::PlatformWheelEvent::PlatformWheelEvent): Use
Scrollbar::pixelsPerLineStep() instead of cScrollbarPixelsPerLineStep.
* platform/wx/MouseWheelEventWx.cpp:
(WebCore::PlatformWheelEvent::PlatformWheelEvent): Use Scrollbar methods instead of
constants.
* platform/wx/ScrollViewWx.cpp:
(WebCore::ScrollView::ScrollViewPrivate::OnScrollWinEvents): Use Scrollbar
methods instead of constants, and cap the scroll distance if needed.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateScrollInfoAfterLayout): Ditto.

WebKit/mac:

* WebView/WebFrameView.mm:
(-[WebFrameView _verticalPageScrollDistance]): Use Scrollbar methods instead of
constants, and cap the scroll distance.
(-[WebFrameView initWithFrame:]): Use Scrollbar::pixelsPerLineStep() instead of
cScrollbarPixelsPerLineStep.
(-[WebFrameView _horizontalPageScrollDistance]):Use Scrollbar methods instead of
constants, and cap the scroll distance.

WebKit/wx:

* WebView.cpp:
(wxWebView::OnKeyEvents): Use Scrollbar method instead of constant.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@54345 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
WebCore/ChangeLog
WebCore/WebCore.base.exp
WebCore/editing/EditorCommand.cpp
WebCore/platform/ScrollView.cpp
WebCore/platform/Scrollbar.cpp
WebCore/platform/Scrollbar.h
WebCore/platform/ScrollbarTheme.h
WebCore/platform/gtk/WheelEventGtk.cpp
WebCore/platform/haiku/PlatformWheelEventHaiku.cpp
WebCore/platform/mac/ScrollbarThemeMac.h
WebCore/platform/mac/WheelEventMac.mm
WebCore/platform/wx/MouseWheelEventWx.cpp
WebCore/platform/wx/ScrollViewWx.cpp
WebCore/rendering/RenderLayer.cpp
WebKit/mac/ChangeLog
WebKit/mac/WebView/WebFrameView.mm
WebKit/wx/ChangeLog
WebKit/wx/WebView.cpp