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

Unified Diff: Source/core/dom/EventHandlerRegistry.h

Issue 237963014: Track scroll event handlers in nested documents (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Cleanup. Created 6 years, 8 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: Source/core/dom/EventHandlerRegistry.h
diff --git a/Source/core/dom/EventHandlerRegistry.h b/Source/core/dom/EventHandlerRegistry.h
index dde20641c428ccdc74705796c5dd65ab488f28c9..49d4eb550edd438cd94915ce4355abb201c9bdeb 100644
--- a/Source/core/dom/EventHandlerRegistry.h
+++ b/Source/core/dom/EventHandlerRegistry.h
@@ -5,6 +5,7 @@
#ifndef EventHandlerRegistry_h
#define EventHandlerRegistry_h
+#include "core/dom/ActiveDOMObject.h"
#include "core/dom/DocumentSupplementable.h"
#include "core/events/Event.h"
#include "wtf/HashCountedSet.h"
@@ -16,7 +17,7 @@ typedef HashCountedSet<EventTarget*> EventTargetSet;
// Registry for keeping track of event handlers. Handlers can either be
// associated with an EventTarget or be "external" handlers which live outside
// the DOM (e.g., WebViewImpl).
-class EventHandlerRegistry FINAL : public DocumentSupplement {
+class EventHandlerRegistry FINAL : public DocumentSupplement, private ActiveDOMObject {
public:
virtual ~EventHandlerRegistry();
@@ -52,6 +53,7 @@ public:
private:
explicit EventHandlerRegistry(Document&);
+ static EventHandlerRegistry* create(Document&);
enum ChangeOperation {
Add, // Add a new event handler.
@@ -59,6 +61,11 @@ private:
RemoveAll // Remove any and all existing event handlers for a given target.
};
+ Document* document() const;
+
+ // Inherited from ActiveDOMObject
+ virtual void stop() OVERRIDE;
+
// Returns true if |eventType| belongs to a class this registry tracks.
static bool eventTypeToClass(const AtomicString& eventType, EventHandlerClass* result);
@@ -85,7 +92,6 @@ private:
OwnPtr<EventTargetSet> targets;
};
- Document& m_document;
HandlerState m_eventHandlers[EventHandlerClassCount];
};

Powered by Google App Engine
This is Rietveld 408576698