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

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

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/events/EventContext.h ('k') | Source/core/events/EventDispatcher.h » ('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 17 matching lines...) Expand all
28 #include "core/events/EventContext.h" 28 #include "core/events/EventContext.h"
29 29
30 #include "core/events/Event.h" 30 #include "core/events/Event.h"
31 #include "core/events/FocusEvent.h" 31 #include "core/events/FocusEvent.h"
32 #include "core/events/MouseEvent.h" 32 #include "core/events/MouseEvent.h"
33 #include "core/events/TouchEvent.h" 33 #include "core/events/TouchEvent.h"
34 #include "core/dom/TouchList.h" 34 #include "core/dom/TouchList.h"
35 35
36 namespace WebCore { 36 namespace WebCore {
37 37
38 EventContext::EventContext(PassRefPtr<Node> node, PassRefPtr<EventTarget> curren tTarget) 38 NodeEventContext::NodeEventContext(PassRefPtr<Node> node, PassRefPtr<EventTarget > currentTarget)
39 : m_node(node) 39 : m_node(node)
40 , m_currentTarget(currentTarget) 40 , m_currentTarget(currentTarget)
41 { 41 {
42 ASSERT(m_node); 42 ASSERT(m_node);
43 } 43 }
44 44
45 EventContext::~EventContext() 45 NodeEventContext::~NodeEventContext()
46 { 46 {
47 } 47 }
48 48
49 void TreeScopeEventContext::adoptEventPath(Vector<RefPtr<Node> >& nodes) 49 void TreeScopeEventContext::adoptEventPath(Vector<RefPtr<Node> >& nodes)
50 { 50 {
51 m_eventPath = StaticNodeList::adopt(nodes); 51 m_eventPath = StaticNodeList::adopt(nodes);
52 } 52 }
53 53
54 void EventContext::handleLocalEvents(Event* event) const 54 void NodeEventContext::handleLocalEvents(Event* event) const
55 { 55 {
56 if (touchEventContext()) { 56 if (touchEventContext()) {
57 touchEventContext()->handleLocalEvents(event); 57 touchEventContext()->handleLocalEvents(event);
58 } else if (relatedTarget()) { 58 } else if (relatedTarget()) {
59 if (event->isMouseEvent()) { 59 if (event->isMouseEvent()) {
60 toMouseEvent(event)->setRelatedTarget(relatedTarget()); 60 toMouseEvent(event)->setRelatedTarget(relatedTarget());
61 } else if (event->isFocusEvent()) { 61 } else if (event->isFocusEvent()) {
62 toFocusEvent(event)->setRelatedTarget(relatedTarget()); 62 toFocusEvent(event)->setRelatedTarget(relatedTarget());
63 } 63 }
64 } 64 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 TreeScopeEventContext::TreeScopeEventContext(TreeScope& treeScope) 107 TreeScopeEventContext::TreeScopeEventContext(TreeScope& treeScope)
108 : m_treeScope(treeScope) 108 : m_treeScope(treeScope)
109 { 109 {
110 } 110 }
111 111
112 TreeScopeEventContext::~TreeScopeEventContext() 112 TreeScopeEventContext::~TreeScopeEventContext()
113 { 113 {
114 } 114 }
115 115
116 } 116 }
OLDNEW
« no previous file with comments | « Source/core/events/EventContext.h ('k') | Source/core/events/EventDispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698