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

Side by Side Diff: third_party/WebKit/Source/core/input/EventHandler.cpp

Issue 1923973002: Add UMA metric for tracking listeners for blocking touch while fling is happening (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add fling flag to WebTouchEvent Created 4 years, 7 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) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies)
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 3868 matching lines...) Expand 10 before | Expand all | Expand 10 after
3879 rootDocumentListenerHistogram.count(toTouchTargetHistogramValue( eventTarget, domDispatchResult)); 3879 rootDocumentListenerHistogram.count(toTouchTargetHistogramValue( eventTarget, domDispatchResult));
3880 3880
3881 // Count the handled touch starts and first touch moves before a nd after the page is fully loaded respectively. 3881 // Count the handled touch starts and first touch moves before a nd after the page is fully loaded respectively.
3882 if (m_frame->document()->isLoadCompleted()) { 3882 if (m_frame->document()->isLoadCompleted()) {
3883 DEFINE_STATIC_LOCAL(EnumerationHistogram, touchDispositionsA fterPageLoadHistogram, ("Event.Touch.TouchDispositionsAfterPageLoad", TouchEvent DispatchResultTypeMax)); 3883 DEFINE_STATIC_LOCAL(EnumerationHistogram, touchDispositionsA fterPageLoadHistogram, ("Event.Touch.TouchDispositionsAfterPageLoad", TouchEvent DispatchResultTypeMax));
3884 touchDispositionsAfterPageLoadHistogram.count((domDispatchRe sult != DispatchEventResult::NotCanceled) ? HandledTouches : UnhandledTouches); 3884 touchDispositionsAfterPageLoadHistogram.count((domDispatchRe sult != DispatchEventResult::NotCanceled) ? HandledTouches : UnhandledTouches);
3885 } else { 3885 } else {
3886 DEFINE_STATIC_LOCAL(EnumerationHistogram, touchDispositionsB eforePageLoadHistogram, ("Event.Touch.TouchDispositionsBeforePageLoad", TouchEve ntDispatchResultTypeMax)); 3886 DEFINE_STATIC_LOCAL(EnumerationHistogram, touchDispositionsB eforePageLoadHistogram, ("Event.Touch.TouchDispositionsBeforePageLoad", TouchEve ntDispatchResultTypeMax));
3887 touchDispositionsBeforePageLoadHistogram.count((domDispatchR esult != DispatchEventResult::NotCanceled) ? HandledTouches : UnhandledTouches); 3887 touchDispositionsBeforePageLoadHistogram.count((domDispatchR esult != DispatchEventResult::NotCanceled) ? HandledTouches : UnhandledTouches);
3888 } 3888 }
3889
3890 // Count the handled touch starts while there is an active fling animation.
3891 if (event.type() == PlatformEvent::TouchStart && event.isFlingIn Progress()) {
3892 DEFINE_STATIC_LOCAL(EnumerationHistogram, touchDispositionsD uringFlingHistogram, ("Event.Touch.TouchDispositionsDuringFling", TouchEventDisp atchResultTypeMax));
3893 touchDispositionsDuringFlingHistogram.count((domDispatchResu lt != DispatchEventResult::NotCanceled) ? HandledTouches : UnhandledTouches);
3894 }
3889 } 3895 }
3890 eventResult = mergeEventResult(eventResult, toWebInputEventResult(do mDispatchResult)); 3896 eventResult = mergeEventResult(eventResult, toWebInputEventResult(do mDispatchResult));
3891 } 3897 }
3892 } 3898 }
3893 return eventResult; 3899 return eventResult;
3894 } 3900 }
3895 3901
3896 WebInputEventResult EventHandler::handleTouchEvent(const PlatformTouchEvent& eve nt) 3902 WebInputEventResult EventHandler::handleTouchEvent(const PlatformTouchEvent& eve nt)
3897 { 3903 {
3898 TRACE_EVENT0("blink", "EventHandler::handleTouchEvent"); 3904 TRACE_EVENT0("blink", "EventHandler::handleTouchEvent");
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
4170 4176
4171 FrameHost* EventHandler::frameHost() 4177 FrameHost* EventHandler::frameHost()
4172 { 4178 {
4173 if (!m_frame->page()) 4179 if (!m_frame->page())
4174 return nullptr; 4180 return nullptr;
4175 4181
4176 return &m_frame->page()->frameHost(); 4182 return &m_frame->page()->frameHost();
4177 } 4183 }
4178 4184
4179 } // namespace blink 4185 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698