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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 this._rootRecord = new WebInspector.TimelinePresentationModel.RootRecord
(); | 81 this._rootRecord = new WebInspector.TimelinePresentationModel.RootRecord
(); |
82 /** @type {!Object.<string, !WebInspector.TimelinePresentationModel.Reco
rd>} */ | 82 /** @type {!Object.<string, !WebInspector.TimelinePresentationModel.Reco
rd>} */ |
83 this._coalescingBuckets = {}; | 83 this._coalescingBuckets = {}; |
84 }, | 84 }, |
85 | 85 |
86 /** | 86 /** |
87 * @param {!WebInspector.TimelineModel.Record} record | 87 * @param {!WebInspector.TimelineModel.Record} record |
88 */ | 88 */ |
89 addRecord: function(record) | 89 addRecord: function(record) |
90 { | 90 { |
91 var records; | 91 if (record.isProgram()) { |
92 if (record.type() === WebInspector.TimelineModel.RecordType.Program) | 92 var records = record.children(); |
93 records = record.children(); | 93 for (var i = 0; i < records.length; ++i) |
94 else | 94 this._innerAddRecord(this._rootRecord, records[i]); |
95 records = [record]; | 95 } else { |
96 | 96 this._innerAddRecord(this._rootRecord, record); |
97 for (var i = 0; i < records.length; ++i) | 97 } |
98 this._innerAddRecord(this._rootRecord, records[i]); | |
99 }, | 98 }, |
100 | 99 |
101 /** | 100 /** |
102 * @param {!WebInspector.TimelinePresentationModel.Record} parentRecord | 101 * @param {!WebInspector.TimelinePresentationModel.Record} parentRecord |
103 * @param {!WebInspector.TimelineModel.Record} record | 102 * @param {!WebInspector.TimelineModel.Record} record |
104 */ | 103 */ |
105 _innerAddRecord: function(parentRecord, record) | 104 _innerAddRecord: function(parentRecord, record) |
106 { | 105 { |
107 var coalescingBucket; | 106 var coalescingBucket; |
108 | 107 |
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
599 /** | 598 /** |
600 * @return {boolean} | 599 * @return {boolean} |
601 */ | 600 */ |
602 hasWarnings: function() | 601 hasWarnings: function() |
603 { | 602 { |
604 return false; | 603 return false; |
605 }, | 604 }, |
606 | 605 |
607 __proto__: WebInspector.TimelinePresentationModel.Record.prototype | 606 __proto__: WebInspector.TimelinePresentationModel.Record.prototype |
608 } | 607 } |
OLD | NEW |