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

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

Issue 1186093002: [DevTools] Fixed multiline error messages (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added test Created 5 years, 6 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 | « Source/core/inspector/InjectedScriptSource.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 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 if (lines.length > 1) { 617 if (lines.length > 1) {
618 var detailedLink = elem.createChild("a"); 618 var detailedLink = elem.createChild("a");
619 detailedLink.textContent = "(\u2026)"; 619 detailedLink.textContent = "(\u2026)";
620 function showDetailed(event) 620 function showDetailed(event)
621 { 621 {
622 span.removeChildren(); 622 span.removeChildren();
623 detailedLink.remove(); 623 detailedLink.remove();
624 span.appendChild(WebInspector.linkifyStringAsFragment(text)); 624 span.appendChild(WebInspector.linkifyStringAsFragment(text));
625 event.consume(true); 625 event.consume(true);
626 } 626 }
627 detailedLink._showDetailedForTest = showDetailed.bind(null, new Mous eEvent('click'));
yurys 2015/06/17 13:20:23 Why not make showDetails a method instead?
627 detailedLink.addEventListener("click", showDetailed, false); 628 detailedLink.addEventListener("click", showDetailed, false);
628 } 629 }
629 }, 630 },
630 631
631 /** 632 /**
632 * @param {!WebInspector.RemoteObject} array 633 * @param {!WebInspector.RemoteObject} array
633 * @param {!Element} elem 634 * @param {!Element} elem
634 * @param {?Array.<!WebInspector.RemoteObjectProperty>} properties 635 * @param {?Array.<!WebInspector.RemoteObjectProperty>} properties
635 */ 636 */
636 _printArray: function(array, elem, properties) 637 _printArray: function(array, elem, properties)
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
1316 { 1317 {
1317 if (!this._wrapperElement) { 1318 if (!this._wrapperElement) {
1318 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this ); 1319 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this );
1319 this._wrapperElement.classList.toggle("collapsed", this._collapsed); 1320 this._wrapperElement.classList.toggle("collapsed", this._collapsed);
1320 } 1321 }
1321 return this._wrapperElement; 1322 return this._wrapperElement;
1322 }, 1323 },
1323 1324
1324 __proto__: WebInspector.ConsoleViewMessage.prototype 1325 __proto__: WebInspector.ConsoleViewMessage.prototype
1325 } 1326 }
OLDNEW
« no previous file with comments | « Source/core/inspector/InjectedScriptSource.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698