| Index: Source/devtools/front_end/network/NetworkTimeCalculator.js
|
| diff --git a/Source/devtools/front_end/network/NetworkTimeCalculator.js b/Source/devtools/front_end/network/NetworkTimeCalculator.js
|
| index 08546afe1a1c1f4b4e2f2f324f6f8d06f4cc9e95..b6e278dcb07ef4ff369777575e6f83bf4449df52 100644
|
| --- a/Source/devtools/front_end/network/NetworkTimeCalculator.js
|
| +++ b/Source/devtools/front_end/network/NetworkTimeCalculator.js
|
| @@ -309,22 +309,33 @@ WebInspector.NetworkTimeCalculator.prototype = {
|
| */
|
| updateBoundaries: function(request)
|
| {
|
| - var lowerBound;
|
| - if (this.startAtZero)
|
| - lowerBound = 0;
|
| - else
|
| - lowerBound = this._lowerBound(request);
|
| -
|
| - if (lowerBound !== -1 && (typeof this._minimumBoundary === "undefined" || lowerBound < this._minimumBoundary)) {
|
| - this._minimumBoundary = lowerBound;
|
| - this._boundaryChanged();
|
| - }
|
| -
|
| + var lowerBound = this._lowerBound(request);
|
| var upperBound = this._upperBound(request);
|
| - if (upperBound !== -1 && (typeof this._maximumBoundary === "undefined" || upperBound > this._maximumBoundary)) {
|
| - this._maximumBoundary = upperBound;
|
| + var changed = false;
|
| + if (lowerBound !== -1 || this.startAtZero)
|
| + changed = this._extendBoundariesToIncludeTimestamp(this.startAtZero ? 0 : lowerBound);
|
| + if (upperBound !== -1)
|
| + changed = this._extendBoundariesToIncludeTimestamp(upperBound) || changed;
|
| + if (changed)
|
| this._boundaryChanged();
|
| + },
|
| +
|
| + /**
|
| + * @param {number} timestamp
|
| + * @return {boolean}
|
| + */
|
| + _extendBoundariesToIncludeTimestamp: function(timestamp)
|
| + {
|
| + var previousMinimumBoundary = this._minimumBoundary;
|
| + var previousMaximumBoundary = this._maximumBoundary;
|
| + if (typeof this._minimumBoundary === "undefined" || typeof this._maximumBoundary === "undefined") {
|
| + this._minimumBoundary = timestamp;
|
| + this._maximumBoundary = timestamp + 1;
|
| + } else {
|
| + this._minimumBoundary = Math.min(timestamp, this._minimumBoundary);
|
| + this._maximumBoundary = Math.max(timestamp, this._minimumBoundary + 1, this._maximumBoundary);
|
| }
|
| + return previousMinimumBoundary !== this._minimumBoundary || previousMaximumBoundary !== this._maximumBoundary;
|
| },
|
|
|
| /**
|
|
|