| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
| 4 * Copyright (C) 2009 Joseph Pecoraro | 4 * Copyright (C) 2009 Joseph Pecoraro |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 | 471 |
| 472 /** | 472 /** |
| 473 * @param {?WebInspector.RemoteObject} object | 473 * @param {?WebInspector.RemoteObject} object |
| 474 * @param {!Array.<!RuntimeAgent.PropertyPreview>} propertyPath | 474 * @param {!Array.<!RuntimeAgent.PropertyPreview>} propertyPath |
| 475 * @return {!Element} | 475 * @return {!Element} |
| 476 */ | 476 */ |
| 477 _renderPropertyPreviewOrAccessor: function(object, propertyPath) | 477 _renderPropertyPreviewOrAccessor: function(object, propertyPath) |
| 478 { | 478 { |
| 479 var property = propertyPath.peekLast(); | 479 var property = propertyPath.peekLast(); |
| 480 if (property.type === "accessor") | 480 if (property.type === "accessor") |
| 481 return this._formatAsAccessorProperty(object, propertyPath.select("n
ame"), false); | 481 return this._formatAsAccessorProperty(object, propertyPath.map(prope
rty => property.name), false); |
| 482 return this._previewFormatter.renderPropertyPreview(property.type, /** @
type {string} */ (property.subtype), property.value); | 482 return this._previewFormatter.renderPropertyPreview(property.type, /** @
type {string} */ (property.subtype), property.value); |
| 483 }, | 483 }, |
| 484 | 484 |
| 485 /** | 485 /** |
| 486 * @param {!WebInspector.RemoteObject} object | 486 * @param {!WebInspector.RemoteObject} object |
| 487 * @param {!Element} elem | 487 * @param {!Element} elem |
| 488 */ | 488 */ |
| 489 _formatParameterAsNode: function(object, elem) | 489 _formatParameterAsNode: function(object, elem) |
| 490 { | 490 { |
| 491 WebInspector.Renderer.renderPromise(object).then(appendRenderer, failedT
oRender.bind(this)); | 491 WebInspector.Renderer.renderPromise(object).then(appendRenderer, failedT
oRender.bind(this)); |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 640 * @param {!Element} elem | 640 * @param {!Element} elem |
| 641 * @param {?Array.<!WebInspector.RemoteObjectProperty>} properties | 641 * @param {?Array.<!WebInspector.RemoteObjectProperty>} properties |
| 642 */ | 642 */ |
| 643 _printArray: function(array, elem, properties) | 643 _printArray: function(array, elem, properties) |
| 644 { | 644 { |
| 645 if (!properties) { | 645 if (!properties) { |
| 646 this._formatParameterAsObject(array, elem, false); | 646 this._formatParameterAsObject(array, elem, false); |
| 647 return; | 647 return; |
| 648 } | 648 } |
| 649 | 649 |
| 650 var elements = []; | 650 var elements = {}; |
| 651 for (var i = 0; i < properties.length; ++i) { | 651 for (var i = 0; i < properties.length; ++i) { |
| 652 var property = properties[i]; | 652 var property = properties[i]; |
| 653 var name = property.name; | 653 var name = property.name; |
| 654 if (isNaN(name)) | 654 if (isNaN(name)) |
| 655 continue; | 655 continue; |
| 656 if (property.getter) | 656 if (property.getter) |
| 657 elements[name] = this._formatAsAccessorProperty(array, [name], t
rue); | 657 elements[name] = this._formatAsAccessorProperty(array, [name], t
rue); |
| 658 else if (property.value) | 658 else if (property.value) |
| 659 elements[name] = this._formatAsArrayEntry(property.value); | 659 elements[name] = this._formatAsArrayEntry(property.value); |
| 660 } | 660 } |
| (...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1331 { | 1331 { |
| 1332 if (!this._wrapperElement) { | 1332 if (!this._wrapperElement) { |
| 1333 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this
); | 1333 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this
); |
| 1334 this._wrapperElement.classList.toggle("collapsed", this._collapsed); | 1334 this._wrapperElement.classList.toggle("collapsed", this._collapsed); |
| 1335 } | 1335 } |
| 1336 return this._wrapperElement; | 1336 return this._wrapperElement; |
| 1337 }, | 1337 }, |
| 1338 | 1338 |
| 1339 __proto__: WebInspector.ConsoleViewMessage.prototype | 1339 __proto__: WebInspector.ConsoleViewMessage.prototype |
| 1340 } | 1340 } |
| OLD | NEW |