Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 348 }; | 348 }; |
| 349 | 349 |
| 350 /** | 350 /** |
| 351 * @constructor | 351 * @constructor |
| 352 * @param {!WebInspector.PaintProfilerCommandLogView} ownerView | 352 * @param {!WebInspector.PaintProfilerCommandLogView} ownerView |
| 353 * @param {!WebInspector.PaintProfilerLogItem} logItem | 353 * @param {!WebInspector.PaintProfilerLogItem} logItem |
| 354 * @extends {TreeElement} | 354 * @extends {TreeElement} |
| 355 */ | 355 */ |
| 356 WebInspector.LogTreeElement = function(ownerView, logItem) | 356 WebInspector.LogTreeElement = function(ownerView, logItem) |
| 357 { | 357 { |
| 358 TreeElement.call(this); | 358 TreeElement.call(this, "", !!this._logItem.params); |
|
caseq
2015/03/06 09:35:30
this._logItem is not set at this point.
| |
| 359 this._logItem = logItem; | 359 this._logItem = logItem; |
| 360 this._ownerView = ownerView; | 360 this._ownerView = ownerView; |
| 361 this._filled = false; | 361 this._filled = false; |
| 362 } | 362 } |
| 363 | 363 |
| 364 WebInspector.LogTreeElement.prototype = { | 364 WebInspector.LogTreeElement.prototype = { |
| 365 onattach: function() | 365 onattach: function() |
| 366 { | 366 { |
| 367 this._update(); | 367 this._update(); |
| 368 this.hasChildren = !!this._logItem.params; | |
| 369 }, | 368 }, |
| 370 | 369 |
| 371 onexpand: function() | 370 onpopulate: function() |
| 372 { | 371 { |
| 373 if (this._filled) | |
| 374 return; | |
| 375 this._filled = true; | |
| 376 for (var param in this._logItem.params) | 372 for (var param in this._logItem.params) |
| 377 WebInspector.LogPropertyTreeElement._appendLogPropertyItem(this, par am, this._logItem.params[param]); | 373 WebInspector.LogPropertyTreeElement._appendLogPropertyItem(this, par am, this._logItem.params[param]); |
| 378 }, | 374 }, |
| 379 | 375 |
| 380 /** | 376 /** |
| 381 * @param {!Object<string,*>} param | 377 * @param {!Object<string,*>} param |
| 382 * @param {string} name | 378 * @param {string} name |
| 383 * @return {string} | 379 * @return {string} |
| 384 */ | 380 */ |
| 385 _paramToString: function(param, name) | 381 _paramToString: function(param, name) |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 588 var method = logItem.method.toTitleCase(); | 584 var method = logItem.method.toTitleCase(); |
| 589 | 585 |
| 590 var logItemCategories = WebInspector.PaintProfilerView._initLogItemCategorie s(); | 586 var logItemCategories = WebInspector.PaintProfilerView._initLogItemCategorie s(); |
| 591 var result = logItemCategories[method]; | 587 var result = logItemCategories[method]; |
| 592 if (!result) { | 588 if (!result) { |
| 593 result = WebInspector.PaintProfilerView.categories()["misc"]; | 589 result = WebInspector.PaintProfilerView.categories()["misc"]; |
| 594 logItemCategories[method] = result; | 590 logItemCategories[method] = result; |
| 595 } | 591 } |
| 596 return result; | 592 return result; |
| 597 } | 593 } |
| OLD | NEW |