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

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

Issue 2605693003: DevTools: introduce object previews experiment (Closed)
Patch Set: ac2 Created 3 years, 11 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
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 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 518
519 /** 519 /**
520 * @param {!SDK.RemoteObject} obj 520 * @param {!SDK.RemoteObject} obj
521 * @param {boolean=} includePreview 521 * @param {boolean=} includePreview
522 * @return {!Element} 522 * @return {!Element}
523 */ 523 */
524 _formatParameterAsObject(obj, includePreview) { 524 _formatParameterAsObject(obj, includePreview) {
525 var titleElement = createElement('span'); 525 var titleElement = createElement('span');
526 if (includePreview && obj.preview) { 526 if (includePreview && obj.preview) {
527 titleElement.classList.add('console-object-preview'); 527 titleElement.classList.add('console-object-preview');
528 this._previewFormatter.appendObjectPreview(titleElement, obj.preview); 528 this._previewFormatter.appendObjectPreview(titleElement, obj.preview, fals e /* isEntry */);
529 } else if (obj.type === 'function') { 529 } else if (obj.type === 'function') {
530 Components.ObjectPropertiesSection.formatObjectAsFunction(obj, titleElemen t, false); 530 Components.ObjectPropertiesSection.formatObjectAsFunction(obj, titleElemen t, false);
531 titleElement.classList.add('object-value-function'); 531 titleElement.classList.add('object-value-function');
532 } else { 532 } else {
533 titleElement.createTextChild(obj.description || ''); 533 titleElement.createTextChild(obj.description || '');
534 } 534 }
535 535
536 var section = new Components.ObjectPropertiesSection(obj, titleElement, this ._linkifier); 536 var section = new Components.ObjectPropertiesSection(obj, titleElement, this ._linkifier);
537 section.element.classList.add('console-view-object-properties-section'); 537 section.element.classList.add('console-view-object-properties-section');
538 section.enableContextMenu(); 538 section.enableContextMenu();
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
1189 toMessageElement() { 1189 toMessageElement() {
1190 if (!this._element) { 1190 if (!this._element) {
1191 super.toMessageElement(); 1191 super.toMessageElement();
1192 this._expandGroupIcon = UI.Icon.create('', 'expand-group-icon'); 1192 this._expandGroupIcon = UI.Icon.create('', 'expand-group-icon');
1193 this._contentElement.insertBefore(this._expandGroupIcon, this._contentElem ent.firstChild); 1193 this._contentElement.insertBefore(this._expandGroupIcon, this._contentElem ent.firstChild);
1194 this.setCollapsed(this._collapsed); 1194 this.setCollapsed(this._collapsed);
1195 } 1195 }
1196 return this._element; 1196 return this._element;
1197 } 1197 }
1198 }; 1198 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698