2010-09-08 Peter Kasting <pkasting@google.com>
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Sep 2010 19:31:47 +0000 (19:31 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Sep 2010 19:31:47 +0000 (19:31 +0000)
commit31d98edfe6f8f7556c6921f4824d93754fcb5992
treeaa80aeb8b52380c9f60cdc91f1882ca80d8772c1
parentf734f8439a024875412d62d8df58a78c62a710cc
2010-09-08  Peter Kasting  <pkasting@google.com>

        Reviewed by David Hyatt.

        Add smooth scrolling framework, and a Windows implementation.
        https://bugs.webkit.org/show_bug.cgi?id=32356

        * wscript: Add Windows ScrollAnimator.
2010-09-08  Peter Kasting  <pkasting@google.com>

        Reviewed by David Hyatt.

        Add smooth scrolling framework, and a Windows implementation.
        https://bugs.webkit.org/show_bug.cgi?id=32356

        * CMakeLists.txt: Add ScrollAnimator.
        * GNUmakefile.am: Add ScrollAnimator.
        * WebCore.gyp/WebCore.gyp: Add Windows ScrollAnimator.
        * WebCore.gypi: Add ScrollAnimator.
        * WebCore.pro: Add ScrollAnimator.
        * WebCore.vcproj/WebCore.vcproj: Add ScrollAnimator.
        * WebCore.xcodeproj/project.pbxproj: Add ScrollAnimator.
        * platform/ScrollAnimator.cpp: Added base implementation that does no animation.
        (WebCore::ScrollAnimator::create):
        (WebCore::ScrollAnimator::scroll):
        (WebCore::ScrollAnimator::setScrollPositionAndStopAnimation):
        * platform/ScrollAnimator.h: Added base implementation that does no animation.
        (WebCore::ScrollAnimator::ScrollAnimator):
        (WebCore::ScrollAnimator::~ScrollAnimator):
        * platform/ScrollAnimatorWin.cpp: Added Windows subclass that animates scrolls.
        (WebCore::ScrollAnimator::create):
        (WebCore::ScrollAnimatorWin::PerAxisData::PerAxisData):
        (WebCore::ScrollAnimatorWin::ScrollAnimatorWin):
        (WebCore::ScrollAnimatorWin::~ScrollAnimatorWin):
        (WebCore::ScrollAnimatorWin::scroll):
        (WebCore::ScrollAnimatorWin::setScrollPositionAndStopAnimation):
        (WebCore::ScrollAnimatorWin::accelerationTime):
        (WebCore::ScrollAnimatorWin::animationTimerFired):
        (WebCore::ScrollAnimatorWin::stopAnimationTimerIfNeeded):
        (WebCore::ScrollAnimatorWin::animateScroll):
        * platform/ScrollAnimatorWin.h: Added Windows subclass that animates scrolls.
        * platform/ScrollView.cpp: Implement new ScrollbarClient functions.  Allow wheel scrolls to be animated.
        (WebCore::ScrollView::scrollSize):
        (WebCore::ScrollView::setScrollOffsetFromAnimation):
        (WebCore::ScrollView::updateScrollbars):
        (WebCore::ScrollView::wheelEvent):
        * platform/ScrollView.h: Implement new ScrollbarClient functions.
        * platform/Scrollbar.cpp: Allow ScrollAnimator to handle scrolls if present.
        (WebCore::Scrollbar::setValue):
        (WebCore::Scrollbar::scroll):
        (WebCore::Scrollbar::moveThumb):
        (WebCore::Scrollbar::setCurrentPos):
        (WebCore::Scrollbar::mouseMoved):
        * platform/Scrollbar.h:
        * platform/ScrollbarClient.cpp: Added to avoid having to make ScrollAnimator.h non-private.
        (WebCore::ScrollbarClient::ScrollbarClient):
        (WebCore::ScrollbarClient::~ScrollbarClient):
        (WebCore::ScrollbarClient::scroll):
        (WebCore::ScrollbarClient::setScrollPositionAndStopAnimation):
        * platform/ScrollbarClient.h: Add hooks for ScrollAnimator.
        (WebCore::ScrollbarClient::convertFromScrollbarToContainingView):
        (WebCore::ScrollbarClient::convertFromContainingViewToScrollbar):
        * platform/gtk/MainFrameScrollbarGtk.cpp:
        (MainFrameScrollbarGtk::gtkValueChanged):
        * platform/qt/ScrollbarQt.cpp: Use scroll() in preference to setValue().
        (WebCore::Scrollbar::contextMenu):
        * platform/win/PopupMenuWin.cpp: Implement new ScrollbarClient functions.
        (WebCore::PopupMenuWin::scrollSize):
        (WebCore::PopupMenuWin::setScrollOffsetFromAnimation):
        * platform/win/PopupMenuWin.h: Implement new ScrollbarClient functions.
        * rendering/RenderDataGrid.cpp: Implement new ScrollbarClient functions.
        (WebCore::RenderDataGrid::scrollSize):
        (WebCore::RenderDataGrid::setScrollOffsetFromAnimation):
        * rendering/RenderDataGrid.h: Implement new ScrollbarClient functions.
        * rendering/RenderLayer.cpp: Implement new ScrollbarClient functions.
        (WebCore::RenderLayer::scrollToOffset):
        (WebCore::RenderLayer::scrollSize):
        (WebCore::RenderLayer::setScrollOffsetFromAnimation):
        (WebCore::RenderLayer::updateScrollInfoAfterLayout):
        * rendering/RenderLayer.h: Implement new ScrollbarClient functions.
        * rendering/RenderListBox.cpp: Implement new ScrollbarClient functions.
        (WebCore::RenderListBox::scrollToRevealElementAtListIndex):
        (WebCore::RenderListBox::scrollSize):
        (WebCore::RenderListBox::setScrollOffsetFromAnimation):
        (WebCore::RenderListBox::setScrollTop):
        * rendering/RenderListBox.h: Implement new ScrollbarClient functions.
2010-09-08  Peter Kasting  <pkasting@google.com>

        Reviewed by David Hyatt.

        Add smooth scrolling framework, and a Windows implementation.
        https://bugs.webkit.org/show_bug.cgi?id=32356

        * src/WebScrollbarImpl.cpp: Plumb new ScrollbarClient functions.  Allow wheel scrolls to be animated.
        (WebKit::WebScrollbarImpl::setLocation):
        (WebKit::WebScrollbarImpl::setValue):
        (WebKit::WebScrollbarImpl::scroll):
        (WebKit::WebScrollbarImpl::onMouseWheel):
        (WebKit::WebScrollbarImpl::onKeyDown):
        (WebKit::WebScrollbarImpl::setScrollOffsetFromAnimation):
        * src/WebScrollbarImpl.h: Plumb new ScrollbarClient functions.
        * src/win/WebInputEventFactory.cpp: Update comments now that we have smooth scrolling.
        (WebKit::WebInputEventFactory::mouseWheelEvent):
2010-09-08  Peter Kasting  <pkasting@google.com>

        Reviewed by David Hyatt.

        Add smooth scrolling framework, and a Windows implementation.
        https://bugs.webkit.org/show_bug.cgi?id=32356

        * Api/qwebframe.cpp:
        (QWebFrame::setScrollBarValue):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@67001 268f45cc-cd09-0410-ab3c-d52691b4dbfc
36 files changed:
ChangeLog
WebCore/CMakeLists.txt
WebCore/ChangeLog
WebCore/GNUmakefile.am
WebCore/WebCore.gyp/WebCore.gyp
WebCore/WebCore.gypi
WebCore/WebCore.pro
WebCore/WebCore.vcproj/WebCore.vcproj
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/platform/ScrollAnimator.cpp [new file with mode: 0644]
WebCore/platform/ScrollAnimator.h [new file with mode: 0644]
WebCore/platform/ScrollAnimatorWin.cpp [new file with mode: 0644]
WebCore/platform/ScrollAnimatorWin.h [new file with mode: 0644]
WebCore/platform/ScrollView.cpp
WebCore/platform/ScrollView.h
WebCore/platform/Scrollbar.cpp
WebCore/platform/Scrollbar.h
WebCore/platform/ScrollbarClient.cpp [new file with mode: 0644]
WebCore/platform/ScrollbarClient.h
WebCore/platform/gtk/MainFrameScrollbarGtk.cpp
WebCore/platform/qt/ScrollbarQt.cpp
WebCore/platform/win/PopupMenuWin.cpp
WebCore/platform/win/PopupMenuWin.h
WebCore/rendering/RenderDataGrid.cpp
WebCore/rendering/RenderDataGrid.h
WebCore/rendering/RenderLayer.cpp
WebCore/rendering/RenderLayer.h
WebCore/rendering/RenderListBox.cpp
WebCore/rendering/RenderListBox.h
WebKit/chromium/ChangeLog
WebKit/chromium/src/WebScrollbarImpl.cpp
WebKit/chromium/src/WebScrollbarImpl.h
WebKit/chromium/src/win/WebInputEventFactory.cpp
WebKit/qt/Api/qwebframe.cpp
WebKit/qt/ChangeLog
wscript