Commit d6e42b7c authored by allada's avatar allada Committed by Commit bot

[Devtools] Fixed minor regression with network log view padding

This fixes a regression caused from
https://codereview.chromium.org/2118663002 where it would always show
the padding designed for "Large View" in the spacers of timeline.

BUG=628091
R=lushnikov

Review-Url: https://codereview.chromium.org/2149993002
Cr-Commit-Position: refs/heads/master@{#405537}
parent 29078463
......@@ -21,7 +21,8 @@ WebInspector.NetworkLogViewColumns = function(networkLogView, networkLogLargeRow
columnsVisibility[columnId] = savedColumnsVisibility.hasOwnProperty(columnId) ? savedColumnsVisibility[columnId] : defaultColumnsVisibility[columnId];
this._columnsVisibilitySetting.set(columnsVisibility);
networkLogLargeRowsSetting.addChangeListener(this._updateRowsSize, this);
this._networkLogLargeRowsSetting = networkLogLargeRowsSetting;
this._networkLogLargeRowsSetting.addChangeListener(this._updateRowsSize, this);
/** @type {!Array<{time: number, element: !Element}>} */
this._eventDividers = [];
......@@ -271,6 +272,8 @@ WebInspector.NetworkLogViewColumns.prototype = {
this._dataGrid.addEventListener(WebInspector.DataGrid.Events.ColumnsResized, this.updateDividersIfNeeded, this);
this._updateRowsSize();
return this._dataGrid;
},
......@@ -608,11 +611,8 @@ WebInspector.NetworkLogViewColumns.prototype = {
this._timelineGrid.showEventDividers();
},
/**
* @param {!WebInspector.Event} event
*/
_updateRowsSize: function(event)
_updateRowsSize: function()
{
this._timelineGrid.element.classList.toggle("small", !event.data);
this._timelineGrid.element.classList.toggle("small", !this._networkLogLargeRowsSetting.get());
}
}
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment