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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 | 72 |
73 void EventDispatcher::dispatchScopedEvent(Node* node, PassRefPtr<EventDispatchMe
diator> mediator) | 73 void EventDispatcher::dispatchScopedEvent(Node* node, PassRefPtr<EventDispatchMe
diator> mediator) |
74 { | 74 { |
75 // We need to set the target here because it can go away by the time we actu
ally fire the event. | 75 // We need to set the target here because it can go away by the time we actu
ally fire the event. |
76 mediator->event()->setTarget(EventRetargeter::eventTargetRespectingTargetRul
es(node)); | 76 mediator->event()->setTarget(EventRetargeter::eventTargetRespectingTargetRul
es(node)); |
77 ScopedEventQueue::instance()->enqueueEventDispatchMediator(mediator); | 77 ScopedEventQueue::instance()->enqueueEventDispatchMediator(mediator); |
78 } | 78 } |
79 | 79 |
80 void EventDispatcher::dispatchSimulatedClick(Node* node, Event* underlyingEvent,
SimulatedClickMouseEventOptions mouseEventOptions, SimulatedClickVisualOptions
visualOptions) | 80 void EventDispatcher::dispatchSimulatedClick(Node* node, Event* underlyingEvent,
SimulatedClickMouseEventOptions mouseEventOptions, SimulatedClickVisualOptions
visualOptions) |
81 { | 81 { |
82 if (node->isElementNode() && toElement(node)->disabled()) | 82 if (node->disabled()) |
83 return; | 83 return; |
84 | 84 |
85 if (!gNodesDispatchingSimulatedClicks) | 85 if (!gNodesDispatchingSimulatedClicks) |
86 gNodesDispatchingSimulatedClicks = new HashSet<Node*>; | 86 gNodesDispatchingSimulatedClicks = new HashSet<Node*>; |
87 else if (gNodesDispatchingSimulatedClicks->contains(node)) | 87 else if (gNodesDispatchingSimulatedClicks->contains(node)) |
88 return; | 88 return; |
89 | 89 |
90 gNodesDispatchingSimulatedClicks->add(node); | 90 gNodesDispatchingSimulatedClicks->add(node); |
91 | 91 |
92 if (mouseEventOptions == SendMouseOverUpDownEvents) | 92 if (mouseEventOptions == SendMouseOverUpDownEvents) |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 } | 224 } |
225 } | 225 } |
226 } | 226 } |
227 | 227 |
228 const EventContext* EventDispatcher::topEventContext() | 228 const EventContext* EventDispatcher::topEventContext() |
229 { | 229 { |
230 return m_eventPath.isEmpty() ? 0 : m_eventPath.last().get(); | 230 return m_eventPath.isEmpty() ? 0 : m_eventPath.last().get(); |
231 } | 231 } |
232 | 232 |
233 } | 233 } |
OLD | NEW |