| Index: Source/devtools/front_end/timeline/PaintProfilerView.js
|
| diff --git a/Source/devtools/front_end/timeline/PaintProfilerView.js b/Source/devtools/front_end/timeline/PaintProfilerView.js
|
| index 57b4cbd2435d159ead84d6218d1ae4a1e12cd42e..fd48a129636723bb7e5259f5ef41b58d7b31fb9b 100644
|
| --- a/Source/devtools/front_end/timeline/PaintProfilerView.js
|
| +++ b/Source/devtools/front_end/timeline/PaintProfilerView.js
|
| @@ -178,7 +178,7 @@ WebInspector.PaintProfilerView.prototype = {
|
| var window = this.windowBoundaries();
|
| var totalTime = 0;
|
| var timeByCategory = {};
|
| - for (var i = window.left; i <= window.right; ++i) {
|
| + for (var i = window.left; i < window.right; ++i) {
|
| var logEntry = this._log[i];
|
| var category = WebInspector.PaintProfilerView._categoryForLogItem(logEntry);
|
| timeByCategory[category.color] = timeByCategory[category.color] || 0;
|
| @@ -213,10 +213,10 @@ WebInspector.PaintProfilerView.prototype = {
|
| {
|
| var screenLeft = this._selectionWindow.windowLeft * this._canvas.width;
|
| var screenRight = this._selectionWindow.windowRight * this._canvas.width;
|
| - var barLeft = Math.floor((screenLeft - this._barPaddingWidth) / this._outerBarWidth);
|
| - var barRight = Math.floor((screenRight - this._barPaddingWidth + this._innerBarWidth)/ this._outerBarWidth);
|
| + var barLeft = Math.floor(screenLeft / this._outerBarWidth);
|
| + var barRight = Math.floor((screenRight + this._innerBarWidth - this._barPaddingWidth / 2) / this._outerBarWidth);
|
| var stepLeft = Number.constrain(barLeft * this._samplesPerBar, 0, this._log.length - 1);
|
| - var stepRight = Number.constrain(barRight * this._samplesPerBar, 0, this._log.length - 1);
|
| + var stepRight = Number.constrain(barRight * this._samplesPerBar, 0, this._log.length);
|
|
|
| return { left: stepLeft, right: stepRight };
|
| },
|
| @@ -228,7 +228,7 @@ WebInspector.PaintProfilerView.prototype = {
|
| return;
|
|
|
| var window = this.windowBoundaries();
|
| - this._snapshot.requestImage(this._log[window.left].commandIndex, this._log[window.right].commandIndex, 1, this._showImageCallback);
|
| + this._snapshot.requestImage(this._log[window.left].commandIndex, this._log[window.right - 1].commandIndex, 1, this._showImageCallback);
|
| },
|
|
|
| _reset: function()
|
| @@ -291,8 +291,8 @@ WebInspector.PaintProfilerCommandLogView.prototype = {
|
| if (!this._log)
|
| return;
|
| stepLeft = stepLeft || 0;
|
| - stepRight = stepRight || this._log.length - 1;
|
| - for (var i = stepLeft; i <= stepRight; ++i)
|
| + stepRight = stepRight || this._log.length;
|
| + for (var i = stepLeft; i < stepRight; ++i)
|
| this._appendLogItem(this.sidebarTree, this._log[i]);
|
| },
|
|
|
|
|