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

Unified Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 2883273003: Move the user interaction policy for FirstMeaningfulPaint UMA into renderer (Closed)
Patch Set: add testcase Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/WebViewImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
index c219bba3cd739303cc8d810318e7179bf203d4a1..e5bf99f038fb72fad82ce48c1e19821b982b9cbb 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -93,6 +93,7 @@
#include "core/page/TouchDisambiguation.h"
#include "core/page/ValidationMessageClientImpl.h"
#include "core/page/scrolling/TopDocumentRootScrollerController.h"
+#include "core/paint/FirstMeaningfulPaintDetector.h"
#include "core/paint/PaintLayer.h"
#include "core/timing/DOMWindowPerformance.h"
#include "core/timing/Performance.h"
@@ -2204,6 +2205,12 @@ WebInputEventResult WebViewImpl::HandleInputEvent(
return WebInputEventResult::kHandledSystem;
}
+ if (input_event.GetType() != WebInputEvent::kMouseMove) {
+ FirstMeaningfulPaintDetector::From(
+ *MainFrameImpl()->GetFrame()->GetDocument())
+ .NotifyInputEvent();
+ }
+
if (mouse_capture_node_ &&
WebInputEvent::IsMouseEventType(input_event.GetType())) {
TRACE_EVENT1("input", "captured mouse event", "type",

Powered by Google App Engine
This is Rietveld 408576698