| Index: Source/web/ScrollbarGroup.cpp
|
| diff --git a/Source/web/ScrollbarGroup.cpp b/Source/web/ScrollbarGroup.cpp
|
| index 3fa766eb82ec47b613fa053f8b428a105ef5bd5e..f44ec53d67af4d33f50ec5c4575114ebedd6ea9f 100644
|
| --- a/Source/web/ScrollbarGroup.cpp
|
| +++ b/Source/web/ScrollbarGroup.cpp
|
| @@ -100,14 +100,6 @@ int ScrollbarGroup::scrollSize(WebCore::ScrollbarOrientation orientation) const
|
| return scrollbar->totalSize() - scrollbar->visibleSize();
|
| }
|
|
|
| -int ScrollbarGroup::scrollPosition(Scrollbar* scrollbar) const
|
| -{
|
| - WebPluginScrollbarImpl* webScrollbar = scrollbar->orientation() == HorizontalScrollbar ? m_horizontalScrollbar : m_verticalScrollbar;
|
| - if (!webScrollbar)
|
| - return 0;
|
| - return webScrollbar->scrollOffset();
|
| -}
|
| -
|
| void ScrollbarGroup::setScrollOffset(const IntPoint& offset)
|
| {
|
| if (m_horizontalScrollbar && m_horizontalScrollbar->scrollOffset() != offset.x())
|
| @@ -268,4 +260,31 @@ bool ScrollbarGroup::scrollbarsCanBeActive() const
|
| return true;
|
| }
|
|
|
| +bool ScrollbarGroup::userInputScrollable(ScrollbarOrientation orientation) const
|
| +{
|
| + return orientation == HorizontalScrollbar ? horizontalScrollbar() : verticalScrollbar();
|
| +}
|
| +
|
| +int ScrollbarGroup::pageStep(ScrollbarOrientation orientation) const
|
| +{
|
| + int length;
|
| + if (orientation == VerticalScrollbar) {
|
| + if (!m_verticalScrollbar)
|
| + return 0;
|
| +
|
| + length = m_verticalScrollbar->scrollbar()->height();
|
| + } else {
|
| + if (!m_horizontalScrollbar)
|
| + return 0;
|
| +
|
| + length = m_horizontalScrollbar->scrollbar()->width();
|
| + }
|
| +
|
| + int pageStep = std::max(
|
| + static_cast<int>(static_cast<float>(length) * ScrollableArea::minFractionToStepWhenPaging()),
|
| + length - ScrollableArea::maxOverlapBetweenPages());
|
| +
|
| + return std::max(pageStep, 1);
|
| +}
|
| +
|
| } // namespace WebKit
|
|
|