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

Unified Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js

Issue 2218603003: Timeline: show white overlay till page being reloaded paints (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup Created 4 years, 4 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/devtools/front_end/timeline/TimelinePanel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js
index e58206b54a6d50b611bb1a5a1a4892b860b7a3d9..10ea65902b94a397d4446d72c699ceca75dc5798 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js
@@ -578,9 +578,9 @@ WebInspector.TimelinePanel.prototype = {
},
/**
- * @param {boolean} userInitiated
+ * @param {boolean} autorecordUponReload
*/
- _startRecording: function(userInitiated)
+ _startRecording: function(autorecordUponReload)
{
console.assert(!this._statusPane, "Status pane is already opened.");
var mainTarget = WebInspector.targetManager.mainTarget();
@@ -589,14 +589,14 @@ WebInspector.TimelinePanel.prototype = {
this._setState(WebInspector.TimelinePanel.State.StartPending);
this._showRecordingStarted();
- this._autoRecordGeneration = userInitiated ? null : Symbol("Generation");
+ this._autoRecordGeneration = autorecordUponReload ? Symbol("Generation") : null;
this._controller = new WebInspector.TimelineController(mainTarget, this, this._tracingModel);
- this._controller.startRecording(true, this._captureJSProfileSetting.get(), this._captureMemorySetting.get(), this._captureLayersAndPicturesSetting.get(), this._captureFilmStripSetting && this._captureFilmStripSetting.get());
+ this._controller.startRecording(true, this._captureJSProfileSetting.get(), this._captureMemorySetting.get(), this._captureLayersAndPicturesSetting.get(), this._captureFilmStripSetting && this._captureFilmStripSetting.get(), autorecordUponReload ? WebInspector.UIString("Reloading…") : undefined);
for (var i = 0; i < this._overviewControls.length; ++i)
this._overviewControls[i].timelineStarted();
- if (userInitiated)
+ if (!autorecordUponReload)
WebInspector.userMetrics.actionTaken(WebInspector.UserMetrics.Action.TimelineStarted);
this._setUIControlsEnabled(false);
this._hideRecordingHelpMessage();
@@ -633,7 +633,7 @@ WebInspector.TimelinePanel.prototype = {
_toggleRecording: function()
{
if (this._state === WebInspector.TimelinePanel.State.Idle)
- this._startRecording(true);
+ this._startRecording(false);
else if (this._state === WebInspector.TimelinePanel.State.Recording)
this._stopRecording();
},
@@ -830,7 +830,7 @@ WebInspector.TimelinePanel.prototype = {
{
if (this._state !== WebInspector.TimelinePanel.State.Idle || !this.isShowing())
return;
- this._startRecording(false);
+ this._startRecording(true);
},
/**

Powered by Google App Engine
This is Rietveld 408576698