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

Side by Side Diff: sky/engine/core/events/EventDispatcher.cpp

Issue 694703002: Remove lots of dead virtuals from Element. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « sky/engine/core/dom/Node.cpp ('k') | sky/engine/core/events/MouseEvent.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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
72 ScopedEventQueue::instance()->enqueueEventDispatchMediator(mediator); 72 ScopedEventQueue::instance()->enqueueEventDispatchMediator(mediator);
73 } 73 }
74 74
75 void EventDispatcher::dispatchSimulatedClick(Node* node, Event* underlyingEvent, SimulatedClickMouseEventOptions mouseEventOptions) 75 void EventDispatcher::dispatchSimulatedClick(Node* node, Event* underlyingEvent, SimulatedClickMouseEventOptions mouseEventOptions)
76 { 76 {
77 // This persistent vector doesn't cause leaks, because added Nodes are remov ed 77 // This persistent vector doesn't cause leaks, because added Nodes are remov ed
78 // before dispatchSimulatedClick() returns. This vector is here just to prev ent 78 // before dispatchSimulatedClick() returns. This vector is here just to prev ent
79 // the code from running into an infinite recursion of dispatchSimulatedClic k(). 79 // the code from running into an infinite recursion of dispatchSimulatedClic k().
80 DEFINE_STATIC_LOCAL(OwnPtr<HashSet<RawPtr<Node> > >, nodesDispatchingSimulat edClicks, (adoptPtr(new HashSet<RawPtr<Node> >()))); 80 DEFINE_STATIC_LOCAL(OwnPtr<HashSet<RawPtr<Node> > >, nodesDispatchingSimulat edClicks, (adoptPtr(new HashSet<RawPtr<Node> >())));
81 81
82 if (isDisabledFormControl(node))
83 return;
84
85 if (nodesDispatchingSimulatedClicks->contains(node)) 82 if (nodesDispatchingSimulatedClicks->contains(node))
86 return; 83 return;
87 84
88 nodesDispatchingSimulatedClicks->add(node); 85 nodesDispatchingSimulatedClicks->add(node);
89 86
90 if (mouseEventOptions == SendMouseOverUpDownEvents) 87 if (mouseEventOptions == SendMouseOverUpDownEvents)
91 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();
92 89
93 if (mouseEventOptions != SendNoEvents) { 90 if (mouseEventOptions != SendNoEvents) {
94 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();
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 } 222 }
226 } 223 }
227 } 224 }
228 225
229 const NodeEventContext* EventDispatcher::topNodeEventContext() 226 const NodeEventContext* EventDispatcher::topNodeEventContext()
230 { 227 {
231 return m_event->eventPath().isEmpty() ? 0 : &m_event->eventPath().last(); 228 return m_event->eventPath().isEmpty() ? 0 : &m_event->eventPath().last();
232 } 229 }
233 230
234 } 231 }
OLDNEW
« no previous file with comments | « sky/engine/core/dom/Node.cpp ('k') | sky/engine/core/events/MouseEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698