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

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

Issue 366953002: DevTools: Put EventDispatch type into the data object. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated EventDispatch in LocalDOMWindow.cpp + Updated the test Created 6 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
8 * Copyright (C) 2011 Google Inc. All rights reserved. 8 * Copyright (C) 2011 Google Inc. All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 109
110 #ifndef NDEBUG 110 #ifndef NDEBUG
111 ASSERT(!m_eventDispatched); 111 ASSERT(!m_eventDispatched);
112 m_eventDispatched = true; 112 m_eventDispatched = true;
113 #endif 113 #endif
114 114
115 m_event->setTarget(EventPath::eventTargetRespectingTargetRules(m_node.get()) ); 115 m_event->setTarget(EventPath::eventTargetRespectingTargetRules(m_node.get()) );
116 ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden()); 116 ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden());
117 ASSERT(m_event->target()); 117 ASSERT(m_event->target());
118 WindowEventContext windowEventContext(m_event.get(), m_node.get(), topNodeEv entContext()); 118 WindowEventContext windowEventContext(m_event.get(), m_node.get(), topNodeEv entContext());
119 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "EventDispatch" , "type", m_event->type().ascii()); 119 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "EventDispatch" , "data", InspectorEventDispatchEvent::data(*m_event));
120 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli ne migrates to tracing. 120 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli ne migrates to tracing.
121 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willDispat chEvent(&m_node->document(), *m_event, windowEventContext.window(), m_node.get() , m_event->eventPath()); 121 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willDispat chEvent(&m_node->document(), *m_event, windowEventContext.window(), m_node.get() , m_event->eventPath());
122 122
123 void* preDispatchEventHandlerResult; 123 void* preDispatchEventHandlerResult;
124 if (dispatchEventPreProcess(preDispatchEventHandlerResult) == ContinueDispat ching) 124 if (dispatchEventPreProcess(preDispatchEventHandlerResult) == ContinueDispat ching)
125 if (dispatchEventAtCapturing(windowEventContext) == ContinueDispatching) 125 if (dispatchEventAtCapturing(windowEventContext) == ContinueDispatching)
126 if (dispatchEventAtTarget() == ContinueDispatching) 126 if (dispatchEventAtTarget() == ContinueDispatching)
127 dispatchEventAtBubbling(windowEventContext); 127 dispatchEventAtBubbling(windowEventContext);
128 dispatchEventPostProcess(preDispatchEventHandlerResult); 128 dispatchEventPostProcess(preDispatchEventHandlerResult);
129 129
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 } 226 }
227 } 227 }
228 } 228 }
229 229
230 const NodeEventContext* EventDispatcher::topNodeEventContext() 230 const NodeEventContext* EventDispatcher::topNodeEventContext()
231 { 231 {
232 return m_event->eventPath().isEmpty() ? 0 : &m_event->eventPath().last(); 232 return m_event->eventPath().isEmpty() ? 0 : &m_event->eventPath().last();
233 } 233 }
234 234
235 } 235 }
OLDNEW
« no previous file with comments | « LayoutTests/inspector-protocol/timeline/timeline-dispatchEvent.html ('k') | Source/core/frame/LocalDOMWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698