| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |