Source/WebCore: Make "autoscroll for drag'n drop" a setting
authortonikitoo@webkit.org <tonikitoo@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Sep 2013 13:17:07 +0000 (13:17 +0000)
committertonikitoo@webkit.org <tonikitoo@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Sep 2013 13:17:07 +0000 (13:17 +0000)
commita1607377b7d4a10670caea8925bd35570f5eb4b4
tree7bcdb3cf8fd54717fa09a68e0f803d372f7a8401
parent9a9725e7c99273385b13660806afb52a41bf29ef
Source/WebCore: Make "autoscroll for drag'n drop" a setting
https://bugs.webkit.org/show_bug.cgi?id=121559

Reviewed by Ryosuke Niwa.
Patch by Antonio Gomes <a1.gomes@sisa.samsung.com>

Currently, there is a ChromeClient hook to make the
feature opt'ed-in or out. That makes it harder to test the
feature on ports that do not enable it, e.g. Mac/WebKit2 port.
However, Mac/WebKit2 is the port that has the best drag'n drop
WTR implementation.

Patch changes the toggle on/off mechanism to be a setting,
and exposes it through InternalSetting interface for testing.

* page/AutoscrollController.cpp:
(WebCore::AutoscrollController::updateDragAndDrop):
* page/ChromeClient.h:
* page/Settings.in:
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setAutoscrollForDragAndDropEnabled):
* testing/InternalSettings.h:
* testing/InternalSettings.idl:

LayoutTests: Make "autoscroll" for drag'n drop a setting
https://bugs.webkit.org/show_bug.cgi?id=121559

* fast/events/drag-and-drop-autoscroll.html:

Adapts the test so that is toggles the feature on
via InternalSettings interface.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156158 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/events/drag-and-drop-autoscroll.html
Source/WebCore/ChangeLog
Source/WebCore/page/AutoscrollController.cpp
Source/WebCore/page/ChromeClient.h
Source/WebCore/page/Settings.in
Source/WebCore/testing/InternalSettings.cpp
Source/WebCore/testing/InternalSettings.h
Source/WebCore/testing/InternalSettings.idl