| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 if (!gNodesDispatchingSimulatedClicks) | 80 if (!gNodesDispatchingSimulatedClicks) |
| 81 gNodesDispatchingSimulatedClicks = new HashSet<Node*>; | 81 gNodesDispatchingSimulatedClicks = new HashSet<Node*>; |
| 82 else if (gNodesDispatchingSimulatedClicks->contains(node)) | 82 else if (gNodesDispatchingSimulatedClicks->contains(node)) |
| 83 return; | 83 return; |
| 84 | 84 |
| 85 gNodesDispatchingSimulatedClicks->add(node); | 85 gNodesDispatchingSimulatedClicks->add(node); |
| 86 | 86 |
| 87 if (mouseEventOptions == SendMouseOverUpDownEvents) | 87 if (mouseEventOptions == SendMouseOverUpDownEvents) |
| 88 EventDispatcher(node, SimulatedMouseEvent::create(EventTypeNames::mouseo
ver, node->document().domWindow(), underlyingEvent)).dispatch(); | 88 EventDispatcher(node, SimulatedMouseEvent::create(EventTypeNames::mouseo
ver, node->document().domWindow(), underlyingEvent)).dispatch(); |
| 89 | 89 |
| 90 if (mouseEventOptions != SendNoEvents) | 90 if (mouseEventOptions != SendNoEvents) { |
| 91 EventDispatcher(node, SimulatedMouseEvent::create(EventTypeNames::moused
own, node->document().domWindow(), underlyingEvent)).dispatch(); | 91 EventDispatcher(node, SimulatedMouseEvent::create(EventTypeNames::moused
own, node->document().domWindow(), underlyingEvent)).dispatch(); |
| 92 node->setActive(true); | |
| 93 if (mouseEventOptions != SendNoEvents) | |
| 94 EventDispatcher(node, SimulatedMouseEvent::create(EventTypeNames::mouseu
p, node->document().domWindow(), underlyingEvent)).dispatch(); | 92 EventDispatcher(node, SimulatedMouseEvent::create(EventTypeNames::mouseu
p, node->document().domWindow(), underlyingEvent)).dispatch(); |
| 95 node->setActive(false); | 93 } |
| 96 | 94 |
| 97 // always send click | 95 // always send click |
| 98 EventDispatcher(node, SimulatedMouseEvent::create(EventTypeNames::click, nod
e->document().domWindow(), underlyingEvent)).dispatch(); | 96 EventDispatcher(node, SimulatedMouseEvent::create(EventTypeNames::click, nod
e->document().domWindow(), underlyingEvent)).dispatch(); |
| 99 | 97 |
| 100 gNodesDispatchingSimulatedClicks->remove(node); | 98 gNodesDispatchingSimulatedClicks->remove(node); |
| 101 } | 99 } |
| 102 | 100 |
| 103 bool EventDispatcher::dispatch() | 101 bool EventDispatcher::dispatch() |
| 104 { | 102 { |
| 105 TRACE_EVENT0("webkit", "EventDispatcher::dispatch"); | 103 TRACE_EVENT0("webkit", "EventDispatcher::dispatch"); |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 } | 222 } |
| 225 } | 223 } |
| 226 } | 224 } |
| 227 | 225 |
| 228 const NodeEventContext* EventDispatcher::topNodeEventContext() | 226 const NodeEventContext* EventDispatcher::topNodeEventContext() |
| 229 { | 227 { |
| 230 return m_event->eventPath().isEmpty() ? 0 : &m_event->eventPath().last(); | 228 return m_event->eventPath().isEmpty() ? 0 : &m_event->eventPath().last(); |
| 231 } | 229 } |
| 232 | 230 |
| 233 } | 231 } |
| OLD | NEW |