Reviewers: aelias_OOO_until_Dec1
CL:
https://codereview.chromium.org/2536723007/Message:
PTAL
Description:
When a user scrolls we need to generate fake mouse moves since the cursor is
moving
relative to the page (for example you might scroll over an element that has an
mouseover event listener). Currently Android and blink have separate code-paths
for
generating these fake mouse moves. This CL removes the Android specific
code-path
and makes Android use the blink code-path.
BUG=492738
Affected files (+13, -69 lines):
M content/browser/renderer_host/render_view_host_impl.cc
M content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
M content/public/common/common_param_traits_macros.h
M content/public/common/web_preferences.h
M content/public/common/web_preferences.cc
M content/renderer/render_view_impl.cc
M third_party/WebKit/LayoutTests/fast/events/touch/scroll-without-mouse-lacks-mousemove-events.html
M third_party/WebKit/Source/core/dom/Document.cpp
M third_party/WebKit/Source/core/frame/FrameView.cpp
M third_party/WebKit/Source/core/frame/Settings.in
M third_party/WebKit/Source/core/input/EventHandler.h
M third_party/WebKit/Source/core/input/EventHandler.cpp
M third_party/WebKit/Source/core/input/MouseEventManager.cpp
M third_party/WebKit/Source/core/page/Page.cpp
M third_party/WebKit/Source/web/DevToolsEmulator.h
M third_party/WebKit/Source/web/DevToolsEmulator.cpp
M third_party/WebKit/Source/web/WebSettingsImpl.h
M third_party/WebKit/Source/web/WebSettingsImpl.cpp
M third_party/WebKit/Source/web/tests/FrameTestHelpers.cpp
M third_party/WebKit/Source/web/tests/LinkSelectionTest.cpp
M third_party/WebKit/Source/web/tests/WebFrameTest.cpp
M third_party/WebKit/public/web/WebSettings.h
Index: content/browser/renderer_host/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 4e00e0974ed3cb8cdd9867e5cb097d6bcd76884d..270bde6510f3221a1cab8084672b7d7a8f2d27e9 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -455,10 +455,6 @@ WebPreferences RenderViewHostImpl::ComputeWebkitPrefs() {
prefs.primary_hover_type =
ui::GetPrimaryHoverType(prefs.available_hover_types);
-#if defined(OS_ANDROID)
- prefs.device_supports_mouse = false;
-#endif
-
prefs.pointer_events_max_touch_points = ui::MaxTouchPoints();
prefs.touch_adjustment_enabled =
Index: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
index f6bfde1f5678cfd906f2c7c86955761b1670336e..ca3f2d2486155c0bb8f3b49c1ec6542c11aa0a68 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
+++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
@@ -326,8 +326,6 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Displa
private OverscrollRefreshHandler mOverscrollRefreshHandler;
- private Runnable mFakeMouseMoveRunnable = null;
-
// Only valid when focused on a text / password field.
private ImeAdapter mImeAdapter;
@@ -1027,7 +1025,6 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Displa
MotionEvent offsetEvent = createOffsetMotionEvent(event);
try {
- mContainerView.removeCallbacks(mFakeMouseMoveRunnable);
if (mNativeContentViewCore == 0) return false;
int eventAction = event.getActionMasked();
@@ -1622,7 +1619,6 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Displa
if (!mEnableTouchHover.booleanValue()) return false;
}
- mContainerView.removeCallbacks(mFakeMouseMoveRunnable);
if (mNativeContentViewCore != 0) {
nativeSendMouseEvent(mNativeContentViewCore, event.getEventTime(), eventAction,
offset.getX(), offset.getY(), event.getPointerId(0), event.getPressure(0),
@@ -1654,20 +1650,6 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Displa
event.getAxisValue(MotionEvent.AXIS_HSCROLL),
event.getAxisValue(MotionEvent.AXIS_VSCROLL),
mRenderCoordinates.getWheelScrollFactor());
-
- // TODO(mustaq): Delete mFakeMouseMoveRunnable, see
crbug.com/492738- mContainerView.removeCallbacks(mFakeMouseMoveRunnable);
- // Send a delayed onMouseMove event so that we end
- // up hovering over the right position after the scroll.
- final MotionEvent eventFakeMouseMove = MotionEvent.obtain(event);
- mFakeMouseMoveRunnable = new Runnable() {
- @Override
- public void run() {
- onHoverEvent(eventFakeMouseMove);
- eventFakeMouseMove.recycle();
- }
- };
- mContainerView.postDelayed(mFakeMouseMoveRunnable, 250);
return true;
case MotionEvent.ACTION_BUTTON_PRESS:
case MotionEvent.ACTION_BUTTON_RELEASE:
Index: content/public/common/common_param_traits_macros.h
diff --git a/content/public/common/common_param_traits_macros.h b/content/public/common/common_param_traits_macros.h
index c7c9296dfe149ee1bfbf0a3b3667b6c95961ba1c..aea6e3129e3722d54a5af855640e8f2f3a6b2211 100644
--- a/content/public/common/common_param_traits_macros.h
+++ b/content/public/common/common_param_traits_macros.h
@@ -181,7 +181,6 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences)
IPC_STRUCT_TRAITS_MEMBER(should_clear_document_background)
IPC_STRUCT_TRAITS_MEMBER(touch_event_api_enabled)
IPC_STRUCT_TRAITS_MEMBER(device_supports_touch)
- IPC_STRUCT_TRAITS_MEMBER(device_supports_mouse)
IPC_STRUCT_TRAITS_MEMBER(touch_adjustment_enabled)
IPC_STRUCT_TRAITS_MEMBER(pointer_events_max_touch_points)
IPC_STRUCT_TRAITS_MEMBER(available_pointer_types)
Index: content/public/common/web_preferences.cc
diff --git a/content/public/common/web_preferences.cc b/content/public/common/web_preferences.cc
index 64eafb6ddc68b47455b8ad2143f2bdc801ea7262..1151e490acb55e6c783f2db18104d0db74b6704b 100644
--- a/content/public/common/web_preferences.cc
+++ b/content/public/common/web_preferences.cc
@@ -129,7 +129,6 @@ WebPreferences::WebPreferences()
enable_scroll_animator(false),
touch_event_api_enabled(false),
device_supports_touch(false),
- device_supports_mouse(true),
touch_adjustment_enabled(true),
pointer_events_max_touch_points(0),
available_pointer_types(0),
Index: content/public/common/web_preferences.h
diff --git a/content/public/common/web_preferences.h b/content/public/common/web_preferences.h
index d7e3f80a2b5c22179f4b20d5513c4aa9943e3f2b..87306254004d89474541a8adeb0f682f13bb0e35 100644
--- a/content/public/common/web_preferences.h
+++ b/content/public/common/web_preferences.h
@@ -161,8 +161,6 @@ struct CONTENT_EXPORT WebPreferences {
bool touch_event_api_enabled;
// TODO(mustaq): Nuke when the new API is ready
bool device_supports_touch;
- // TODO(mustaq): Nuke when the new API is ready
- bool device_supports_mouse;
bool touch_adjustment_enabled;
int pointer_events_max_touch_points;
int available_pointer_types;
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index c20b3e7b239909790442217beb0147e487aaa366..9b19f2e60309daf1c0f04b6c89756bfb89b6c783 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -933,7 +933,6 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs,
settings->setPrimaryHoverType(
static_cast<blink::HoverType>(prefs.primary_hover_type));
settings->setDeviceSupportsTouch(prefs.device_supports_touch);
- settings->setDeviceSupportsMouse(prefs.device_supports_mouse);
settings->setEnableTouchAdjustment(prefs.touch_adjustment_enabled);
WebRuntimeFeatures::enableColorCorrectRendering(
Index: third_party/WebKit/LayoutTests/fast/events/touch/scroll-without-mouse-lacks-mousemove-events.html
diff --git a/third_party/WebKit/LayoutTests/fast/events/touch/scroll-without-mouse-lacks-mousemove-events.html b/third_party/WebKit/LayoutTests/fast/events/touch/scroll-without-mouse-lacks-mousemove-events.html
index 101a0676b2c20806b2211ef64d8d14c66de45fae..837ad73605e72246c77fc4dee57016a7f342300a 100644
--- a/third_party/WebKit/LayoutTests/fast/events/touch/scroll-without-mouse-lacks-mousemove-events.html
+++ b/third_party/WebKit/LayoutTests/fast/events/touch/scroll-without-mouse-lacks-mousemove-events.html
@@ -2,11 +2,6 @@
<html>
<head>
<script>
-if (window.internals)
- window.internals.settings.setDeviceSupportsMouse(false);
-else
- alert("This test requires window.internals");
-
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
Index: third_party/WebKit/Source/core/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index a57215a72eea90757a14e3076e16739b997ac7c1..ce317634e859d63dffc2649abe9e9d43c6016cb9 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -3830,7 +3830,7 @@ void Document::hoveredNodeDetached(Element& element) {
if (!page()->isCursorVisible())
return;
- if (frame())
+ if (frame() && !frame()->eventHandler().isMousePositionUnknown())
frame()->eventHandler().scheduleHoverStateUpdate();
}
Index: third_party/WebKit/Source/core/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index 3524f4d76886fecba87d9725b2c88cfc03c5905c..931177523a1f97a82363f98d47747fa363395e32 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -1588,8 +1588,8 @@ IntPoint FrameView::lastKnownMousePosition() const {
bool FrameView::shouldSetCursor() const {
Page* page = frame().page();
return page && page->visibilityState() != PageVisibilityStateHidden &&
- page->focusController().isActive() &&
- page->settings().deviceSupportsMouse();
+ !m_frame->eventHandler().isMousePositionUnknown() &&
+ page->focusController().isActive();
}
void FrameView::scrollContentsIfNeededRecursive() {
@@ -3551,7 +3551,7 @@ AXObjectCache* FrameView::axObjectCache() const {
void FrameView::setCursor(const Cursor& cursor) {
Page* page = frame().page();
- if (!page || !page->settings().deviceSupportsMouse())
+ if (!page || m_frame->eventHandler().isMousePositionUnknown())
return;
page->chromeClient().setCursor(cursor, m_frame);
}
Index: third_party/WebKit/Source/core/frame/Settings.in
diff --git a/third_party/WebKit/Source/core/frame/Settings.in b/third_party/WebKit/Source/core/frame/Settings.in
index 541250cf3248876659187fcd43502fe8c4c7922f..ff4c06b83f8d06365fb08062069dd5a7956065c5 100644
--- a/third_party/WebKit/Source/core/frame/Settings.in
+++ b/third_party/WebKit/Source/core/frame/Settings.in
@@ -117,7 +117,6 @@ shouldRespectImageOrientation initial=false
# or uses it (i.e. Chromebook Pixel users generally don't want to give up
# screen real estate just because they happen to have a touchscreen).
deviceSupportsTouch initial=false
-deviceSupportsMouse initial=true
# This value indicates the number of simultaneous multi-touch points supported
# by the currently connected screen/digitizer that supports the most points.
Index: third_party/WebKit/Source/core/input/EventHandler.cpp
diff --git a/third_party/WebKit/Source/core/input/EventHandler.cpp b/third_party/WebKit/Source/core/input/EventHandler.cpp
index 7392c05f87f8539a34af6f555b953bedd4a4c37c..135b221a2972f00f8a26f1171bb1bd651df49d5c 100644
--- a/third_party/WebKit/Source/core/input/EventHandler.cpp
+++ b/third_party/WebKit/Source/core/input/EventHandler.cpp
@@ -361,9 +361,6 @@ void EventHandler::updateCursor() {
// cursor update could be occluded by a different frame.
ASSERT(m_frame == m_frame->localFrameRoot());
- if (m_mouseEventManager->isMousePositionUnknown())
- return;
-
FrameView* view = m_frame->view();
if (!view || !view->shouldSetCursor())
return;
Index: third_party/WebKit/Source/core/input/EventHandler.h
diff --git a/third_party/WebKit/Source/core/input/EventHandler.h b/third_party/WebKit/Source/core/input/EventHandler.h
index 983b92df000d798d470314099e95d53d680101cb..861269292b4616c92365b254c2b8831a3190c524 100644
--- a/third_party/WebKit/Source/core/input/EventHandler.h
+++ b/third_party/WebKit/Source/core/input/EventHandler.h
@@ -109,6 +109,9 @@ class CORE_EXPORT EventHandler final
const LayoutSize& padding = LayoutSize());
bool mousePressed() const { return m_mouseEventManager->mousePressed(); }
+ bool isMousePositionUnknown() const {
+ return m_mouseEventManager->isMousePositionUnknown();
+ }
void setCapturingMouseEventsNode(
Node*); // A caller is responsible for resetting capturing node to 0.
Index: third_party/WebKit/Source/core/input/MouseEventManager.cpp
diff --git a/third_party/WebKit/Source/core/input/MouseEventManager.cpp b/third_party/WebKit/Source/core/input/MouseEventManager.cpp
index 1810c69b2dc98d618b3f14166d5c977752046200..e692b88f948ab1a78f0bef220ddbb63eb53a8b6b 100644
--- a/third_party/WebKit/Source/core/input/MouseEventManager.cpp
+++ b/third_party/WebKit/Source/core/input/MouseEventManager.cpp
@@ -283,8 +283,7 @@ void MouseEventManager::fakeMouseMoveEventTimerFired(TimerBase* timer) {
DCHECK(timer == &m_fakeMouseMoveEventTimer);
DCHECK(!m_mousePressed);
- Settings* settings = m_frame->settings();
- if (settings && !settings->deviceSupportsMouse())
+ if (m_isMousePositionUnknown)
return;
FrameView* view = m_frame->view();
@@ -530,10 +529,6 @@ void MouseEventManager::dispatchFakeMouseMoveEventSoon() {
if (m_isMousePositionUnknown)
return;
- Settings* settings = m_frame->settings();
- if (settings && !settings->deviceSupportsMouse())
- return;
-
// Reschedule the timer, to prevent dispatching mouse move events
// during a scroll. This avoids a potential source of scroll jank.
m_fakeMouseMoveEventTimer.startOneShot(kFakeMouseMoveInterval,
Index: third_party/WebKit/Source/core/page/Page.cpp
diff --git a/third_party/WebKit/Source/core/page/Page.cpp b/third_party/WebKit/Source/core/page/Page.cpp
index 9f0f41c7b54da782a8403ff3ba28394b572689b2..4c4fabf3318440ccf95ef5f96281f95f7917bdd5 100644
--- a/third_party/WebKit/Source/core/page/Page.cpp
+++ b/third_party/WebKit/Source/core/page/Page.cpp
@@ -331,7 +331,7 @@ bool Page::isPageVisible() const {
}
bool Page::isCursorVisible() const {
- return m_isCursorVisible && settings().deviceSupportsMouse();
+ return m_isCursorVisible;
}
void Page::settingsChanged(SettingsDelegate::ChangeType changeType) {
Index: third_party/WebKit/Source/web/DevToolsEmulator.cpp
diff --git a/third_party/WebKit/Source/web/DevToolsEmulator.cpp b/third_party/WebKit/Source/web/DevToolsEmulator.cpp
index 1d33bea9aeb7eb7194c0c22a783f4460760a5865..6f5662fcf47df6f2c043d7af4aa93b6173969650 100644
--- a/third_party/WebKit/Source/web/DevToolsEmulator.cpp
+++ b/third_party/WebKit/Source/web/DevToolsEmulator.cpp
@@ -90,7 +90,6 @@ DevToolsEmulator::DevToolsEmulator(WebViewImpl* webViewImpl)
m_touchEventEmulationEnabled(false),
m_doubleTapToZoomEnabled(false),
m_originalTouchEventAPIEnabled(false),
- m_originalDeviceSupportsMouse(false),
m_originalDeviceSupportsTouch(false),
m_originalMaxTouchPoints(0),
m_embedderScriptEnabled(webViewImpl->page()->settings().scriptEnabled()),
@@ -448,8 +447,6 @@ void DevToolsEmulator::setTouchEventEmulationEnabled(bool enabled) {
if (!m_touchEventEmulationEnabled) {
m_originalTouchEventAPIEnabled =
RuntimeEnabledFeatures::touchEventAPIEnabled();
- m_originalDeviceSupportsMouse =
- m_webViewImpl->page()->settings().deviceSupportsMouse();
m_originalDeviceSupportsTouch =
m_webViewImpl->page()->settings().deviceSupportsTouch();
m_originalMaxTouchPoints =
@@ -458,8 +455,6 @@ void DevToolsEmulator::setTouchEventEmulationEnabled(bool enabled) {
RuntimeEnabledFeatures::setTouchEventAPIEnabled(
enabled ? true : m_originalTouchEventAPIEnabled);
if (!m_originalDeviceSupportsTouch) {
- m_webViewImpl->page()->settings().setDeviceSupportsMouse(
- enabled ? false : m_originalDeviceSupportsMouse);
m_webViewImpl->page()->settings().setDeviceSupportsTouch(
enabled ? true : m_originalDeviceSupportsTouch);
// Currently emulation does not provide multiple touch points.
Index: third_party/WebKit/Source/web/DevToolsEmulator.h
diff --git a/third_party/WebKit/Source/web/DevToolsEmulator.h b/third_party/WebKit/Source/web/DevToolsEmulator.h
index 6581f06d0f6068b764c8fa2b312004e412be1fa5..f329977fdda23d33a33a16c581ca8a5fad8002ea 100644
--- a/third_party/WebKit/Source/web/DevToolsEmulator.h
+++ b/third_party/WebKit/Source/web/DevToolsEmulator.h
@@ -110,7 +110,6 @@ class WEB_EXPORT DevToolsEmulator final
bool m_touchEventEmulationEnabled;
bool m_doubleTapToZoomEnabled;
bool m_originalTouchEventAPIEnabled;
- bool m_originalDeviceSupportsMouse;
bool m_originalDeviceSupportsTouch;
int m_originalMaxTouchPoints;
std::unique_ptr<IntPoint> m_lastPinchAnchorCss;
Index: third_party/WebKit/Source/web/WebSettingsImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebSettingsImpl.cpp b/third_party/WebKit/Source/web/WebSettingsImpl.cpp
index e589765e89054093410fbfe60dd084b8be4a987a..e580c22c07d3cb8122d99a4734c49bfc2fcac4cb 100644
--- a/third_party/WebKit/Source/web/WebSettingsImpl.cpp
+++ b/third_party/WebKit/Source/web/WebSettingsImpl.cpp
@@ -143,10 +143,6 @@ void WebSettingsImpl::setDeviceSupportsTouch(bool deviceSupportsTouch) {
m_settings->setDeviceSupportsTouch(deviceSupportsTouch);
}
-void WebSettingsImpl::setDeviceSupportsMouse(bool deviceSupportsMouse) {
- m_settings->setDeviceSupportsMouse(deviceSupportsMouse);
-}
-
void WebSettingsImpl::setAutoZoomFocusedNodeToLegibleScale(
bool autoZoomFocusedNodeToLegibleScale) {
m_autoZoomFocusedNodeToLegibleScale = autoZoomFocusedNodeToLegibleScale;
Index: third_party/WebKit/Source/web/WebSettingsImpl.h
diff --git a/third_party/WebKit/Source/web/WebSettingsImpl.h b/third_party/WebKit/Source/web/WebSettingsImpl.h
index ecfde10fed30305badc80ee36fd2324712bfc751..f16e5acb4928542042319cdebf45fbb59adadd26 100644
--- a/third_party/WebKit/Source/web/WebSettingsImpl.h
+++ b/third_party/WebKit/Source/web/WebSettingsImpl.h
@@ -81,7 +81,6 @@ class WEB_EXPORT WebSettingsImpl final : NON_EXPORTED_BASE(public WebSettings) {
void setDeviceScaleAdjustment(float) override;
// FIXME: Replace these two with pointer/hover queries?
crbug.com/441813- void setDeviceSupportsMouse(bool) override;
void setDeviceSupportsTouch(bool) override;
void setDisableReadingFromCanvas(bool) override;
Index: third_party/WebKit/Source/web/tests/FrameTestHelpers.cpp
diff --git a/third_party/WebKit/Source/web/tests/FrameTestHelpers.cpp b/third_party/WebKit/Source/web/tests/FrameTestHelpers.cpp
index 2fdf07da1f456160a12f198bd78b210f84e27a63..5869043494204caef22852e05baf128cdb056579 100644
--- a/third_party/WebKit/Source/web/tests/FrameTestHelpers.cpp
+++ b/third_party/WebKit/Source/web/tests/FrameTestHelpers.cpp
@@ -229,8 +229,6 @@ WebViewImpl* WebViewHelper::initializeWithOpener(
m_webView->settings()->setLoadsImagesAutomatically(true);
if (updateSettingsFunc)
updateSettingsFunc(m_webView->settings());
- else
- m_webView->settings()->setDeviceSupportsMouse(false);
if (m_settingOverrider)
m_settingOverrider->overrideSettings(m_webView->settings());
m_webView->setDeviceScaleFactor(
Index: third_party/WebKit/Source/web/tests/LinkSelectionTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/LinkSelectionTest.cpp b/third_party/WebKit/Source/web/tests/LinkSelectionTest.cpp
index cb91fcbb89dedee5aafc159ed7f865e8bb280b2e..2a653dc5289189e5ec4cef0ff8fe24032d8d7dbe 100644
--- a/third_party/WebKit/Source/web/tests/LinkSelectionTest.cpp
+++ b/third_party/WebKit/Source/web/tests/LinkSelectionTest.cpp
@@ -127,11 +127,8 @@ class LinkSelectionTest : public LinkSelectionTestBase {
"foobar</a>"
"<div id='page_text'>Lorem ipsum dolor sit amet</div>";
- // We need to set deviceSupportsMouse setting to true and page's focus
- // controller to active so that FrameView can set the mouse cursor.
- m_webView = m_helper.initialize(
- false, &m_testFrameClient, nullptr, nullptr,
- [](WebSettings* settings) { settings->setDeviceSupportsMouse(true); });
+ m_webView = m_helper.initialize(false, &m_testFrameClient, nullptr, nullptr,
+ [](WebSettings* settings) {});
m_mainFrame = m_webView->mainFrameImpl();
FrameTestHelpers::loadHTMLString(
m_mainFrame, kHTMLString, URLTestHelpers::toKURL("
http://foobar.com"));
Index: third_party/WebKit/Source/web/tests/WebFrameTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
index ade7eb5229740517156b9be6fb893607ccaad600..47332b7984bc1fa97234958dcadda3720d10ecb8 100644
--- a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
@@ -10609,9 +10609,8 @@ TEST_F(WebFrameTest, HidingScrollbarsOnScrollableAreaDisablesScrollbars) {
// elements below unless the scrollbar is faded out.
TEST_F(WebFrameTest, MouseOverLinkAndOverlayScrollbar) {
FrameTestHelpers::WebViewHelper webViewHelper;
- webViewHelper.initialize(
- true, nullptr, nullptr, nullptr,
- [](WebSettings* settings) { settings->setDeviceSupportsMouse(true); });
+ webViewHelper.initialize(true, nullptr, nullptr, nullptr,
+ [](WebSettings* settings) {});
webViewHelper.resize(WebSize(20, 20));
WebViewImpl* webView = webViewHelper.webView();
Index: third_party/WebKit/public/web/WebSettings.h
diff --git a/third_party/WebKit/public/web/WebSettings.h b/third_party/WebKit/public/web/WebSettings.h
index 488a1b56ba5476e56239dfaa80cfe109d2e37011..943305837368950ce578ff5a4243b62f17cd919c 100644
--- a/third_party/WebKit/public/web/WebSettings.h
+++ b/third_party/WebKit/public/web/WebSettings.h
@@ -161,7 +161,6 @@ class WebSettings {
virtual void setDefaultVideoPosterURL(const WebString&) = 0;
void setDeferred2dCanvasEnabled(bool) {} // temporary stub
virtual void setDeviceScaleAdjustment(float) = 0;
- virtual void setDeviceSupportsMouse(bool) = 0;
virtual void setDeviceSupportsTouch(bool) = 0;
virtual void setDisableReadingFromCanvas(bool) = 0;
virtual void setDoubleTapToZoomEnabled(bool) = 0;