Index: third_party/WebKit/Source/core/events/EventTarget.cpp |
diff --git a/third_party/WebKit/Source/core/events/EventTarget.cpp b/third_party/WebKit/Source/core/events/EventTarget.cpp |
index 92bd274edfce15a084ab1bacf2935052978e3aef..420267bb03f72e81ae55cb96d7fb38c801ec171d 100644 |
--- a/third_party/WebKit/Source/core/events/EventTarget.cpp |
+++ b/third_party/WebKit/Source/core/events/EventTarget.cpp |
@@ -67,6 +67,12 @@ Settings* windowSettings(LocalDOMWindow* executingWindow) |
return nullptr; |
} |
+bool isTouchScrollBlockingEvent(const AtomicString& eventType) |
+{ |
+ return eventType == EventTypeNames::touchstart |
+ || eventType == EventTypeNames::touchmove; |
+} |
+ |
bool isScrollBlockingEvent(const AtomicString& eventType) |
{ |
return eventType == EventTypeNames::touchstart |
Rick Byers
2016/07/07 20:02:09
nit: replace these two lines with isTouchScrollBlo
dtapuska
2016/07/07 20:34:22
Done.
|
@@ -199,7 +205,7 @@ void EventTarget::setDefaultAddEventListenerOptions(const AtomicString& eventTyp |
} |
} |
- if (RuntimeEnabledFeatures::passiveDocumentEventListenersEnabled()) { |
+ if (RuntimeEnabledFeatures::passiveDocumentEventListenersEnabled() && isTouchScrollBlockingEvent(eventType)) { |
if (!options.hasPassive()) { |
if (Node* node = toNode()) { |
if (node->isDocumentNode() || node->document().documentElement() == node || node->document().body() == node) { |