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

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

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

Powered by Google App Engine
This is Rietveld 408576698