Commit 9b0e88c9 authored by loislo@chromium.org's avatar loislo@chromium.org

TimelinePanel: REGRESSIONS: three fixes for TimelineOverviewPane.

1) Selected window doesn't slide while recording. Why: there used to be a call for _updateWindow from _update method.
2) No overview for Events mode. Why: raw records may have no valid endTime.
3) The window selection is dropping by recording timeline. Why: earlier overview pane saved the selected time range at _onWindowChanged.

BUG=
R=pfeldman@chromium.org

Review URL: https://codereview.chromium.org/185543012

git-svn-id: svn://svn.chromium.org/blink/trunk@168367 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent fb423685
...@@ -364,7 +364,7 @@ WebInspector.TimelineModel.prototype = { ...@@ -364,7 +364,7 @@ WebInspector.TimelineModel.prototype = {
if (this._minimumRecordTime === -1 || startTime < this._minimumRecordTime) if (this._minimumRecordTime === -1 || startTime < this._minimumRecordTime)
this._minimumRecordTime = startTime; this._minimumRecordTime = startTime;
if (this._maximumRecordTime === -1 || endTime > this._maximumRecordTime) if ((this._maximumRecordTime === -1 && endTime) || endTime > this._maximumRecordTime)
this._maximumRecordTime = endTime; this._maximumRecordTime = endTime;
}, },
......
...@@ -97,6 +97,7 @@ WebInspector.TimelineOverviewPane.prototype = { ...@@ -97,6 +97,7 @@ WebInspector.TimelineOverviewPane.prototype = {
this._overviewControl.update(); this._overviewControl.update();
this._overviewGrid.updateDividers(this._overviewCalculator); this._overviewGrid.updateDividers(this._overviewCalculator);
this._updateEventDividers(); this._updateEventDividers();
this._updateWindow();
}, },
_updateEventDividers: function() _updateEventDividers: function()
...@@ -152,6 +153,8 @@ WebInspector.TimelineOverviewPane.prototype = { ...@@ -152,6 +153,8 @@ WebInspector.TimelineOverviewPane.prototype = {
if (this._muteOnWindowChanged) if (this._muteOnWindowChanged)
return; return;
var windowTimes = this._overviewControl.windowTimes(this._overviewGrid.windowLeft(), this._overviewGrid.windowRight()); var windowTimes = this._overviewControl.windowTimes(this._overviewGrid.windowLeft(), this._overviewGrid.windowRight());
this._windowStartTime = windowTimes.startTime;
this._windowEndTime = windowTimes.endTime;
this.dispatchEventToListeners(WebInspector.TimelineOverviewPane.Events.WindowChanged, windowTimes); this.dispatchEventToListeners(WebInspector.TimelineOverviewPane.Events.WindowChanged, windowTimes);
}, },
...@@ -165,13 +168,17 @@ WebInspector.TimelineOverviewPane.prototype = { ...@@ -165,13 +168,17 @@ WebInspector.TimelineOverviewPane.prototype = {
return; return;
this._windowStartTime = startTime; this._windowStartTime = startTime;
this._windowEndTime = endTime; this._windowEndTime = endTime;
var windowBoundaries = this._overviewControl.windowBoundaries(startTime, endTime); this._updateWindow();
this.dispatchEventToListeners(WebInspector.TimelineOverviewPane.Events.WindowChanged, { startTime: startTime, endTime: endTime });
},
_updateWindow: function()
{
var windowBoundaries = this._overviewControl.windowBoundaries(this._windowStartTime, this._windowEndTime);
this._muteOnWindowChanged = true; this._muteOnWindowChanged = true;
this._overviewGrid.setWindow(windowBoundaries.left, windowBoundaries.right); this._overviewGrid.setWindow(windowBoundaries.left, windowBoundaries.right);
this._overviewGrid.setResizeEnabled(!!this._model.records().length); this._overviewGrid.setResizeEnabled(!!this._model.records().length);
this._muteOnWindowChanged = false; this._muteOnWindowChanged = false;
this.dispatchEventToListeners(WebInspector.TimelineOverviewPane.Events.WindowChanged, { startTime: startTime, endTime: endTime });
}, },
_scheduleRefresh: function() _scheduleRefresh: function()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment