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

Unified Diff: Source/devtools/front_end/NetworkPanel.js

Issue 107293005: NetworkPanel: Make "sticky" behavior explicit. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years 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: Source/devtools/front_end/NetworkPanel.js
diff --git a/Source/devtools/front_end/NetworkPanel.js b/Source/devtools/front_end/NetworkPanel.js
index 003747ff43f33341b1e94652b68d5f11aacfc721..2c00e643ea31e4cf1d79a7e6dad21b988166f36d 100644
--- a/Source/devtools/front_end/NetworkPanel.js
+++ b/Source/devtools/front_end/NetworkPanel.js
@@ -86,6 +86,8 @@ WebInspector.NetworkLogView = function(filterBar, coulmnsVisibilitySetting)
this._addFilters();
this._initializeView();
+ this._recordButton.toggled = true;
+ WebInspector.networkLog.requests.forEach(this._appendRequest.bind(this));
}
WebInspector.NetworkLogView.HTTPSchemas = {"http": true, "https": true, "ws": true, "wss": true};
@@ -148,7 +150,7 @@ WebInspector.NetworkLogView.prototype = {
get statusBarItems()
{
- return [this._recordButton.element, this._clearButton.element, this._filterBar.filterButton(), this._largerRequestsButton.element, this._progressBarContainer];
+ return [this._recordButton.element, this._stickyCheckbox.element, this._clearButton.element, this._filterBar.filterButton(), this._largerRequestsButton.element, this._progressBarContainer];
vsevik 2013/12/06 09:58:52 Move after all the buttons.
eustas 2013/12/06 10:05:43 Done.
},
get useLargeRows()
@@ -617,6 +619,8 @@ WebInspector.NetworkLogView.prototype = {
this._recordButton = new WebInspector.StatusBarButton(WebInspector.UIString("Record Network Log"), "record-profile-status-bar-item");
this._recordButton.addEventListener("click", this._onRecordButtonClicked, this);
+ this._stickyCheckbox = new WebInspector.StatusBarCheckbox(WebInspector.UIString("Sticky"));
vsevik 2013/12/06 09:58:52 Preserve log
vsevik 2013/12/06 09:58:52 this._preserveLogCheckbox
eustas 2013/12/06 10:05:43 Done.
eustas 2013/12/06 10:05:43 Done.
+
this._clearButton = new WebInspector.StatusBarButton(WebInspector.UIString("Clear"), "clear-status-bar-item");
this._clearButton.addEventListener("click", this._reset, this);
@@ -629,8 +633,6 @@ WebInspector.NetworkLogView.prototype = {
{
if (!this._recordButton.toggled)
return;
- if (!this._userInitiatedRecording)
- this._recordButton.toggled = false;
this._mainRequestLoadTime = event.data || -1;
// Schedule refresh to update boundaries and draw the new line.
@@ -709,9 +711,9 @@ WebInspector.NetworkLogView.prototype = {
_onRecordButtonClicked: function(e)
{
+ if (!this._recordButton.toggled)
+ this._reset();
this._recordButton.toggled = !this._recordButton.toggled;
- this._userInitiatedRecording = this._recordButton.toggled;
- delete this._truncateLogAfterNavigation;
},
_reset: function()
@@ -804,12 +806,9 @@ WebInspector.NetworkLogView.prototype = {
_willReloadPage: function(event)
{
- if (this._userInitiatedRecording)
- return;
- if (!this.isShowing())
+ if (this._recordButton.toggled)
vsevik 2013/12/06 09:58:52 We should not reset log if preserve log checkbox i
eustas 2013/12/06 10:05:43 Done.
return;
this._recordButton.toggled = true;
- this._truncateLogAfterNavigation = true;
this._reset();
},
@@ -818,9 +817,8 @@ WebInspector.NetworkLogView.prototype = {
*/
_mainFrameNavigated: function(event)
{
- if (!this._truncateLogAfterNavigation)
+ if (!this._recordButton.toggled || this._stickyCheckbox.checked())
return;
- delete this._truncateLogAfterNavigation;
var frame = /** @type {WebInspector.ResourceTreeFrame} */ (event.data);
var loaderId = frame.loaderId;

Powered by Google App Engine
This is Rietveld 408576698