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 a21200c0c9aeaf182adc17b47bb7e9bca96c90ce..85c3047bb090820df8d63b90200ef47ede8b0430 100644 |
--- a/third_party/WebKit/Source/core/events/EventTarget.cpp |
+++ b/third_party/WebKit/Source/core/events/EventTarget.cpp |
@@ -67,11 +67,16 @@ enum PassiveForcedListenerResultType { |
Event::PassiveMode eventPassiveMode( |
const RegisteredEventListener& eventListener) { |
- if (!eventListener.passive()) |
- return Event::PassiveMode::NotPassive; |
+ if (!eventListener.passive()) { |
+ if (eventListener.passiveSpecified()) |
+ return Event::PassiveMode::NotPassive; |
+ return Event::PassiveMode::NotPassiveDefault; |
+ } |
if (eventListener.passiveForcedForDocumentTarget()) |
return Event::PassiveMode::PassiveForcedDocumentLevel; |
- return Event::PassiveMode::Passive; |
+ if (eventListener.passiveSpecified()) |
+ return Event::PassiveMode::Passive; |
+ return Event::PassiveMode::PassiveDefault; |
} |
Settings* windowSettings(LocalDOMWindow* executingWindow) { |
@@ -200,6 +205,8 @@ inline LocalDOMWindow* EventTarget::executingWindow() { |
void EventTarget::setDefaultAddEventListenerOptions( |
const AtomicString& eventType, |
AddEventListenerOptionsResolved& options) { |
+ options.setPassiveSpecified(options.hasPassive()); |
+ |
if (!isScrollBlockingEvent(eventType)) { |
if (!options.hasPassive()) |
options.setPassive(false); |