Chromium Code Reviews| 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 442b6da650562e5c4ac8773c60e462ed47e5999a..233379e2d45764b53adb92d25783aba6002aa1a3 100644 |
| --- a/third_party/WebKit/Source/core/input/EventHandler.cpp |
| +++ b/third_party/WebKit/Source/core/input/EventHandler.cpp |
| @@ -3888,11 +3888,19 @@ WebInputEventResult EventHandler::dispatchTouchEvents(const PlatformTouchEvent& |
| DispatchEventResult domDispatchResult = touchEventTarget->dispatchEvent(touchEvent); |
| - // Only report for top level documents with a single touch on |
| - // touch-start or the first touch-move. |
| - 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)); |
| + if (touchStartOrFirstTouchMove && touchInfos.size() == 1 && event.cancelable()) { |
| + // Only report for top level documents with a single touch on |
| + // touch-start or the first touch-move. |
| + if (!m_frame->document()->ownerElement()) { |
| + DEFINE_STATIC_LOCAL(EnumerationHistogram, rootDocumentListenerHistogram, ("Event.Touch.TargetAndDispatchResult", TouchTargetAndDispatchResultTypeMax)); |
| + rootDocumentListenerHistogram.count(toTouchTargetHistogramValue(eventTarget, domDispatchResult)); |
| + } |
| + |
| + // Only count the canceled touch starts and first touch moves listener before page finishes loading. |
| + if (!m_frame->document()->isLoadCompleted()) { |
| + DEFINE_STATIC_LOCAL(EnumerationHistogram, pageloadListenerHistogram, ("Event.Touch.TouchBlockingOnPageload", 2)); |
|
dtapuska
2016/04/22 17:34:14
I'd prefer if these were called out as enums; as o
tdresser
2016/04/22 17:34:52
Let's have two histograms, once for before pageloa
tdresser
2016/04/22 17:37:06
Sorry, missed the condition above that checked tha
dtapuska
2016/04/22 17:39:10
How do we want to report this for iframes?
tdresser
2016/04/22 17:51:13
I think we should only care about the top frame's
dtapuska
2016/04/22 18:02:35
Right so the !m_frame->document()->ownerElement()
|
| + pageloadListenerHistogram.count((domDispatchResult != DispatchEventResult::NotCanceled) ? 1 : 0); |
| + } |
| } |
| eventResult = mergeEventResult(eventResult, toWebInputEventResult(domDispatchResult)); |
| } |