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