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

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

Issue 2163893003: Start sending auxclick instead of click for non-primary buttons (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another rebase Created 4 years, 4 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 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
6 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 6 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
7 * (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> 7 * (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 288
289 RegisteredEventListener registeredListener; 289 RegisteredEventListener registeredListener;
290 bool added = ensureEventTargetData().eventListenerMap.add(eventType, listene r, options, &registeredListener); 290 bool added = ensureEventTargetData().eventListenerMap.add(eventType, listene r, options, &registeredListener);
291 if (added) 291 if (added)
292 addedEventListener(eventType, registeredListener); 292 addedEventListener(eventType, registeredListener);
293 return added; 293 return added;
294 } 294 }
295 295
296 void EventTarget::addedEventListener(const AtomicString& eventType, RegisteredEv entListener& registeredListener) 296 void EventTarget::addedEventListener(const AtomicString& eventType, RegisteredEv entListener& registeredListener)
297 { 297 {
298 if (EventUtil::isPointerEventType(eventType)) { 298 if (eventType == EventTypeNames::auxclick) {
299 if (LocalDOMWindow* executingWindow = this->executingWindow()) {
300 UseCounter::count(executingWindow->document(), UseCounter::AuxclickA ddListenerCount);
301 }
302 } else if (EventUtil::isPointerEventType(eventType)) {
299 if (LocalDOMWindow* executingWindow = this->executingWindow()) { 303 if (LocalDOMWindow* executingWindow = this->executingWindow()) {
300 UseCounter::count(executingWindow->document(), UseCounter::PointerEv entAddListenerCount); 304 UseCounter::count(executingWindow->document(), UseCounter::PointerEv entAddListenerCount);
301 } 305 }
302 } else if (eventType == EventTypeNames::slotchange) { 306 } else if (eventType == EventTypeNames::slotchange) {
303 if (LocalDOMWindow* executingWindow = this->executingWindow()) { 307 if (LocalDOMWindow* executingWindow = this->executingWindow()) {
304 UseCounter::count(executingWindow->document(), UseCounter::SlotChang eEventAddListener); 308 UseCounter::count(executingWindow->document(), UseCounter::SlotChang eEventAddListener);
305 } 309 }
306 } 310 }
307 } 311 }
308 312
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 // they have one less listener to invoke. 695 // they have one less listener to invoke.
692 if (d->firingEventIterators) { 696 if (d->firingEventIterators) {
693 for (size_t i = 0; i < d->firingEventIterators->size(); ++i) { 697 for (size_t i = 0; i < d->firingEventIterators->size(); ++i) {
694 d->firingEventIterators->at(i).iterator = 0; 698 d->firingEventIterators->at(i).iterator = 0;
695 d->firingEventIterators->at(i).end = 0; 699 d->firingEventIterators->at(i).end = 0;
696 } 700 }
697 } 701 }
698 } 702 }
699 703
700 } // namespace blink 704 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/GlobalEventHandlers.idl ('k') | third_party/WebKit/Source/core/events/EventTypeNames.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698