| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |