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

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

Issue 654753003: DevTools: text node rendering in the console regressed when migrated to promises. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « LayoutTests/inspector/console/console-format-expected.txt ('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 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 span.textContent = description; 591 span.textContent = description;
592 return span; 592 return span;
593 }, 593 },
594 594
595 /** 595 /**
596 * @param {!WebInspector.RemoteObject} object 596 * @param {!WebInspector.RemoteObject} object
597 * @param {!Element} elem 597 * @param {!Element} elem
598 */ 598 */
599 _formatParameterAsNode: function(object, elem) 599 _formatParameterAsNode: function(object, elem)
600 { 600 {
601 WebInspector.Renderer.renderPromise(object).then(appendRenderer).done(); 601 WebInspector.Renderer.renderPromise(object).then(appendRenderer, failedT oRender.bind(this)).done();
602 /** 602 /**
603 * @param {!Element} rendererElement 603 * @param {!Element} rendererElement
604 */ 604 */
605 function appendRenderer(rendererElement) 605 function appendRenderer(rendererElement)
606 { 606 {
607 elem.appendChild(rendererElement); 607 elem.appendChild(rendererElement);
608 } 608 }
609
610 /**
611 * @this {WebInspector.ConsoleViewMessage}
612 */
613 function failedToRender()
614 {
615 this._formatParameterAsObject(object, elem, false);
616 }
609 }, 617 },
610 618
611 /** 619 /**
612 * @param {!WebInspector.RemoteObject} array 620 * @param {!WebInspector.RemoteObject} array
613 * @return {boolean} 621 * @return {boolean}
614 */ 622 */
615 useArrayPreviewInFormatter: function(array) 623 useArrayPreviewInFormatter: function(array)
616 { 624 {
617 return this._message.type !== WebInspector.ConsoleMessage.MessageType.Di rXML && !!array.preview; 625 return this._message.type !== WebInspector.ConsoleMessage.MessageType.Di rXML && !!array.preview;
618 }, 626 },
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
1306 { 1314 {
1307 if (!this._wrapperElement) { 1315 if (!this._wrapperElement) {
1308 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this ); 1316 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this );
1309 this._wrapperElement.classList.toggle("collapsed", this._collapsed); 1317 this._wrapperElement.classList.toggle("collapsed", this._collapsed);
1310 } 1318 }
1311 return this._wrapperElement; 1319 return this._wrapperElement;
1312 }, 1320 },
1313 1321
1314 __proto__: WebInspector.ConsoleViewMessage.prototype 1322 __proto__: WebInspector.ConsoleViewMessage.prototype
1315 } 1323 }
OLDNEW
« no previous file with comments | « LayoutTests/inspector/console/console-format-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698