Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(870)

Side by Side Diff: third_party/WebKit/Source/core/events/EventDispatcher.cpp

Issue 2694283003: Annotate ScriptWrappable-embedding singletons.
Patch Set: add XPathValue singleton Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp ('k') | third_party/WebKit/Source/core/frame/Frame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698