Chromium Code Reviews| Index: third_party/WebKit/Source/core/events/EventTarget.cpp |
| diff --git a/third_party/WebKit/Source/core/events/EventTarget.cpp b/third_party/WebKit/Source/core/events/EventTarget.cpp |
| index 230c6756ff1dd0844ccd0969d4815389b1012a73..df4d1a1798428cced1da7ca7502ab37cb9f622b5 100644 |
| --- a/third_party/WebKit/Source/core/events/EventTarget.cpp |
| +++ b/third_party/WebKit/Source/core/events/EventTarget.cpp |
| @@ -125,6 +125,9 @@ inline LocalDOMWindow* EventTarget::executingWindow() |
| bool EventTarget::addEventListener(const AtomicString& eventType, EventListener* listener, bool useCapture) |
| { |
| + if (LocalDOMWindow* executingWindow = this->executingWindow()) { |
| + UseCounter::count(executingWindow->document(), UseCounter::PointerEventAddListenerCount); |
| + } |
| EventListenerOptions options; |
| setDefaultEventListenerOptionsLegacy(options, useCapture); |
| return addEventListenerInternal(eventType, listener, options); |
| @@ -143,6 +146,9 @@ bool EventTarget::addEventListener(const AtomicString& eventType, EventListener* |
| bool EventTarget::addEventListener(const AtomicString& eventType, EventListener* listener, EventListenerOptions& options) |
| { |
| + if (LocalDOMWindow* executingWindow = this->executingWindow()) { |
| + UseCounter::count(executingWindow->document(), UseCounter::PointerEventAddListenerCount); |
| + } |
| setDefaultEventListenerOptions(options); |
| return addEventListenerInternal(eventType, listener, options); |
|
mustaq
2016/05/03 14:40:22
- Check if it is a PointerEvent type. Otherwise, w
tdresser
2016/05/03 16:13:46
Whoooops.
Good catch...
|
| } |