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

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

Issue 15063004: Make Event.path() return a pre-calculated NodeList rather than calculating it dynamically. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add an include. Created 7 years, 7 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
« no previous file with comments | « Source/core/dom/Event.cpp ('k') | Source/core/dom/EventContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/EventContext.h
diff --git a/Source/core/dom/EventContext.h b/Source/core/dom/EventContext.h
index 5017e5ca2073711e720c587c86c3937837d49cf7..5e4f136b776d7970ad4720a49b922d884068ef20 100644
--- a/Source/core/dom/EventContext.h
+++ b/Source/core/dom/EventContext.h
@@ -29,6 +29,7 @@
#include "core/dom/EventTarget.h"
#include "core/dom/Node.h"
+#include "core/dom/StaticNodeList.h"
#include "core/dom/TreeScope.h"
#include <wtf/RefPtr.h>
@@ -45,6 +46,10 @@ public:
Node* node() const { return m_node.get(); }
EventTarget* target() const { return m_target.get(); }
+ PassRefPtr<NodeList> eventPath() { return m_eventPath; }
+ void adoptEventPath(Vector<RefPtr<Node> >&);
+ void setEventPath(PassRefPtr<NodeList> nodeList) { m_eventPath = nodeList; }
+
bool currentTargetSameAsTarget() const { return m_currentTarget.get() == m_target.get(); }
virtual void handleLocalEvents(Event*) const;
virtual bool isMouseOrFocusEventContext() const;
@@ -57,6 +62,7 @@ protected:
RefPtr<Node> m_node;
RefPtr<EventTarget> m_currentTarget;
RefPtr<EventTarget> m_target;
+ RefPtr<NodeList> m_eventPath;
};
typedef Vector<OwnPtr<EventContext>, 32> EventPath;
« no previous file with comments | « Source/core/dom/Event.cpp ('k') | Source/core/dom/EventContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698