Commit b255e7d0 authored by luoe's avatar luoe Committed by Commit bot

DevTools: rename useArrayPreviewFormatter and remove ConsoleCommandResult override

This renames useArrayPreviewFormatter() to usePrintedArrayFormatter() and
removes its override in ConsoleCommandResult

Review-Url: https://codereview.chromium.org/2373203002
Cr-Commit-Position: refs/heads/master@{#423000}
parent 81f1adfd
...@@ -1257,16 +1257,6 @@ WebInspector.ConsoleCommandResult = function(message, linkifier, nestingLevel) ...@@ -1257,16 +1257,6 @@ WebInspector.ConsoleCommandResult = function(message, linkifier, nestingLevel)
} }
WebInspector.ConsoleCommandResult.prototype = { WebInspector.ConsoleCommandResult.prototype = {
/**
* @override
* @param {!WebInspector.RemoteObject} array
* @return {boolean}
*/
useArrayPreviewInFormatter: function(array)
{
return false;
},
/** /**
* @override * @override
* @return {!Element} * @return {!Element}
......
...@@ -613,12 +613,11 @@ WebInspector.ConsoleViewMessage.prototype = { ...@@ -613,12 +613,11 @@ WebInspector.ConsoleViewMessage.prototype = {
}, },
/** /**
* @param {!WebInspector.RemoteObject} array
* @return {boolean} * @return {boolean}
*/ */
useArrayPreviewInFormatter: function(array) _usePrintedArrayFormatter: function()
{ {
return this._message.type !== WebInspector.ConsoleMessage.MessageType.DirXML; return this._message.type !== WebInspector.ConsoleMessage.MessageType.DirXML && this._message.type !== WebInspector.ConsoleMessage.MessageType.Result;
}, },
/** /**
...@@ -628,8 +627,8 @@ WebInspector.ConsoleViewMessage.prototype = { ...@@ -628,8 +627,8 @@ WebInspector.ConsoleViewMessage.prototype = {
_formatParameterAsArray: function(array, elem) _formatParameterAsArray: function(array, elem)
{ {
var maxFlatArrayLength = 100; var maxFlatArrayLength = 100;
if (this.useArrayPreviewInFormatter(array) || array.arrayLength() > maxFlatArrayLength) if (this._usePrintedArrayFormatter() || array.arrayLength() > maxFlatArrayLength)
this._formatParameterAsArrayOrObject(array, elem, this.useArrayPreviewInFormatter(array) || array.arrayLength() <= maxFlatArrayLength); this._formatParameterAsArrayOrObject(array, elem, this._usePrintedArrayFormatter() || array.arrayLength() <= maxFlatArrayLength);
else else
array.getAllProperties(false, this._printArrayResult.bind(this, array, elem)); array.getAllProperties(false, this._printArrayResult.bind(this, array, elem));
}, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment