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

Unified Diff: third_party/WebKit/Source/core/input/TouchEventManager.cpp

Issue 2467913002: Touch event flag should control only DOM event firing. (Closed)
Patch Set: Deprecate the histogram. Created 4 years, 1 month 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
Index: third_party/WebKit/Source/core/input/TouchEventManager.cpp
diff --git a/third_party/WebKit/Source/core/input/TouchEventManager.cpp b/third_party/WebKit/Source/core/input/TouchEventManager.cpp
index 6880e9f0182af133bf53c42bcfb2e49bd2efe24d..48ac0d935d4817316a1dbe90ebe00b4e4a2da55f 100644
--- a/third_party/WebKit/Source/core/input/TouchEventManager.cpp
+++ b/third_party/WebKit/Source/core/input/TouchEventManager.cpp
@@ -18,6 +18,7 @@
#include "core/page/Page.h"
#include "platform/Histogram.h"
#include "platform/PlatformTouchEvent.h"
+#include "platform/RuntimeEnabledFeatures.h"
#include "wtf/CurrentTime.h"
#include "wtf/PtrUtil.h"
#include <memory>
@@ -485,6 +486,9 @@ class CurrentEventHolder {
WebInputEventResult TouchEventManager::handleTouchEvent(
const PlatformTouchEvent& event,
HeapVector<TouchInfo>& touchInfos) {
+ if (!RuntimeEnabledFeatures::touchEventAPIEnabled())
+ return WebInputEventResult::HandledSuppressed;
+
// Track the current event for the scope of this function.
CurrentEventHolder holder(m_currentEvent, event.type());

Powered by Google App Engine
This is Rietveld 408576698