| 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 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 * @return {number} | 646 * @return {number} |
| 647 */ | 647 */ |
| 648 function compareEndTime(value, task) | 648 function compareEndTime(value, task) |
| 649 { | 649 { |
| 650 return value < task.endTime() ? -1 : 1; | 650 return value < task.endTime() ? -1 : 1; |
| 651 } | 651 } |
| 652 | 652 |
| 653 var taskIndex = insertionIndexForObjectInListSortedByFunction(startTime,
tasks, compareEndTime); | 653 var taskIndex = insertionIndexForObjectInListSortedByFunction(startTime,
tasks, compareEndTime); |
| 654 | 654 |
| 655 var foreignStyle = "gpu-task-foreign"; | 655 var foreignStyle = "gpu-task-foreign"; |
| 656 var element = container.firstChild; | 656 var element = /** @type {?Element} */ (container.firstChild); |
| 657 var lastElement; | 657 var lastElement; |
| 658 var lastLeft; | 658 var lastLeft; |
| 659 var lastRight; | 659 var lastRight; |
| 660 | 660 |
| 661 for (; taskIndex < tasks.length; ++taskIndex) { | 661 for (; taskIndex < tasks.length; ++taskIndex) { |
| 662 var task = tasks[taskIndex]; | 662 var task = tasks[taskIndex]; |
| 663 if (task.startTime() > endTime) | 663 if (task.startTime() > endTime) |
| 664 break; | 664 break; |
| 665 | 665 |
| 666 var left = Math.max(0, this._calculator.computePosition(task.startTi
me()) + barOffset - widthAdjustment); | 666 var left = Math.max(0, this._calculator.computePosition(task.startTi
me()) + barOffset - widthAdjustment); |
| (...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1095 if (matchInfo) | 1095 if (matchInfo) |
| 1096 WebInspector.highlightSearchResult(this.element, matchInfo.index, ma
tchInfo[0].length, domChanges); | 1096 WebInspector.highlightSearchResult(this.element, matchInfo.index, ma
tchInfo[0].length, domChanges); |
| 1097 }, | 1097 }, |
| 1098 | 1098 |
| 1099 dispose: function() | 1099 dispose: function() |
| 1100 { | 1100 { |
| 1101 this.element.remove(); | 1101 this.element.remove(); |
| 1102 }, | 1102 }, |
| 1103 | 1103 |
| 1104 /** | 1104 /** |
| 1105 * @param {!Event} event | 1105 * @param {?Event} event |
| 1106 */ | 1106 */ |
| 1107 _onExpandClick: function(event) | 1107 _onExpandClick: function(event) |
| 1108 { | 1108 { |
| 1109 this._record.setCollapsed(!this._record.collapsed()); | 1109 this._record.setCollapsed(!this._record.collapsed()); |
| 1110 this._scheduleRefresh(); | 1110 this._scheduleRefresh(); |
| 1111 event.consume(true); | 1111 event.consume(true); |
| 1112 }, | 1112 }, |
| 1113 | 1113 |
| 1114 /** | 1114 /** |
| 1115 * @param {?Event} event | 1115 * @param {?Event} event |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1294 this._element.classList.remove("hidden"); | 1294 this._element.classList.remove("hidden"); |
| 1295 } else | 1295 } else |
| 1296 this._element.classList.add("hidden"); | 1296 this._element.classList.add("hidden"); |
| 1297 }, | 1297 }, |
| 1298 | 1298 |
| 1299 _dispose: function() | 1299 _dispose: function() |
| 1300 { | 1300 { |
| 1301 this._element.remove(); | 1301 this._element.remove(); |
| 1302 } | 1302 } |
| 1303 } | 1303 } |
| OLD | NEW |