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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/devtools/front_end/cmdevtools.css ('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 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 * @param {!WebInspector.ConsoleMessage} consoleMessage 772 * @param {!WebInspector.ConsoleMessage} consoleMessage
773 */ 773 */
774 WebInspector.SourceFrame.RowMessage = function(consoleMessage) 774 WebInspector.SourceFrame.RowMessage = function(consoleMessage)
775 { 775 {
776 this._consoleMessage = consoleMessage; 776 this._consoleMessage = consoleMessage;
777 this._repeatCount = 1; 777 this._repeatCount = 1;
778 this.element = document.createElementWithClass("div", "text-editor-row-messa ge"); 778 this.element = document.createElementWithClass("div", "text-editor-row-messa ge");
779 this._icon = this.element.createChild("span", "text-editor-row-message-icon" ); 779 this._icon = this.element.createChild("span", "text-editor-row-message-icon" );
780 this._icon.classList.add(WebInspector.SourceFrame._iconClassPerLevel[console Message.level]); 780 this._icon.classList.add(WebInspector.SourceFrame._iconClassPerLevel[console Message.level]);
781 this._repeatCountElement = this.element.createChild("span", "bubble-repeat-c ount hidden error"); 781 this._repeatCountElement = this.element.createChild("span", "bubble-repeat-c ount hidden error");
782 this.element.createTextChild(this._consoleMessage.messageText); 782 var linesContainer = this.element.createChild("div", "text-editor-row-messag e-lines");
783 var lines = this._consoleMessage.messageText.split("\n");
784 for (var i = 0; i < lines.length; ++i) {
785 var messageLine = linesContainer.createChild("div");
786 messageLine.textContent = lines[i];
787 }
783 } 788 }
784 789
785 WebInspector.SourceFrame.RowMessage.prototype = { 790 WebInspector.SourceFrame.RowMessage.prototype = {
786 /** 791 /**
787 * @return {!WebInspector.ConsoleMessage} 792 * @return {!WebInspector.ConsoleMessage}
788 */ 793 */
789 consoleMessage: function() 794 consoleMessage: function()
790 { 795 {
791 return this._consoleMessage; 796 return this._consoleMessage;
792 }, 797 },
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
1014 1019
1015 /** 1020 /**
1016 * @param {?WebInspector.TextRange} from 1021 * @param {?WebInspector.TextRange} from
1017 * @param {?WebInspector.TextRange} to 1022 * @param {?WebInspector.TextRange} to
1018 */ 1023 */
1019 onJumpToPosition: function(from, to) 1024 onJumpToPosition: function(from, to)
1020 { 1025 {
1021 this._sourceFrame.onJumpToPosition(from, to); 1026 this._sourceFrame.onJumpToPosition(from, to);
1022 } 1027 }
1023 } 1028 }
OLDNEW
« 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