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

Unified Diff: third_party/WebKit/Source/core/frame/EventHandlerRegistry.h

Issue 1577263004: Communicate whether passive event listeners exist to cc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_wheel_passive_listeners
Patch Set: Rebase Created 4 years, 10 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/frame/EventHandlerRegistry.h
diff --git a/third_party/WebKit/Source/core/frame/EventHandlerRegistry.h b/third_party/WebKit/Source/core/frame/EventHandlerRegistry.h
index 18de8230a4bb127791f41048d30506c161f221d0..38a8e95691e7bed626e0b2bfdb7fb46d273a87cd 100644
--- a/third_party/WebKit/Source/core/frame/EventHandlerRegistry.h
+++ b/third_party/WebKit/Source/core/frame/EventHandlerRegistry.h
@@ -12,6 +12,7 @@
namespace blink {
class Document;
+class EventListenerOptions;
class EventTarget;
typedef HashCountedSet<RawPtrWillBeUntracedMember<EventTarget>> EventTargetSet;
@@ -29,8 +30,10 @@ public:
// multiple event types.
enum EventHandlerClass {
ScrollEvent,
- WheelEvent,
- TouchEvent,
+ WheelEventBlocking,
+ WheelEventPassive,
+ TouchEventBlocking,
+ TouchEventPassive,
#if ENABLE(ASSERT)
// Additional event categories for verifying handler tracking logic.
EventsForTesting,
@@ -45,9 +48,9 @@ public:
const EventTargetSet* eventHandlerTargets(EventHandlerClass) const;
// Registration and management of event handlers attached to EventTargets.
- void didAddEventHandler(EventTarget&, const AtomicString& eventType);
+ void didAddEventHandler(EventTarget&, const AtomicString& eventType, const EventListenerOptions&);
void didAddEventHandler(EventTarget&, EventHandlerClass);
- void didRemoveEventHandler(EventTarget&, const AtomicString& eventType);
+ void didRemoveEventHandler(EventTarget&, const AtomicString& eventType, const EventListenerOptions&);
void didRemoveEventHandler(EventTarget&, EventHandlerClass);
void didRemoveAllEventHandlers(EventTarget&);
@@ -72,7 +75,7 @@ private:
};
// Returns true if |eventType| belongs to a class this registry tracks.
- static bool eventTypeToClass(const AtomicString& eventType, EventHandlerClass* result);
+ static bool eventTypeToClass(const AtomicString& eventType, const EventListenerOptions&, EventHandlerClass* result);
// Returns true if the operation actually added a new target or completely
// removed an existing one.
@@ -91,7 +94,7 @@ private:
// Record a change operation to a given event handler class and notify any
// parent registry and other clients accordingly.
- void updateEventHandlerOfType(ChangeOperation, const AtomicString& eventType, EventTarget*);
+ void updateEventHandlerOfType(ChangeOperation, const AtomicString& eventType, const EventListenerOptions&, EventTarget*);
void updateEventHandlerInternal(ChangeOperation, EventHandlerClass, EventTarget*);

Powered by Google App Engine
This is Rietveld 408576698