| 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 e30128bc06110ebc4772b4b8ed62dc4893e338c7..e61dc73047a2f175133ab03bc672f27da73f22e8 100644
|
| --- a/third_party/WebKit/Source/core/events/EventTarget.cpp
|
| +++ b/third_party/WebKit/Source/core/events/EventTarget.cpp
|
| @@ -39,6 +39,7 @@
|
| #include "core/editing/Editor.h"
|
| #include "core/events/Event.h"
|
| #include "core/events/EventUtil.h"
|
| +#include "core/events/PointerEvent.h"
|
| #include "core/frame/FrameHost.h"
|
| #include "core/frame/LocalDOMWindow.h"
|
| #include "core/frame/Settings.h"
|
| @@ -547,6 +548,8 @@ bool EventTarget::fireEventListeners(Event* event, EventTargetData* d, EventList
|
| // dispatch. Conveniently, all new event listeners will be added after or at
|
| // index |size|, so iterating up to (but not including) |size| naturally excludes
|
| // new event listeners.
|
| + //
|
| + // TODO(mustaq): This code needs to be refactored, crbug.com/629601
|
|
|
| if (event->type() == EventTypeNames::beforeunload) {
|
| if (LocalDOMWindow* executingWindow = this->executingWindow()) {
|
| @@ -566,6 +569,18 @@ bool EventTarget::fireEventListeners(Event* event, EventTargetData* d, EventList
|
| } else if (event->type() == EventTypeNames::textInput) {
|
| if (LocalDOMWindow* executingWindow = this->executingWindow())
|
| UseCounter::count(executingWindow->document(), UseCounter::TextInputFired);
|
| + } else if (event->type() == EventTypeNames::touchstart) {
|
| + if (LocalDOMWindow* executingWindow = this->executingWindow())
|
| + UseCounter::count(executingWindow->document(), UseCounter::TouchStartFired);
|
| + } else if (event->type() == EventTypeNames::mousedown) {
|
| + if (LocalDOMWindow* executingWindow = this->executingWindow())
|
| + UseCounter::count(executingWindow->document(), UseCounter::MouseDownFired);
|
| + } else if (event->type() == EventTypeNames::pointerdown) {
|
| + if (LocalDOMWindow* executingWindow = this->executingWindow()) {
|
| + if (event->isPointerEvent() && static_cast<PointerEvent*>(event)->pointerType() == "touch")
|
| + UseCounter::count(executingWindow->document(), UseCounter::PointerDownFiredForTouch);
|
| + UseCounter::count(executingWindow->document(), UseCounter::PointerDownFired);
|
| + }
|
| }
|
|
|
| ExecutionContext* context = getExecutionContext();
|
|
|