X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fthird_party%2FWebKit%2FSource%2Fdevtools%2Ffront_end%2FTimelineOverviewPane.js;h=9c69c1d9c21bde636b7d5496f7dc58deaedfe818;hb=ff3e2503a20db9193d323c1d19c38c68004dec4a;hp=44b11e2146dfd55b3a4a04fb0c0d1862f2ecb4b0;hpb=7338fba38ba696536d1cc9d389afd716a6ab2fe6;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/third_party/WebKit/Source/devtools/front_end/TimelineOverviewPane.js b/src/third_party/WebKit/Source/devtools/front_end/TimelineOverviewPane.js index 44b11e2..9c69c1d 100644 --- a/src/third_party/WebKit/Source/devtools/front_end/TimelineOverviewPane.js +++ b/src/third_party/WebKit/Source/devtools/front_end/TimelineOverviewPane.js @@ -74,11 +74,18 @@ WebInspector.TimelineOverviewPane.prototype = { { if (this._overviewControl === overviewControl) return; - if (this._overviewControl) + + var windowTimes = null; + + if (this._overviewControl) { + windowTimes = this._overviewControl.windowTimes(this._overviewGrid.windowLeft(), this._overviewGrid.windowRight()); this._overviewControl.detach(); + } this._overviewControl = overviewControl; this._overviewControl.show(this._overviewGrid.element); this._update(); + if (windowTimes) + this.setWindowTimes(windowTimes.startTime, windowTimes.endTime); }, _update: function() @@ -87,7 +94,7 @@ WebInspector.TimelineOverviewPane.prototype = { this._overviewCalculator.setWindow(this._model.minimumRecordTime(), this._model.maximumRecordTime()); this._overviewCalculator.setDisplayWindow(0, this._overviewGrid.clientWidth()); - + this._updateWindow(); if (this._overviewControl) this._overviewControl.update(); this._overviewGrid.updateDividers(this._overviewCalculator); @@ -138,36 +145,34 @@ WebInspector.TimelineOverviewPane.prototype = { }, /** - * @return {number} + * @param {!WebInspector.Event} event */ - windowLeft: function() + _onWindowChanged: function(event) { - return this._overviewGrid.windowLeft(); + if (this._ignoreWindowChangedEvent) + return; + 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); }, /** - * @return {number} + * @param {number} startTime + * @param {number} endTime */ - windowRight: function() + setWindowTimes: function(startTime, endTime) { - return this._overviewGrid.windowRight(); + this._windowStartTime = startTime; + this._windowEndTime = endTime; + this._updateWindow(); }, - _onWindowChanged: function() - { - if (this._ignoreWindowChangedEvent) - return; - this.dispatchEventToListeners(WebInspector.TimelineOverviewPane.Events.WindowChanged); - }, - - /** - * @param {number} left - * @param {number} right - */ - setWindow: function(left, right) + _updateWindow: function() { + var windowBoundaries = this._overviewControl.windowBoundaries(this._windowStartTime, this._windowEndTime); this._ignoreWindowChangedEvent = true; - this._overviewGrid.setWindow(left, right); + this._overviewGrid.setWindow(windowBoundaries.left, windowBoundaries.right); this._overviewGrid.setResizeEnabled(this._model.records.length); this._ignoreWindowChangedEvent = false; },