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

Side by Side Diff: sky/engine/core/events/EventDispatcher.cpp

Issue 691663002: Unfork Sky's trace events (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
130 // Ensure that after event dispatch, the event's target object is the 130 // Ensure that after event dispatch, the event's target object is the
131 // outermost shadow DOM boundary. 131 // outermost shadow DOM boundary.
132 m_event->setTarget(windowEventContext.target()); 132 m_event->setTarget(windowEventContext.target());
133 m_event->setCurrentTarget(0); 133 m_event->setCurrentTarget(0);
134 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Update Counters", "data", InspectorUpdateCountersEvent::data()); 134 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Update Counters", TRACE_EVENT_SCOPE_PROCESS, "data", InspectorUpdateCountersEvent::data ());
135 135
136 return !m_event->defaultPrevented(); 136 return !m_event->defaultPrevented();
137 } 137 }
138 138
139 inline EventDispatchContinuation EventDispatcher::dispatchEventPreProcess(void*& preDispatchEventHandlerResult) 139 inline EventDispatchContinuation EventDispatcher::dispatchEventPreProcess(void*& preDispatchEventHandlerResult)
140 { 140 {
141 // Give the target node a chance to do some work before DOM event handlers g et a crack. 141 // Give the target node a chance to do some work before DOM event handlers g et a crack.
142 preDispatchEventHandlerResult = m_node->preDispatchEventHandler(m_event.get( )); 142 preDispatchEventHandlerResult = m_node->preDispatchEventHandler(m_event.get( ));
143 return (m_event->eventPath().isEmpty() || m_event->propagationStopped()) ? D oneDispatching : ContinueDispatching; 143 return (m_event->eventPath().isEmpty() || m_event->propagationStopped()) ? D oneDispatching : ContinueDispatching;
144 } 144 }
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 } 225 }
226 } 226 }
227 } 227 }
228 228
229 const NodeEventContext* EventDispatcher::topNodeEventContext() 229 const NodeEventContext* EventDispatcher::topNodeEventContext()
230 { 230 {
231 return m_event->eventPath().isEmpty() ? 0 : &m_event->eventPath().last(); 231 return m_event->eventPath().isEmpty() ? 0 : &m_event->eventPath().last();
232 } 232 }
233 233
234 } 234 }
OLDNEW
« no previous file with comments | « sky/engine/core/dom/ScriptedAnimationController.cpp ('k') | sky/engine/core/events/GenericEventQueue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698