Chromium Code Reviews| 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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 425 elem.appendChild(section.element); | 425 elem.appendChild(section.element); |
| 426 }, | 426 }, |
| 427 | 427 |
| 428 /** | 428 /** |
| 429 * @param {!WebInspector.RemoteObject} obj | 429 * @param {!WebInspector.RemoteObject} obj |
| 430 * @param {!Element} titleElement | 430 * @param {!Element} titleElement |
| 431 * @return {!WebInspector.ObjectPropertiesSection} | 431 * @return {!WebInspector.ObjectPropertiesSection} |
| 432 */ | 432 */ |
| 433 _buildExpandableObjectSection: function(obj, titleElement) | 433 _buildExpandableObjectSection: function(obj, titleElement) |
| 434 { | 434 { |
| 435 var note = titleElement.createChild("span", "object-state-note"); | 435 var expandedTitleElement = null; |
| 436 note.classList.add("info-note"); | 436 if (obj.description && WebInspector.ObjectPropertiesSection.needsAlterna teTitle(obj)) { |
|
lushnikov
2016/07/20 23:54:26
can we hide this inside the ObjectPropertiesSectio
luoe
2016/07/22 22:30:58
Done.
| |
| 437 note.title = WebInspector.UIString("Object value at left was snapshotted when logged, value below was evaluated just now."); | 437 expandedTitleElement = createElement("span"); |
| 438 expandedTitleElement.createTextChild(obj.description); | |
| 438 | 439 |
| 439 var section = new WebInspector.ObjectPropertiesSection(obj, titleElement , this._linkifier); | 440 var note = expandedTitleElement.createChild("span", "object-state-no te"); |
| 441 note.classList.add("info-note"); | |
| 442 note.title = WebInspector.UIString("Value below was evaluated just n ow."); | |
| 443 } | |
| 444 | |
| 445 var section = new WebInspector.ObjectPropertiesSection(obj, titleElement , expandedTitleElement, this._linkifier); | |
| 440 section.element.classList.add("console-view-object-properties-section"); | 446 section.element.classList.add("console-view-object-properties-section"); |
| 441 section.enableContextMenu(); | 447 section.enableContextMenu(); |
| 442 return section; | 448 return section; |
| 443 }, | 449 }, |
| 444 | 450 |
| 445 /** | 451 /** |
| 446 * @param {!WebInspector.RemoteObject} func | 452 * @param {!WebInspector.RemoteObject} func |
| 447 * @param {!Element} element | 453 * @param {!Element} element |
| 448 * @param {boolean=} includePreview | 454 * @param {boolean=} includePreview |
| 449 */ | 455 */ |
| (...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1351 { | 1357 { |
| 1352 if (!this._wrapperElement) { | 1358 if (!this._wrapperElement) { |
| 1353 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this ); | 1359 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this ); |
| 1354 this._wrapperElement.classList.toggle("collapsed", this._collapsed); | 1360 this._wrapperElement.classList.toggle("collapsed", this._collapsed); |
| 1355 } | 1361 } |
| 1356 return this._wrapperElement; | 1362 return this._wrapperElement; |
| 1357 }, | 1363 }, |
| 1358 | 1364 |
| 1359 __proto__: WebInspector.ConsoleViewMessage.prototype | 1365 __proto__: WebInspector.ConsoleViewMessage.prototype |
| 1360 } | 1366 } |
| OLD | NEW |