OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * Copyright (C) 2012 Intel Inc. All rights reserved. | 3 * Copyright (C) 2012 Intel Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
575 } else { | 575 } else { |
576 if (!listRowElement) { | 576 if (!listRowElement) { |
577 listRowElement = new WebInspector.TimelineRecordListRow(this
._linkifier, selectRecordCallback, scheduleRefreshCallback).element; | 577 listRowElement = new WebInspector.TimelineRecordListRow(this
._linkifier, selectRecordCallback, scheduleRefreshCallback).element; |
578 this._sidebarListElement.appendChild(listRowElement); | 578 this._sidebarListElement.appendChild(listRowElement); |
579 } | 579 } |
580 if (!graphRowElement) { | 580 if (!graphRowElement) { |
581 graphRowElement = new WebInspector.TimelineRecordGraphRow(th
is._itemsGraphsElement, selectRecordCallback, scheduleRefreshCallback).element; | 581 graphRowElement = new WebInspector.TimelineRecordGraphRow(th
is._itemsGraphsElement, selectRecordCallback, scheduleRefreshCallback).element; |
582 this._graphRowsElement.appendChild(graphRowElement); | 582 this._graphRowsElement.appendChild(graphRowElement); |
583 } | 583 } |
584 | 584 |
585 listRowElement.row.update(record, visibleTop, this._model.loaded
FromFile(), this._uiUtils); | 585 listRowElement.row.update(record, visibleTop, this._uiUtils); |
586 graphRowElement.row.update(record, this._calculator, this._expan
dOffset, i, this._uiUtils); | 586 graphRowElement.row.update(record, this._calculator, this._expan
dOffset, i, this._uiUtils); |
587 if (this._lastSelectedRecord === record) { | 587 if (this._lastSelectedRecord === record) { |
588 listRowElement.row.renderAsSelected(true); | 588 listRowElement.row.renderAsSelected(true); |
589 graphRowElement.row.renderAsSelected(true); | 589 graphRowElement.row.renderAsSelected(true); |
590 } | 590 } |
591 | 591 |
592 listRowElement = listRowElement.nextSibling; | 592 listRowElement = listRowElement.nextSibling; |
593 graphRowElement = graphRowElement.nextSibling; | 593 graphRowElement = graphRowElement.nextSibling; |
594 } | 594 } |
595 } | 595 } |
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1048 | 1048 |
1049 this._dataElement = this.element.createChild("span", "data dimmed"); | 1049 this._dataElement = this.element.createChild("span", "data dimmed"); |
1050 this._scheduleRefresh = scheduleRefresh; | 1050 this._scheduleRefresh = scheduleRefresh; |
1051 this._selectRecord = selectRecord; | 1051 this._selectRecord = selectRecord; |
1052 } | 1052 } |
1053 | 1053 |
1054 WebInspector.TimelineRecordListRow.prototype = { | 1054 WebInspector.TimelineRecordListRow.prototype = { |
1055 /** | 1055 /** |
1056 * @param {!WebInspector.TimelinePresentationModel.Record} presentationRecor
d | 1056 * @param {!WebInspector.TimelinePresentationModel.Record} presentationRecor
d |
1057 * @param {number} offset | 1057 * @param {number} offset |
1058 * @param {boolean} loadedFromFile | |
1059 * @param {!WebInspector.TimelineUIUtils} uiUtils | 1058 * @param {!WebInspector.TimelineUIUtils} uiUtils |
1060 */ | 1059 */ |
1061 update: function(presentationRecord, offset, loadedFromFile, uiUtils) | 1060 update: function(presentationRecord, offset, uiUtils) |
1062 { | 1061 { |
1063 this._record = presentationRecord; | 1062 this._record = presentationRecord; |
1064 var record = presentationRecord.record(); | 1063 var record = presentationRecord.record(); |
1065 this._offset = offset; | 1064 this._offset = offset; |
1066 | 1065 |
1067 this.element.className = "timeline-tree-item timeline-category-" + uiUti
ls.categoryForRecord(record).name; | 1066 this.element.className = "timeline-tree-item timeline-category-" + uiUti
ls.categoryForRecord(record).name; |
1068 var paddingLeft = 5; | 1067 var paddingLeft = 5; |
1069 var step = -3; | 1068 var step = -3; |
1070 for (var currentRecord = presentationRecord.presentationParent() ? prese
ntationRecord.presentationParent().presentationParent() : null; currentRecord; c
urrentRecord = currentRecord.presentationParent()) | 1069 for (var currentRecord = presentationRecord.presentationParent() ? prese
ntationRecord.presentationParent().presentationParent() : null; currentRecord; c
urrentRecord = currentRecord.presentationParent()) |
1071 paddingLeft += 12 / (Math.max(1, step++)); | 1070 paddingLeft += 12 / (Math.max(1, step++)); |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1298 } else { | 1297 } else { |
1299 this._element.classList.add("hidden"); | 1298 this._element.classList.add("hidden"); |
1300 } | 1299 } |
1301 }, | 1300 }, |
1302 | 1301 |
1303 _dispose: function() | 1302 _dispose: function() |
1304 { | 1303 { |
1305 this._element.remove(); | 1304 this._element.remove(); |
1306 } | 1305 } |
1307 } | 1306 } |
OLD | NEW |