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)
commit6c6f2e89d2cb89af69b3d2ab076bf025d94a7128
tree57350edbdbfa6e48289506d4dd546d8cd466568e
parent4d1e6dfdbd565163203bda276ce18b4945f6515e
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: https://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