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

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

Issue 2887923002: DevTools: fix network grid scroll to bottom, render group node frame icon. (Closed)
Patch Set: 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/NetworkWaterfallColumn.js
diff --git a/third_party/WebKit/Source/devtools/front_end/network/NetworkWaterfallColumn.js b/third_party/WebKit/Source/devtools/front_end/network/NetworkWaterfallColumn.js
index fd8bdcb6ed220b6fe5d945b445dc7a9b8fa6beca..2a87beca6471ef7519d73b9ea309d05dd77bb0b4 100644
--- a/third_party/WebKit/Source/devtools/front_end/network/NetworkWaterfallColumn.js
+++ b/third_party/WebKit/Source/devtools/front_end/network/NetworkWaterfallColumn.js
@@ -3,10 +3,9 @@
// found in the LICENSE file.
Network.NetworkWaterfallColumn = class extends UI.VBox {
/**
- * @param {number} rowHeight
* @param {!Network.NetworkTimeCalculator} calculator
*/
- constructor(rowHeight, calculator) {
+ constructor(calculator) {
// TODO(allada) Make this a shadowDOM when the NetworkWaterfallColumn gets moved into NetworkLogViewColumns.
super(false);
this.registerRequiredCSS('network/networkWaterfallColumn.css');
@@ -24,10 +23,12 @@ Network.NetworkWaterfallColumn = class extends UI.VBox {
this._rightPadding = 0;
this._scrollTop = 0;
- this._rowHeight = rowHeight;
this._headerHeight = 0;
this._calculator = calculator;
+ this._rawRowHeight = 0;
allada 2017/05/16 21:40:07 I think a short comment explaining the difference
pfeldman 2017/05/16 22:34:16 Done.
+ this._rowHeight = 0;
+
this._offsetWidth = 0;
this._offsetHeight = 0;
this._startTime = this._calculator.minimumBoundary();
@@ -248,7 +249,12 @@ Network.NetworkWaterfallColumn = class extends UI.VBox {
* @param {number} height
*/
setRowHeight(height) {
- this._rowHeight = height;
+ this._rawRowHeight = height;
+ this._updateRowHeight();
+ }
+
+ _updateRowHeight() {
+ this._rowHeight = Math.floor(this._rawRowHeight * window.devicePixelRatio) / window.devicePixelRatio;
}
/**
@@ -330,6 +336,7 @@ Network.NetworkWaterfallColumn = class extends UI.VBox {
*/
onResize() {
super.onResize();
+ this._updateRowHeight();
this._calculateCanvasSize();
this.scheduleDraw();
}

Powered by Google App Engine
This is Rietveld 408576698