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

Unified Diff: Source/devtools/front_end/timeline/TimelineOverviewPane.js

Issue 423433004: DevTools: move the "Capture *" checkboxes from timeline sidebar to the toolbar. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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: Source/devtools/front_end/timeline/TimelineOverviewPane.js
diff --git a/Source/devtools/front_end/timeline/TimelineOverviewPane.js b/Source/devtools/front_end/timeline/TimelineOverviewPane.js
index ba1cea26194d3a17094e05fe637a3c849f568b8b..71f39bdb10ba5553d832c6914707f5a4cde88723 100644
--- a/Source/devtools/front_end/timeline/TimelineOverviewPane.js
+++ b/Source/devtools/front_end/timeline/TimelineOverviewPane.js
@@ -43,12 +43,11 @@ WebInspector.TimelineOverviewPane = function(model, uiUtils)
this._eventDividers = [];
this._model = model;
+ this._overviewCalculator = new WebInspector.TimelineOverviewCalculator();
this._overviewGrid = new WebInspector.OverviewGrid("timeline");
this.element.appendChild(this._overviewGrid.element);
- this._overviewCalculator = new WebInspector.TimelineOverviewCalculator();
-
model.addEventListener(WebInspector.TimelineModel.Events.RecordsCleared, this._reset, this);
this._overviewGrid.addEventListener(WebInspector.OverviewGrid.Events.WindowChanged, this._onWindowChanged, this);
this._overviewControls = [];
@@ -92,7 +91,11 @@ WebInspector.TimelineOverviewPane.prototype = {
{
delete this._refreshTimeout;
- this._overviewCalculator._setWindow(this._model.minimumRecordTime(), this._model.maximumRecordTime());
+ if (this._model.isEmpty())
+ this._overviewCalculator._setWindow(0, 1000);
+ else
+ this._overviewCalculator._setWindow(this._model.minimumRecordTime(), this._model.maximumRecordTime());
+
this._overviewCalculator._setDisplayWindow(0, this._overviewGrid.clientWidth());
for (var i = 0; i < this._overviewControls.length; ++i)
this._overviewControls[i].update();

Powered by Google App Engine
This is Rietveld 408576698