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

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

Issue 2614833002: DevTools: Do not show network pane on Timeline when there're no network activity (Closed)
Patch Set: addressing comment Created 3 years, 11 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
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChartView.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/timeline/TimelineNetworkFlameChart.js
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineNetworkFlameChart.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineNetworkFlameChart.js
index 1243f4681918a986b20219937d85e2631b7ca8c6..bb639f0ca3a0fc507e5ab66550da9f8849d3d91c 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineNetworkFlameChart.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineNetworkFlameChart.js
@@ -11,13 +11,9 @@ Timeline.TimelineFlameChartNetworkDataProvider = class {
* @param {!TimelineModel.TimelineModel} model
*/
constructor(model) {
- this.reset();
this._font = '11px ' + Host.fontFamily();
this._model = model;
- var loadingCategory = Timeline.TimelineUIUtils.categories()['loading'];
- this._waitingColor = loadingCategory.childColor;
- this._processingColor = loadingCategory.color;
-
+ this.reset();
this._style = {
padding: 4,
height: 17,
@@ -33,6 +29,14 @@ Timeline.TimelineFlameChartNetworkDataProvider = class {
}
/**
+ * @return {boolean}
+ */
+ isEmpty() {
+ this.timelineData();
+ return this._maxLevel === 0;
+ }
+
+ /**
* @override
* @return {number}
*/
@@ -349,7 +353,7 @@ Timeline.TimelineFlameChartNetworkDataProvider = class {
* @return {number}
*/
preferredHeight() {
- return this._style.height * (this._group.expanded ? Number.constrain(this._maxLevel + 1, 4, 8) : 2);
+ return this._style.height * (this._group.expanded ? Number.constrain(this._maxLevel + 1, 4, 8.5) : 1);
}
/**
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChartView.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698