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

Unified Diff: third_party/WebKit/Source/core/events/RegisteredEventListener.h

Issue 1563623002: Support registering and dispatching passive event listeners. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adjust comments in layout tests Created 4 years, 11 months 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/RegisteredEventListener.h
diff --git a/third_party/WebKit/Source/core/events/RegisteredEventListener.h b/third_party/WebKit/Source/core/events/RegisteredEventListener.h
index 6549bb2d9e478ecfdf587667ece3a771a3240980..99027301bee0b69e2afb9782d6cca9ae83446f87 100644
--- a/third_party/WebKit/Source/core/events/RegisteredEventListener.h
+++ b/third_party/WebKit/Source/core/events/RegisteredEventListener.h
@@ -35,6 +35,7 @@ public:
RegisteredEventListener(PassRefPtrWillBeRawPtr<EventListener> listener, const EventListenerOptions& options)
: listener(listener)
, useCapture(options.capture())
+ , passive(options.passive())
{
}
@@ -47,11 +48,13 @@ public:
{
EventListenerOptions result;
result.setCapture(useCapture);
+ result.setPassive(passive);
return result;
}
RefPtrWillBeMember<EventListener> listener;
unsigned useCapture : 1;
+ unsigned passive : 1;
};
inline bool operator==(const RegisteredEventListener& a, const RegisteredEventListener& b)
@@ -59,7 +62,7 @@ inline bool operator==(const RegisteredEventListener& a, const RegisteredEventLi
ASSERT(a.listener);
ASSERT(b.listener);
- return *a.listener == *b.listener && a.useCapture == b.useCapture;
+ return *a.listener == *b.listener && a.useCapture == b.useCapture && a.passive == b.passive;
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/events/EventTarget.cpp ('k') | third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698