| 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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 this._previewFormatter.appendObjectPreview(titleElement, obj.preview
); | 408 this._previewFormatter.appendObjectPreview(titleElement, obj.preview
); |
| 409 } else { | 409 } else { |
| 410 if (obj.type === "function") { | 410 if (obj.type === "function") { |
| 411 WebInspector.ObjectPropertiesSection.formatObjectAsFunction(obj,
titleElement, false); | 411 WebInspector.ObjectPropertiesSection.formatObjectAsFunction(obj,
titleElement, false); |
| 412 titleElement.classList.add("object-value-function"); | 412 titleElement.classList.add("object-value-function"); |
| 413 } else { | 413 } else { |
| 414 titleElement.createTextChild(obj.description || ""); | 414 titleElement.createTextChild(obj.description || ""); |
| 415 } | 415 } |
| 416 } | 416 } |
| 417 | 417 |
| 418 var section = this._buildExpandableObjectSection(obj, titleElement); | 418 var section = new WebInspector.ObjectPropertiesSection(obj, titleElement
, this._linkifier); |
| 419 section.element.classList.add("console-view-object-properties-section"); |
| 420 section.enableContextMenu(); |
| 419 elem.appendChild(section.element); | 421 elem.appendChild(section.element); |
| 420 }, | 422 }, |
| 421 | 423 |
| 422 /** | 424 /** |
| 423 * @param {!WebInspector.RemoteObject} obj | |
| 424 * @param {!Element} titleElement | |
| 425 * @return {!WebInspector.ObjectPropertiesSection} | |
| 426 */ | |
| 427 _buildExpandableObjectSection: function(obj, titleElement) | |
| 428 { | |
| 429 var note = titleElement.createChild("span", "object-state-note"); | |
| 430 note.classList.add("info-note"); | |
| 431 note.title = WebInspector.UIString("Object value at left was snapshotted
when logged, value below was evaluated just now."); | |
| 432 | |
| 433 var section = new WebInspector.ObjectPropertiesSection(obj, titleElement
, this._linkifier); | |
| 434 section.element.classList.add("console-view-object-properties-section"); | |
| 435 section.enableContextMenu(); | |
| 436 return section; | |
| 437 }, | |
| 438 | |
| 439 /** | |
| 440 * @param {!WebInspector.RemoteObject} func | 425 * @param {!WebInspector.RemoteObject} func |
| 441 * @param {!Element} element | 426 * @param {!Element} element |
| 442 * @param {boolean=} includePreview | 427 * @param {boolean=} includePreview |
| 443 */ | 428 */ |
| 444 _formatParameterAsFunction: function(func, element, includePreview) | 429 _formatParameterAsFunction: function(func, element, includePreview) |
| 445 { | 430 { |
| 446 WebInspector.RemoteFunction.objectAsFunction(func).targetFunction().then
(formatTargetFunction.bind(this)); | 431 WebInspector.RemoteFunction.objectAsFunction(func).targetFunction().then
(formatTargetFunction.bind(this)); |
| 447 | 432 |
| 448 /** | 433 /** |
| 449 * @param {!WebInspector.RemoteObject} targetFunction | 434 * @param {!WebInspector.RemoteObject} targetFunction |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 | 677 |
| 693 titleElement.appendChild(element); | 678 titleElement.appendChild(element); |
| 694 lastNonEmptyIndex = i; | 679 lastNonEmptyIndex = i; |
| 695 if (i < length - 1) | 680 if (i < length - 1) |
| 696 titleElement.createTextChild(", "); | 681 titleElement.createTextChild(", "); |
| 697 } | 682 } |
| 698 appendUndefined(titleElement, length); | 683 appendUndefined(titleElement, length); |
| 699 | 684 |
| 700 titleElement.createTextChild("]"); | 685 titleElement.createTextChild("]"); |
| 701 | 686 |
| 702 var section = this._buildExpandableObjectSection(array, titleElement); | 687 var section = new WebInspector.ObjectPropertiesSection(array, titleEleme
nt, this._linkifier); |
| 688 section.element.classList.add("console-view-object-properties-section"); |
| 689 section.enableContextMenu(); |
| 703 elem.appendChild(section.element); | 690 elem.appendChild(section.element); |
| 704 }, | 691 }, |
| 705 | 692 |
| 706 /** | 693 /** |
| 707 * @param {!WebInspector.RemoteObject} output | 694 * @param {!WebInspector.RemoteObject} output |
| 708 * @return {!Element} | 695 * @return {!Element} |
| 709 */ | 696 */ |
| 710 _formatAsArrayEntry: function(output) | 697 _formatAsArrayEntry: function(output) |
| 711 { | 698 { |
| 712 if (this._message.type === WebInspector.ConsoleMessage.MessageType.DirXM
L) { | 699 if (this._message.type === WebInspector.ConsoleMessage.MessageType.DirXM
L) { |
| (...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1356 { | 1343 { |
| 1357 if (!this._wrapperElement) { | 1344 if (!this._wrapperElement) { |
| 1358 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this
); | 1345 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this
); |
| 1359 this._wrapperElement.classList.toggle("collapsed", this._collapsed); | 1346 this._wrapperElement.classList.toggle("collapsed", this._collapsed); |
| 1360 } | 1347 } |
| 1361 return this._wrapperElement; | 1348 return this._wrapperElement; |
| 1362 }, | 1349 }, |
| 1363 | 1350 |
| 1364 __proto__: WebInspector.ConsoleViewMessage.prototype | 1351 __proto__: WebInspector.ConsoleViewMessage.prototype |
| 1365 } | 1352 } |
| OLD | NEW |