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

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

Issue 108723007: Introduce TreeScopeEventContext (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rename SharedEventContext to TreeScopeEventContext 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/EventRetargeter.cpp ('k') | Source/core/events/MouseEvent.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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 10 matching lines...) Expand all
21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 * THE POSSIBILITY OF SUCH DAMAGE. 23 * THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #include "config.h" 26 #include "config.h"
27 #include "core/events/FocusEvent.h" 27 #include "core/events/FocusEvent.h"
28 28
29 #include "core/events/Event.h" 29 #include "core/events/Event.h"
30 #include "core/events/EventDispatcher.h" 30 #include "core/events/EventDispatcher.h"
31 #include "core/events/EventRetargeter.h"
32 #include "core/events/ThreadLocalEventNames.h" 31 #include "core/events/ThreadLocalEventNames.h"
33 32
34 namespace WebCore { 33 namespace WebCore {
35 34
36 FocusEventInit::FocusEventInit() 35 FocusEventInit::FocusEventInit()
37 : relatedTarget(0) 36 : relatedTarget(0)
38 { 37 {
39 } 38 }
40 39
41 const AtomicString& FocusEvent::interfaceName() const 40 const AtomicString& FocusEvent::interfaceName() const
(...skipping 30 matching lines...) Expand all
72 return adoptRef(new FocusEventDispatchMediator(focusEvent)); 71 return adoptRef(new FocusEventDispatchMediator(focusEvent));
73 } 72 }
74 73
75 FocusEventDispatchMediator::FocusEventDispatchMediator(PassRefPtr<FocusEvent> fo cusEvent) 74 FocusEventDispatchMediator::FocusEventDispatchMediator(PassRefPtr<FocusEvent> fo cusEvent)
76 : EventDispatchMediator(focusEvent) 75 : EventDispatchMediator(focusEvent)
77 { 76 {
78 } 77 }
79 78
80 bool FocusEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) cons t 79 bool FocusEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) cons t
81 { 80 {
82 EventRetargeter::adjustForFocusEvent(dispatcher->node(), *event()); 81 event()->eventPath().adjustForRelatedTarget(dispatcher->node(), event()->rel atedTarget());
83 return EventDispatchMediator::dispatchEvent(dispatcher); 82 return EventDispatchMediator::dispatchEvent(dispatcher);
84 } 83 }
85 84
86 PassRefPtr<BlurEventDispatchMediator> BlurEventDispatchMediator::create(PassRefP tr<FocusEvent> focusEvent) 85 PassRefPtr<BlurEventDispatchMediator> BlurEventDispatchMediator::create(PassRefP tr<FocusEvent> focusEvent)
87 { 86 {
88 return adoptRef(new BlurEventDispatchMediator(focusEvent)); 87 return adoptRef(new BlurEventDispatchMediator(focusEvent));
89 } 88 }
90 89
91 BlurEventDispatchMediator::BlurEventDispatchMediator(PassRefPtr<FocusEvent> focu sEvent) 90 BlurEventDispatchMediator::BlurEventDispatchMediator(PassRefPtr<FocusEvent> focu sEvent)
92 : EventDispatchMediator(focusEvent) 91 : EventDispatchMediator(focusEvent)
93 { 92 {
94 } 93 }
95 94
96 bool BlurEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) const 95 bool BlurEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) const
97 { 96 {
98 EventRetargeter::adjustForFocusEvent(dispatcher->node(), *event()); 97 event()->eventPath().adjustForRelatedTarget(dispatcher->node(), event()->rel atedTarget());
99 return EventDispatchMediator::dispatchEvent(dispatcher); 98 return EventDispatchMediator::dispatchEvent(dispatcher);
100 } 99 }
101 100
102 PassRefPtr<FocusInEventDispatchMediator> FocusInEventDispatchMediator::create(Pa ssRefPtr<FocusEvent> focusEvent) 101 PassRefPtr<FocusInEventDispatchMediator> FocusInEventDispatchMediator::create(Pa ssRefPtr<FocusEvent> focusEvent)
103 { 102 {
104 return adoptRef(new FocusInEventDispatchMediator(focusEvent)); 103 return adoptRef(new FocusInEventDispatchMediator(focusEvent));
105 } 104 }
106 105
107 FocusInEventDispatchMediator::FocusInEventDispatchMediator(PassRefPtr<FocusEvent > focusEvent) 106 FocusInEventDispatchMediator::FocusInEventDispatchMediator(PassRefPtr<FocusEvent > focusEvent)
108 : EventDispatchMediator(focusEvent) 107 : EventDispatchMediator(focusEvent)
109 { 108 {
110 } 109 }
111 110
112 bool FocusInEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) co nst 111 bool FocusInEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) co nst
113 { 112 {
114 EventRetargeter::adjustForFocusEvent(dispatcher->node(), *event()); 113 event()->eventPath().adjustForRelatedTarget(dispatcher->node(), event()->rel atedTarget());
115 return EventDispatchMediator::dispatchEvent(dispatcher); 114 return EventDispatchMediator::dispatchEvent(dispatcher);
116 } 115 }
117 116
118 PassRefPtr<FocusOutEventDispatchMediator> FocusOutEventDispatchMediator::create( PassRefPtr<FocusEvent> focusEvent) 117 PassRefPtr<FocusOutEventDispatchMediator> FocusOutEventDispatchMediator::create( PassRefPtr<FocusEvent> focusEvent)
119 { 118 {
120 return adoptRef(new FocusOutEventDispatchMediator(focusEvent)); 119 return adoptRef(new FocusOutEventDispatchMediator(focusEvent));
121 } 120 }
122 121
123 FocusOutEventDispatchMediator::FocusOutEventDispatchMediator(PassRefPtr<FocusEve nt> focusEvent) 122 FocusOutEventDispatchMediator::FocusOutEventDispatchMediator(PassRefPtr<FocusEve nt> focusEvent)
124 : EventDispatchMediator(focusEvent) 123 : EventDispatchMediator(focusEvent)
125 { 124 {
126 } 125 }
127 126
128 bool FocusOutEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) c onst 127 bool FocusOutEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) c onst
129 { 128 {
130 EventRetargeter::adjustForFocusEvent(dispatcher->node(), *event()); 129 event()->eventPath().adjustForRelatedTarget(dispatcher->node(), event()->rel atedTarget());
131 return EventDispatchMediator::dispatchEvent(dispatcher); 130 return EventDispatchMediator::dispatchEvent(dispatcher);
132 } 131 }
133 132
134 } // namespace WebCore 133 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/events/EventRetargeter.cpp ('k') | Source/core/events/MouseEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698