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 | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
6 * rights reserved. | 6 * rights reserved. |
7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. |
9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
10 * Copyright (C) 2011 Google Inc. All rights reserved. | 10 * Copyright (C) 2011 Google Inc. All rights reserved. |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 | 77 |
78 void EventDispatcher::dispatchSimulatedClick( | 78 void EventDispatcher::dispatchSimulatedClick( |
79 Node& node, | 79 Node& node, |
80 Event* underlyingEvent, | 80 Event* underlyingEvent, |
81 SimulatedClickMouseEventOptions mouseEventOptions, | 81 SimulatedClickMouseEventOptions mouseEventOptions, |
82 SimulatedClickCreationScope creationScope) { | 82 SimulatedClickCreationScope creationScope) { |
83 // This persistent vector doesn't cause leaks, because added Nodes are removed | 83 // This persistent vector doesn't cause leaks, because added Nodes are removed |
84 // before dispatchSimulatedClick() returns. This vector is here just to | 84 // before dispatchSimulatedClick() returns. This vector is here just to |
85 // prevent the code from running into an infinite recursion of | 85 // prevent the code from running into an infinite recursion of |
86 // dispatchSimulatedClick(). | 86 // dispatchSimulatedClick(). |
| 87 ALLOW_UNSAFE_SINGLETON() |
87 DEFINE_STATIC_LOCAL(HeapHashSet<Member<Node>>, | 88 DEFINE_STATIC_LOCAL(HeapHashSet<Member<Node>>, |
88 nodesDispatchingSimulatedClicks, | 89 nodesDispatchingSimulatedClicks, |
89 (new HeapHashSet<Member<Node>>)); | 90 (new HeapHashSet<Member<Node>>)); |
90 | 91 |
91 if (isDisabledFormControl(&node)) | 92 if (isDisabledFormControl(&node)) |
92 return; | 93 return; |
93 | 94 |
94 if (nodesDispatchingSimulatedClicks.contains(&node)) | 95 if (nodesDispatchingSimulatedClicks.contains(&node)) |
95 return; | 96 return; |
96 | 97 |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 // events to open select boxes. | 308 // events to open select boxes. |
308 if (!m_event->isTrusted() && m_event->isMouseEvent() && | 309 if (!m_event->isTrusted() && m_event->isMouseEvent() && |
309 m_event->type() == EventTypeNames::mousedown && | 310 m_event->type() == EventTypeNames::mousedown && |
310 isHTMLSelectElement(*m_node)) { | 311 isHTMLSelectElement(*m_node)) { |
311 UseCounter::count(m_node->document(), | 312 UseCounter::count(m_node->document(), |
312 UseCounter::UntrustedMouseDownEventDispatchedToSelect); | 313 UseCounter::UntrustedMouseDownEventDispatchedToSelect); |
313 } | 314 } |
314 } | 315 } |
315 | 316 |
316 } // namespace blink | 317 } // namespace blink |
OLD | NEW |