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

Unified Diff: third_party/WebKit/Source/core/events/Event.cpp

Issue 2539183003: Don't log a console warning when touch-action is used. (Closed)
Patch Set: 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
Index: third_party/WebKit/Source/core/events/Event.cpp
diff --git a/third_party/WebKit/Source/core/events/Event.cpp b/third_party/WebKit/Source/core/events/Event.cpp
index 68487d551634c0155fb61f6f3ee8cbb118e37006..7f0f5a312e6469d97e5cb97af592b7d0d2c4262b 100644
--- a/third_party/WebKit/Source/core/events/Event.cpp
+++ b/third_party/WebKit/Source/core/events/Event.cpp
@@ -225,28 +225,9 @@ void Event::preventDefault() {
const LocalDOMWindow* window =
m_eventPath ? m_eventPath->windowEventContext().window() : 0;
- if (window) {
- const char* devToolsMsg = nullptr;
- switch (m_handlingPassive) {
- case PassiveMode::NotPassive:
- case PassiveMode::NotPassiveDefault:
- NOTREACHED();
- break;
- case PassiveMode::Passive:
- case PassiveMode::PassiveDefault:
- devToolsMsg =
- "Unable to preventDefault inside passive event listener "
- "invocation.";
- break;
- case PassiveMode::PassiveForcedDocumentLevel:
- devToolsMsg =
- "Unable to preventDefault inside passive event listener due to "
- "target being treated as passive. See "
- "https://www.chromestatus.com/features/5093566007214080";
- break;
- }
- if (devToolsMsg)
- window->printErrorMessage(devToolsMsg);
+ if (window && m_handlingPassive == PassiveMode::Passive) {
+ window->printErrorMessage(
+ "Unable to preventDefault inside passive event listener invocation.");
}
return;
}

Powered by Google App Engine
This is Rietveld 408576698