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

Unified Diff: third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js

Issue 2887923002: DevTools: fix network grid scroll to bottom, render group node frame icon. (Closed)
Patch Set: dropped the datagrid check Created 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js b/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js
index deac6454853852667200f695e4ae0e922a948e61..7ac42e16eb26bad137c1013395f98fd72acdbe4d 100644
--- a/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js
+++ b/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js
@@ -47,6 +47,7 @@ Network.NetworkLogView = class extends UI.VBox {
this._networkResourceTypeFiltersSetting = Common.settings.createSetting('networkResourceTypeFilters', {});
this._filterBar = filterBar;
+ this._rawRowHeight = 0;
this._progressBarContainer = progressBarContainer;
this._networkLogLargeRowsSetting = networkLogLargeRowsSetting;
this._networkLogLargeRowsSetting.addChangeListener(updateRowHeight.bind(this), this);
@@ -62,7 +63,8 @@ Network.NetworkLogView = class extends UI.VBox {
*/
function updateRowHeight() {
/** @type {number} */
- this._rowHeight = !!this._networkLogLargeRowsSetting.get() ? 41 : 21;
+ this._rawRowHeight = !!this._networkLogLargeRowsSetting.get() ? 41 : 21;
+ this._updateRowHeight();
}
updateRowHeight.call(this);
@@ -369,6 +371,10 @@ Network.NetworkLogView = class extends UI.VBox {
this._invalidateAllItems();
}
+ _updateRowHeight() {
+ this._rowHeight = Math.floor(this._rawRowHeight * window.devicePixelRatio) / window.devicePixelRatio;
+ }
+
/**
* @param {!SDK.NetworkRequest} request
* @return {?Network.NetworkRequestNode}
@@ -798,6 +804,13 @@ Network.NetworkLogView = class extends UI.VBox {
}
/**
+ * @override
+ */
+ onResize() {
+ this._updateRowHeight();
+ }
+
+ /**
* @return {!Array<!Network.NetworkNode>}
*/
flatNodesList() {
@@ -927,10 +940,9 @@ Network.NetworkLogView = class extends UI.VBox {
this._mainRequestLoadTime = -1;
this._mainRequestDOMContentLoadedTime = -1;
- if (this._dataGrid) {
- this._dataGrid.rootNode().removeChildren();
- this._updateSummaryBar();
- }
+ this._dataGrid.rootNode().removeChildren();
+ this._updateSummaryBar();
+ this._dataGrid.setStickToBottom(true);
}
/**

Powered by Google App Engine
This is Rietveld 408576698