| 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 9efe5af0b6edd1afe88e2b29eca611e4cfe20d7f..dbb3f238acb2e6900137e2f403f82cd49c8f575c 100644
|
| --- a/Source/devtools/front_end/timeline/TimelineView.js
|
| +++ b/Source/devtools/front_end/timeline/TimelineView.js
|
| @@ -129,8 +129,8 @@ WebInspector.TimelineView.prototype = {
|
|
|
| for (var i = 0; i < eventDividerRecords.length; ++i) {
|
| var record = eventDividerRecords[i];
|
| - var positions = this._calculator.computeBarGraphWindowPosition(record);
|
| - var dividerPosition = Math.round(positions.left);
|
| + var position = this._calculator.computePosition(record.startTime());
|
| + var dividerPosition = Math.round(position);
|
| if (dividerPosition < 0 || dividerPosition >= clientWidth || dividers[dividerPosition])
|
| continue;
|
| var divider = WebInspector.TimelineUIUtils.createEventDivider(record.type(), WebInspector.TimelineUIUtils.recordTitle(record, this._model));
|
| @@ -531,8 +531,8 @@ WebInspector.TimelineView.prototype = {
|
| this._automaticallySizeWindow = false;
|
| this._clearSelection();
|
| // If we're at the top, always use real timeline start as a left window bound so that expansion arrow padding logic works.
|
| - var windowStartTime = startIndex ? recordsInWindow[startIndex].record().startTime() : this._model.minimumRecordTime();
|
| - var windowEndTime = recordsInWindow[Math.max(0, lastVisibleLine - 1)].record().endTime();
|
| + var windowStartTime = startIndex ? recordsInWindow[startIndex].startTime() : this._model.minimumRecordTime();
|
| + var windowEndTime = recordsInWindow[Math.max(0, lastVisibleLine - 1)].endTime();
|
| this._delegate.requestWindowTimes(windowStartTime, windowEndTime);
|
| recordsInWindow = this._presentationModel.filteredRecords();
|
| endIndex = Math.min(recordsInWindow.length, lastVisibleLine);
|
| @@ -566,7 +566,7 @@ WebInspector.TimelineView.prototype = {
|
| var lastChildIndex = i + record.visibleChildrenCount();
|
| if (lastChildIndex >= startIndex && lastChildIndex < endIndex) {
|
| var expandElement = new WebInspector.TimelineExpandableElement(this._expandElements);
|
| - var positions = this._calculator.computeBarGraphWindowPosition(record.record());
|
| + var positions = this._calculator.computeBarGraphWindowPosition(record);
|
| expandElement._update(record, i, positions.left - this._expandOffset, positions.width);
|
| }
|
| } else {
|
| @@ -824,7 +824,10 @@ WebInspector.TimelineView.prototype = {
|
| {
|
| if (!rowElement || !rowElement.row)
|
| return false;
|
| - var record = rowElement.row._record.record();
|
| + var presentationRecord = rowElement.row._record;
|
| + if (presentationRecord.collapsed())
|
| + return false;
|
| + var record = presentationRecord.record();
|
| if (this._highlightedQuadRecord === record)
|
| return true;
|
| this._highlightedQuadRecord = record;
|
| @@ -920,7 +923,7 @@ WebInspector.TimelineCalculator.prototype = {
|
| },
|
|
|
| /**
|
| - * @param {!WebInspector.TimelineModel.Record} record
|
| + * @param {!WebInspector.TimelinePresentationModel.Record} record
|
| * @return {!{start: number, end: number, cpuWidth: number}}
|
| */
|
| computeBarGraphPercentages: function(record)
|
| @@ -932,7 +935,7 @@ WebInspector.TimelineCalculator.prototype = {
|
| },
|
|
|
| /**
|
| - * @param {!WebInspector.TimelineModel.Record} record
|
| + * @param {!WebInspector.TimelinePresentationModel.Record} record
|
| * @return {!{left: number, width: number, cpuWidth: number}}
|
| */
|
| computeBarGraphWindowPosition: function(record)
|
| @@ -1193,7 +1196,7 @@ WebInspector.TimelineRecordGraphRow.prototype = {
|
| if (record.thread())
|
| this.element.classList.add("background");
|
|
|
| - var barPosition = calculator.computeBarGraphWindowPosition(record);
|
| + var barPosition = calculator.computeBarGraphWindowPosition(presentationRecord);
|
| this._barElement.style.left = barPosition.left + "px";
|
| this._barElement.style.width = barPosition.width + "px";
|
| this._barCpuElement.style.left = barPosition.left + "px";
|
|
|