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

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

Issue 322783002: Initialize min/max record time to 0 instead of -1 or null (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 6 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/TimelineView.js
diff --git a/Source/devtools/front_end/timeline/TimelineView.js b/Source/devtools/front_end/timeline/TimelineView.js
index 7b1c94d443355a15bb1638154289f600b4115e26..638072213ca29315341f5d8c4758919b2297ee65 100644
--- a/Source/devtools/front_end/timeline/TimelineView.js
+++ b/Source/devtools/front_end/timeline/TimelineView.js
@@ -248,8 +248,8 @@ WebInspector.TimelineView.prototype = {
_resetView: function()
{
- this._windowStartTime = -1;
- this._windowEndTime = -1;
+ this._windowStartTime = 0;
+ this._windowEndTime = 0;
this._boundariesAreValid = false;
this._adjustScrollPosition(0);
this._linkifier.reset();
@@ -456,13 +456,9 @@ WebInspector.TimelineView.prototype = {
clearTimeout(this._refreshTimeout);
delete this._refreshTimeout;
}
- var windowStartTime = this._windowStartTime;
- var windowEndTime = this._windowEndTime;
+ var windowStartTime = this._windowStartTime || this._model.minimumRecordTime();
+ var windowEndTime = this._windowEndTime || this._model.maximumRecordTime();
this._timelinePaddingLeft = this._expandOffset;
- if (windowStartTime === -1)
- windowStartTime = this._model.minimumRecordTime();
- if (windowEndTime === -1)
- windowEndTime = this._model.maximumRecordTime();
this._calculator.setWindow(windowStartTime, windowEndTime);
this._calculator.setDisplayWindow(this._timelinePaddingLeft, this._graphRowsElementWidth);
« no previous file with comments | « Source/devtools/front_end/timeline/TimelineTracingView.js ('k') | Source/devtools/front_end/timeline/TracingModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698