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

Side by Side Diff: Source/core/events/EventContext.h

Issue 125593005: Rename EventContext to NodeEventContext. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/Node.h ('k') | Source/core/events/EventContext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All Rights Reserved. 2 * Copyright (C) 2010 Google Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 bool isUnreachableNode(EventTarget*); 81 bool isUnreachableNode(EventTarget*);
82 #endif 82 #endif
83 83
84 TreeScope& m_treeScope; 84 TreeScope& m_treeScope;
85 RefPtr<EventTarget> m_target; 85 RefPtr<EventTarget> m_target;
86 RefPtr<EventTarget> m_relatedTarget; 86 RefPtr<EventTarget> m_relatedTarget;
87 RefPtr<NodeList> m_eventPath; 87 RefPtr<NodeList> m_eventPath;
88 RefPtr<TouchEventContext> m_touchEventContext; 88 RefPtr<TouchEventContext> m_touchEventContext;
89 }; 89 };
90 90
91 class EventContext { 91 class NodeEventContext {
92 public: 92 public:
93 // FIXME: Use ContainerNode instead of Node. 93 // FIXME: Use ContainerNode instead of Node.
94 EventContext(PassRefPtr<Node>, PassRefPtr<EventTarget> currentTarget); 94 NodeEventContext(PassRefPtr<Node>, PassRefPtr<EventTarget> currentTarget);
95 ~EventContext(); 95 ~NodeEventContext();
96 96
97 Node* node() const { return m_node.get(); } 97 Node* node() const { return m_node.get(); }
98 EventTarget* currentTarget() const { return m_currentTarget.get(); } 98 EventTarget* currentTarget() const { return m_currentTarget.get(); }
99 99
100 TreeScopeEventContext* treeScopeEventContext() const { return m_treeScopeEve ntContext.get(); } 100 TreeScopeEventContext* treeScopeEventContext() const { return m_treeScopeEve ntContext.get(); }
101 void setTreeScopeEventContext(PassRefPtr<TreeScopeEventContext> prpTreeScope EventContext) { m_treeScopeEventContext = prpTreeScopeEventContext; } 101 void setTreeScopeEventContext(PassRefPtr<TreeScopeEventContext> prpTreeScope EventContext) { m_treeScopeEventContext = prpTreeScopeEventContext; }
102 102
103 EventTarget* target() const { return m_treeScopeEventContext->target(); } 103 EventTarget* target() const { return m_treeScopeEventContext->target(); }
104 EventTarget* relatedTarget() const { return m_treeScopeEventContext->related Target(); } 104 EventTarget* relatedTarget() const { return m_treeScopeEventContext->related Target(); }
105 TouchEventContext* touchEventContext() const { return m_treeScopeEventContex t->touchEventContext(); } 105 TouchEventContext* touchEventContext() const { return m_treeScopeEventContex t->touchEventContext(); }
(...skipping 24 matching lines...) Expand all
130 130
131 inline void TreeScopeEventContext::setRelatedTarget(PassRefPtr<EventTarget> rela tedTarget) 131 inline void TreeScopeEventContext::setRelatedTarget(PassRefPtr<EventTarget> rela tedTarget)
132 { 132 {
133 ASSERT(!isUnreachableNode(relatedTarget.get())); 133 ASSERT(!isUnreachableNode(relatedTarget.get()));
134 m_relatedTarget = relatedTarget; 134 m_relatedTarget = relatedTarget;
135 } 135 }
136 136
137 } 137 }
138 138
139 #endif // EventContext_h 139 #endif // EventContext_h
OLDNEW
« no previous file with comments | « Source/core/dom/Node.h ('k') | Source/core/events/EventContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698