-
mitz@apple.com authored
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: http://svn.webkit.org/repository/webkit/trunk@54345 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ed850038