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

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

Issue 2557573002: DevTools: show name descriptions before formatted TypedArrays (Closed)
Patch Set: fix test Created 4 years 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/components/RemoteObjectPreviewFormatter.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 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 * @param {?Array.<!SDK.RemoteObjectProperty>} properties 632 * @param {?Array.<!SDK.RemoteObjectProperty>} properties
633 * @this {!Console.ConsoleViewMessage} 633 * @this {!Console.ConsoleViewMessage}
634 */ 634 */
635 function printArrayResult(properties) { 635 function printArrayResult(properties) {
636 if (!properties) { 636 if (!properties) {
637 result.appendChild(this._formatParameterAsObject(array, false)); 637 result.appendChild(this._formatParameterAsObject(array, false));
638 return; 638 return;
639 } 639 }
640 640
641 var titleElement = createElementWithClass('span', 'console-object-preview' ); 641 var titleElement = createElementWithClass('span', 'console-object-preview' );
642 if (array.subtype === 'typedarray')
643 titleElement.createTextChild(array.description + ' ');
642 var elements = {}; 644 var elements = {};
643 for (var i = 0; i < properties.length; ++i) { 645 for (var i = 0; i < properties.length; ++i) {
644 var property = properties[i]; 646 var property = properties[i];
645 var name = property.name; 647 var name = property.name;
646 if (isNaN(name)) 648 if (isNaN(name))
647 continue; 649 continue;
648 if (property.getter) 650 if (property.getter)
649 elements[name] = this._formatAsAccessorProperty(array, [name], true); 651 elements[name] = this._formatAsAccessorProperty(array, [name], true);
650 else if (property.value) 652 else if (property.value)
651 elements[name] = this._formatAsArrayEntry(property.value); 653 elements[name] = this._formatAsArrayEntry(property.value);
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
1260 toMessageElement() { 1262 toMessageElement() {
1261 if (!this._element) { 1263 if (!this._element) {
1262 super.toMessageElement(); 1264 super.toMessageElement();
1263 this._expandGroupIcon = UI.Icon.create('', 'expand-group-icon'); 1265 this._expandGroupIcon = UI.Icon.create('', 'expand-group-icon');
1264 this._contentElement.insertBefore(this._expandGroupIcon, this._contentElem ent.firstChild); 1266 this._contentElement.insertBefore(this._expandGroupIcon, this._contentElem ent.firstChild);
1265 this.setCollapsed(this._collapsed); 1267 this.setCollapsed(this._collapsed);
1266 } 1268 }
1267 return this._element; 1269 return this._element;
1268 } 1270 }
1269 }; 1271 };
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/components/RemoteObjectPreviewFormatter.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698