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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 invalidateFilteredRecords: function() | 210 invalidateFilteredRecords: function() |
211 { | 211 { |
212 delete this._filteredRecords; | 212 delete this._filteredRecords; |
213 }, | 213 }, |
214 | 214 |
215 /** | 215 /** |
216 * @return {!Array.<!WebInspector.TimelinePresentationModel.Record>} | 216 * @return {!Array.<!WebInspector.TimelinePresentationModel.Record>} |
217 */ | 217 */ |
218 filteredRecords: function() | 218 filteredRecords: function() |
219 { | 219 { |
| 220 if (!this._rootRecord.presentationChildren().length) |
| 221 this.refreshRecords(); |
220 if (this._filteredRecords) | 222 if (this._filteredRecords) |
221 return this._filteredRecords; | 223 return this._filteredRecords; |
222 | 224 |
223 var recordsInWindow = []; | 225 var recordsInWindow = []; |
224 | 226 |
225 var stack = [{children: this._rootRecord._presentationChildren, index: 0
, parentIsCollapsed: false, parentRecord: {}}]; | 227 var stack = [{children: this._rootRecord._presentationChildren, index: 0
, parentIsCollapsed: false, parentRecord: {}}]; |
226 var revealedDepth = 0; | 228 var revealedDepth = 0; |
227 | 229 |
228 function revealRecordsInStack() { | 230 function revealRecordsInStack() { |
229 for (var depth = revealedDepth + 1; depth < stack.length; ++depth) { | 231 for (var depth = revealedDepth + 1; depth < stack.length; ++depth) { |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
573 /** | 575 /** |
574 * @return {boolean} | 576 * @return {boolean} |
575 */ | 577 */ |
576 hasWarnings: function() | 578 hasWarnings: function() |
577 { | 579 { |
578 return false; | 580 return false; |
579 }, | 581 }, |
580 | 582 |
581 __proto__: WebInspector.TimelinePresentationModel.Record.prototype | 583 __proto__: WebInspector.TimelinePresentationModel.Record.prototype |
582 } | 584 } |
OLD | NEW |