Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(408)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js

Issue 2373203002: DevTools: rename useArrayPreviewFormatter and remove ConsoleCommandResult override (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 { 580 {
581 this._formatParameterAsObject(object, elem, false); 581 this._formatParameterAsObject(object, elem, false);
582 } 582 }
583 }, 583 },
584 584
585 _formattedParameterAsNodeForTest: function() 585 _formattedParameterAsNodeForTest: function()
586 { 586 {
587 }, 587 },
588 588
589 /** 589 /**
590 * @param {!WebInspector.RemoteObject} array
591 * @return {boolean} 590 * @return {boolean}
592 */ 591 */
593 useArrayPreviewInFormatter: function(array) 592 usePrintedArrayFormatter: function()
lushnikov 2016/09/28 16:54:03 can we make it private?
luoe 2016/09/28 17:50:55 Done.
594 { 593 {
595 return this._message.type !== WebInspector.ConsoleMessage.MessageType.Di rXML; 594 return this._message.type !== WebInspector.ConsoleMessage.MessageType.Di rXML && this._message.type !== WebInspector.ConsoleMessage.MessageType.Result;
596 }, 595 },
597 596
598 /** 597 /**
599 * @param {!WebInspector.RemoteObject} array 598 * @param {!WebInspector.RemoteObject} array
600 * @param {!Element} elem 599 * @param {!Element} elem
601 */ 600 */
602 _formatParameterAsArray: function(array, elem) 601 _formatParameterAsArray: function(array, elem)
603 { 602 {
604 var maxFlatArrayLength = 100; 603 var maxFlatArrayLength = 100;
605 if (this.useArrayPreviewInFormatter(array) || array.arrayLength() > maxF latArrayLength) 604 if (this.usePrintedArrayFormatter() || array.arrayLength() > maxFlatArra yLength)
606 this._formatParameterAsArrayOrObject(array, elem, this.useArrayPrevi ewInFormatter(array) || array.arrayLength() <= maxFlatArrayLength); 605 this._formatParameterAsArrayOrObject(array, elem, this.usePrintedArr ayFormatter() || array.arrayLength() <= maxFlatArrayLength);
607 else 606 else
608 array.getAllProperties(false, this._printArrayResult.bind(this, arra y, elem)); 607 array.getAllProperties(false, this._printArrayResult.bind(this, arra y, elem));
609 }, 608 },
610 609
611 /** 610 /**
612 * @param {!WebInspector.RemoteObject} table 611 * @param {!WebInspector.RemoteObject} table
613 * @return {?WebInspector.SortableDataGrid} 612 * @return {?WebInspector.SortableDataGrid}
614 */ 613 */
615 _buildTableDataGrid: function(table) 614 _buildTableDataGrid: function(table)
616 { 615 {
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
1288 { 1287 {
1289 if (!this._element) { 1288 if (!this._element) {
1290 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this ); 1289 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this );
1291 this._element.classList.toggle("collapsed", this._collapsed); 1290 this._element.classList.toggle("collapsed", this._collapsed);
1292 } 1291 }
1293 return this._element; 1292 return this._element;
1294 }, 1293 },
1295 1294
1296 __proto__: WebInspector.ConsoleViewMessage.prototype 1295 __proto__: WebInspector.ConsoleViewMessage.prototype
1297 } 1296 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698