Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(504)

Unified Diff: third_party/WebKit/Source/web/DevToolsEmulator.cpp

Issue 2536723007: Removed android scrolling fake mouse moves and device_supports_mouse (Closed)
Patch Set: rebase Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/web/DevToolsEmulator.h ('k') | third_party/WebKit/Source/web/WebSettingsImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cb59bd0892dfe2ed841326ec0fe7cd32f6171b16..9fffbd78ef4c76d9c18b690a89804d2b75b21583 100644
--- a/third_party/WebKit/Source/web/DevToolsEmulator.cpp
+++ b/third_party/WebKit/Source/web/DevToolsEmulator.cpp
@@ -8,6 +8,7 @@
#include "core/frame/FrameView.h"
#include "core/frame/Settings.h"
#include "core/frame/VisualViewport.h"
+#include "core/input/EventHandler.h"
#include "core/page/Page.h"
#include "core/style/ComputedStyle.h"
#include "platform/RuntimeEnabledFeatures.h"
@@ -90,7 +91,6 @@ DevToolsEmulator::DevToolsEmulator(WebViewImpl* webViewImpl)
m_touchEventEmulationEnabled(false),
m_doubleTapToZoomEnabled(false),
m_originalTouchEventFeatureDetectionEnabled(false),
- m_originalDeviceSupportsMouse(false),
m_originalDeviceSupportsTouch(false),
m_originalMaxTouchPoints(0),
m_embedderScriptEnabled(webViewImpl->page()->settings().scriptEnabled()),
@@ -448,8 +448,6 @@ void DevToolsEmulator::setTouchEventEmulationEnabled(bool enabled) {
if (!m_touchEventEmulationEnabled) {
m_originalTouchEventFeatureDetectionEnabled =
RuntimeEnabledFeatures::touchEventFeatureDetectionEnabled();
- m_originalDeviceSupportsMouse =
- m_webViewImpl->page()->settings().deviceSupportsMouse();
m_originalDeviceSupportsTouch =
m_webViewImpl->page()->settings().deviceSupportsTouch();
m_originalMaxTouchPoints =
@@ -458,8 +456,12 @@ void DevToolsEmulator::setTouchEventEmulationEnabled(bool enabled) {
RuntimeEnabledFeatures::setTouchEventFeatureDetectionEnabled(
enabled ? true : m_originalTouchEventFeatureDetectionEnabled);
if (!m_originalDeviceSupportsTouch) {
- m_webViewImpl->page()->settings().setDeviceSupportsMouse(
- enabled ? false : m_originalDeviceSupportsMouse);
+ if (enabled && m_webViewImpl->mainFrameImpl()) {
+ m_webViewImpl->mainFrameImpl()
+ ->frame()
+ ->eventHandler()
+ .clearMouseEventManager();
+ }
m_webViewImpl->page()->settings().setDeviceSupportsTouch(
enabled ? true : m_originalDeviceSupportsTouch);
// Currently emulation does not provide multiple touch points.
« no previous file with comments | « third_party/WebKit/Source/web/DevToolsEmulator.h ('k') | third_party/WebKit/Source/web/WebSettingsImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698