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

Unified Diff: Source/devtools/front_end/source_frame/SourceFrame.js

Issue 478963002: DevTools: [CodeMirror] handle new-lines in error popovers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/devtools/front_end/cmdevtools.css ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/source_frame/SourceFrame.js
diff --git a/Source/devtools/front_end/source_frame/SourceFrame.js b/Source/devtools/front_end/source_frame/SourceFrame.js
index f8ba547a1df2e1190c3df77b51c8b9db3dc31a5e..c180c45413852313bddf92be537e028cc9663534 100644
--- a/Source/devtools/front_end/source_frame/SourceFrame.js
+++ b/Source/devtools/front_end/source_frame/SourceFrame.js
@@ -779,7 +779,12 @@ WebInspector.SourceFrame.RowMessage = function(consoleMessage)
this._icon = this.element.createChild("span", "text-editor-row-message-icon");
this._icon.classList.add(WebInspector.SourceFrame._iconClassPerLevel[consoleMessage.level]);
this._repeatCountElement = this.element.createChild("span", "bubble-repeat-count hidden error");
- this.element.createTextChild(this._consoleMessage.messageText);
+ var linesContainer = this.element.createChild("div", "text-editor-row-message-lines");
+ var lines = this._consoleMessage.messageText.split("\n");
+ for (var i = 0; i < lines.length; ++i) {
+ var messageLine = linesContainer.createChild("div");
+ messageLine.textContent = lines[i];
+ }
}
WebInspector.SourceFrame.RowMessage.prototype = {
« no previous file with comments | « Source/devtools/front_end/cmdevtools.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698