REGRESSION (WK2): Holding down Option while dragging scrollbar thumb has no effect...
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Apr 2011 07:26:53 +0000 (07:26 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Apr 2011 07:26:53 +0000 (07:26 +0000)
commit2b007aaa4b77a3e1bba4b44313085338377fc776
tree57350edbdbfa6e48289506d4dd546d8cd466568e
parent9a6b333a0c2b2abd4c96344add32589166cd2c49
REGRESSION (WK2): Holding down Option while dragging scrollbar thumb has no effect (should make scroll distance equal mouse translation)
https://bugs.webkit.org/show_bug.cgi?id=59315

Reviewed by Maciej Stachowiak.

* platform/Scrollbar.cpp:
(WebCore::Scrollbar::Scrollbar): Initialize new member variables.
(WebCore::Scrollbar::moveThumb): Added a boolean draggingDocument parameter. When true, the document
is scrolled a distance equal to the change in the mouse position.
(WebCore::Scrollbar::mouseMoved): Check with the theme whether the mouse move event should drag
the document rather than the thumb, and pass the result to moveThumb.
(WebCore::Scrollbar::mouseUp): Reset m_draggingDocument.
* platform/Scrollbar.h:
* platform/ScrollbarTheme.h:
(WebCore::ScrollbarTheme::shouldDragDocumentInsteadOfThumb): Added. The base class implementation
returns false.
* platform/mac/ScrollbarThemeMac.h:
* platform/mac/ScrollbarThemeMac.mm:
(WebCore::ScrollbarThemeMac::shouldDragDocumentInsteadOfThumb): Overridden to return true if the
Option key is down.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@84767 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/Scrollbar.cpp
Source/WebCore/platform/Scrollbar.h
Source/WebCore/platform/ScrollbarTheme.h
Source/WebCore/platform/mac/ScrollbarThemeMac.h
Source/WebCore/platform/mac/ScrollbarThemeMac.mm