Index: third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js b/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js |
index cc777844aa6eea28d5746826c7cdbeeec402a6c3..2b5bf888637e5884fd81c3e82721c3338b630a2e 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js |
+++ b/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js |
@@ -352,6 +352,8 @@ WebInspector.ConsoleViewMessage.prototype = { |
// Inline strings when formatting. |
if (shouldFormatMessage && parameters[i].type === "string") |
formattedResult.appendChild(WebInspector.linkifyStringAsFragment(parameters[i].description)); |
+ else if (parameters[i].type === "function") |
+ formattedResult.appendChild(this._formatParameter(parameters[i], true, true)); |
else |
formattedResult.appendChild(this._formatParameter(parameters[i], false, true)); |
if (i < parameters.length - 1) |
@@ -420,10 +422,12 @@ WebInspector.ConsoleViewMessage.prototype = { |
titleElement.createTextChild(obj.description || ""); |
} |
} |
+ var expandedTitleElement = createElement("span"); |
+ expandedTitleElement.createTextChild(obj.description || ""); |
var note = titleElement.createChild("span", "object-state-note"); |
note.classList.add("info-note"); |
note.title = WebInspector.UIString("Object value at left was snapshotted when logged, value below was evaluated just now."); |
- var section = new WebInspector.ObjectPropertiesSection(obj, titleElement); |
+ var section = new WebInspector.ObjectPropertiesSection(obj, titleElement, expandedTitleElement); |
section.enableContextMenu(); |
elem.appendChild(section.element); |
section.element.classList.add("console-view-object-properties-section"); |
@@ -511,24 +515,11 @@ WebInspector.ConsoleViewMessage.prototype = { |
/** |
* @param {!WebInspector.RemoteObject} array |
- * @return {boolean} |
- */ |
- useArrayPreviewInFormatter: function(array) |
- { |
- return this._message.type !== WebInspector.ConsoleMessage.MessageType.DirXML; |
- }, |
- |
- /** |
- * @param {!WebInspector.RemoteObject} array |
* @param {!Element} elem |
*/ |
_formatParameterAsArray: function(array, elem) |
{ |
- var maxFlatArrayLength = 100; |
- if (this.useArrayPreviewInFormatter(array) || array.arrayLength() > maxFlatArrayLength) |
- this._formatParameterAsArrayOrObject(array, elem, this.useArrayPreviewInFormatter(array) || array.arrayLength() <= maxFlatArrayLength); |
- else |
- array.getAllProperties(false, this._printArray.bind(this, array, elem)); |
+ this._formatParameterAsArrayOrObject(array, elem, true); |
}, |
/** |