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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 // We need to set the target here because it can go away by the time we actu
ally fire the event. | 69 // We need to set the target here because it can go away by the time we actu
ally fire the event. |
70 mediator->event()->setTarget(EventPath::eventTargetRespectingTargetRules(nod
e)); | 70 mediator->event()->setTarget(EventPath::eventTargetRespectingTargetRules(nod
e)); |
71 ScopedEventQueue::instance()->enqueueEventDispatchMediator(mediator); | 71 ScopedEventQueue::instance()->enqueueEventDispatchMediator(mediator); |
72 } | 72 } |
73 | 73 |
74 void EventDispatcher::dispatchSimulatedClick(Node* node, Event* underlyingEvent,
SimulatedClickMouseEventOptions mouseEventOptions) | 74 void EventDispatcher::dispatchSimulatedClick(Node* node, Event* underlyingEvent,
SimulatedClickMouseEventOptions mouseEventOptions) |
75 { | 75 { |
76 // This persistent vector doesn't cause leaks, because added Nodes are remov
ed | 76 // This persistent vector doesn't cause leaks, because added Nodes are remov
ed |
77 // before dispatchSimulatedClick() returns. This vector is here just to prev
ent | 77 // before dispatchSimulatedClick() returns. This vector is here just to prev
ent |
78 // the code from running into an infinite recursion of dispatchSimulatedClic
k(). | 78 // the code from running into an infinite recursion of dispatchSimulatedClic
k(). |
79 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<WillBeHeapHashSet<RawPtrWillBeMem
ber<Node> > >, nodesDispatchingSimulatedClicks, (adoptPtrWillBeNoop(new WillBeHe
apHashSet<RawPtrWillBeMember<Node> >()))); | 79 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<WillBeHeapHashSet<RawPtrWillBeMem
ber<Node>>>, nodesDispatchingSimulatedClicks, (adoptPtrWillBeNoop(new WillBeHeap
HashSet<RawPtrWillBeMember<Node>>()))); |
80 | 80 |
81 if (isDisabledFormControl(node)) | 81 if (isDisabledFormControl(node)) |
82 return; | 82 return; |
83 | 83 |
84 if (nodesDispatchingSimulatedClicks->contains(node)) | 84 if (nodesDispatchingSimulatedClicks->contains(node)) |
85 return; | 85 return; |
86 | 86 |
87 nodesDispatchingSimulatedClicks->add(node); | 87 nodesDispatchingSimulatedClicks->add(node); |
88 | 88 |
89 if (mouseEventOptions == SendMouseOverUpDownEvents) | 89 if (mouseEventOptions == SendMouseOverUpDownEvents) |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 } | 227 } |
228 } | 228 } |
229 } | 229 } |
230 | 230 |
231 const NodeEventContext* EventDispatcher::topNodeEventContext() | 231 const NodeEventContext* EventDispatcher::topNodeEventContext() |
232 { | 232 { |
233 return m_event->eventPath().isEmpty() ? 0 : &m_event->eventPath().last(); | 233 return m_event->eventPath().isEmpty() ? 0 : &m_event->eventPath().last(); |
234 } | 234 } |
235 | 235 |
236 } | 236 } |
OLD | NEW |