| Index: third_party/WebKit/Source/core/input/EventHandler.cpp
|
| diff --git a/third_party/WebKit/Source/core/input/EventHandler.cpp b/third_party/WebKit/Source/core/input/EventHandler.cpp
|
| index 2d37e0d82bd0a80eb0e3fde9106e025140cfb974..de723d1e05d9c726fcf544a1285084e03fa8b58d 100644
|
| --- a/third_party/WebKit/Source/core/input/EventHandler.cpp
|
| +++ b/third_party/WebKit/Source/core/input/EventHandler.cpp
|
| @@ -214,6 +214,12 @@ TouchTargetAndDispatchResultType toTouchTargetHistogramValue(EventTarget* eventT
|
| return static_cast<TouchTargetAndDispatchResultType>(result);
|
| }
|
|
|
| +enum TouchEventDispatchResultType {
|
| + UnhandledTouches, // Unhandled touch events.
|
| + HandledTouches, // Handled touch events.
|
| + TouchEventDispatchResultTypeMax,
|
| +};
|
| +
|
| } // namespace
|
|
|
| using namespace HTMLNames;
|
| @@ -3795,11 +3801,19 @@ WebInputEventResult EventHandler::dispatchTouchEvents(const PlatformTouchEvent&
|
| if (touchStartOrFirstTouchMove && touchInfos.size() == 1 && event.cancelable() && !m_frame->document()->ownerElement()) {
|
| DEFINE_STATIC_LOCAL(EnumerationHistogram, rootDocumentListenerHistogram, ("Event.Touch.TargetAndDispatchResult", TouchTargetAndDispatchResultTypeMax));
|
| rootDocumentListenerHistogram.count(toTouchTargetHistogramValue(eventTarget, domDispatchResult));
|
| +
|
| + // Count the handled touch starts and first touch moves before and after the page is fully loaded respectively.
|
| + if (m_frame->document()->isLoadCompleted()) {
|
| + DEFINE_STATIC_LOCAL(EnumerationHistogram, touchDispositionsAfterPageLoadHistogram, ("Event.Touch.TouchDispositionsAfterPageLoad", TouchEventDispatchResultTypeMax));
|
| + touchDispositionsAfterPageLoadHistogram.count((domDispatchResult != DispatchEventResult::NotCanceled) ? HandledTouches : UnhandledTouches);
|
| + } else {
|
| + DEFINE_STATIC_LOCAL(EnumerationHistogram, touchDispositionsBeforePageLoadHistogram, ("Event.Touch.TouchDispositionsBeforePageLoad", TouchEventDispatchResultTypeMax));
|
| + touchDispositionsBeforePageLoadHistogram.count((domDispatchResult != DispatchEventResult::NotCanceled) ? HandledTouches : UnhandledTouches);
|
| + }
|
| }
|
| eventResult = mergeEventResult(eventResult, toWebInputEventResult(domDispatchResult));
|
| }
|
| }
|
| -
|
| return eventResult;
|
| }
|
|
|
|
|