EventHandler shouldn't dispatch fake mousemove events when scrolling on devices that...
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Jun 2012 07:38:56 +0000 (07:38 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Jun 2012 07:38:56 +0000 (07:38 +0000)
commitee76a08adf82720d704586d5eae39d409d116ce5
treebfff5d3633827050619e50d4a901bb68865c8e28
parent004531c31317756c83f26ebc058c39067d991180
EventHandler shouldn't dispatch fake mousemove events when scrolling on devices that don't have a mouse
https://bugs.webkit.org/show_bug.cgi?id=88270

Reviewed by James Robinson.

Source/WebCore:

This patch adds a setting analogous to deviceSupportsTouch to determine
whether the device supports mouse. We then don't dispatch fake mouse
events on devices that don't have a mouse in the first place.

Test: fast/events/touch/scroll-without-mouse-lacks-mousemove-events.html

* page/EventHandler.cpp:
(WebCore::EventHandler::fakeMouseMoveEventTimerFired):
* page/Settings.cpp:
(WebCore::Settings::Settings):
* page/Settings.h:
(WebCore::Settings::setDeviceSupportsMouse):
(WebCore::Settings::deviceSupportsMouse):
(Settings):
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::InternalSettings):
(WebCore::InternalSettings::restoreTo):
(WebCore::InternalSettings::setDeviceSupportsMouse):
(WebCore):
* testing/InternalSettings.h:
(InternalSettings):
* testing/InternalSettings.idl:

Source/WebKit/chromium:

* public/WebSettings.h:
* src/WebSettingsImpl.cpp:
(WebKit::WebSettingsImpl::setDeviceSupportsMouse):
(WebKit):
* src/WebSettingsImpl.h:
(WebSettingsImpl):

LayoutTests:

* fast/events/touch/scroll-without-mouse-lacks-mousemove-events-expected.txt: Added.
* fast/events/touch/scroll-without-mouse-lacks-mousemove-events.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@119465 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/events/touch/scroll-without-mouse-lacks-mousemove-events-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/touch/scroll-without-mouse-lacks-mousemove-events.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/page/EventHandler.cpp
Source/WebCore/page/Settings.cpp
Source/WebCore/page/Settings.h
Source/WebCore/testing/InternalSettings.cpp
Source/WebCore/testing/InternalSettings.h
Source/WebCore/testing/InternalSettings.idl
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/public/WebSettings.h
Source/WebKit/chromium/src/WebSettingsImpl.cpp
Source/WebKit/chromium/src/WebSettingsImpl.h