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

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

Issue 2472183002: DevTools: Fix wrapping bugs in console (Closed)
Patch Set: fix tests, remove unnecessary consoleView class Created 4 years, 1 month 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) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Joseph Pecoraro 3 * Copyright (C) 2009 Joseph Pecoraro
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 1185 matching lines...) Expand 10 before | Expand all | Expand 10 after
1196 1196
1197 /** 1197 /**
1198 * @override 1198 * @override
1199 * @return {!Element} 1199 * @return {!Element}
1200 */ 1200 */
1201 contentElement() { 1201 contentElement() {
1202 if (!this._contentElement) { 1202 if (!this._contentElement) {
1203 this._contentElement = createElementWithClass('div', 'console-user-command '); 1203 this._contentElement = createElementWithClass('div', 'console-user-command ');
1204 this._contentElement.message = this; 1204 this._contentElement.message = this;
1205 1205
1206 this._formattedCommand = createElementWithClass('span', 'console-message-t ext source-code'); 1206 this._formattedCommand = createElementWithClass('span', 'source-code');
1207 this._formattedCommand.textContent = this.text.replaceControlCharacters(); 1207 this._formattedCommand.textContent = this.text.replaceControlCharacters();
1208 this._contentElement.appendChild(this._formattedCommand); 1208 this._contentElement.appendChild(this._formattedCommand);
1209 1209
1210 if (this._formattedCommand.textContent.length < WebInspector.ConsoleComman d.MaxLengthToIgnoreHighlighter) { 1210 if (this._formattedCommand.textContent.length < WebInspector.ConsoleComman d.MaxLengthToIgnoreHighlighter) {
1211 var javascriptSyntaxHighlighter = new WebInspector.DOMSyntaxHighlighter( 'text/javascript', true); 1211 var javascriptSyntaxHighlighter = new WebInspector.DOMSyntaxHighlighter( 'text/javascript', true);
1212 javascriptSyntaxHighlighter.syntaxHighlightNode(this._formattedCommand). then(this._updateSearch.bind(this)); 1212 javascriptSyntaxHighlighter.syntaxHighlightNode(this._formattedCommand). then(this._updateSearch.bind(this));
1213 } else { 1213 } else {
1214 this._updateSearch(); 1214 this._updateSearch();
1215 } 1215 }
1216 } 1216 }
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
1323 return true; 1323 return true;
1324 } 1324 }
1325 return false; 1325 return false;
1326 } 1326 }
1327 }; 1327 };
1328 1328
1329 /** 1329 /**
1330 * @typedef {{messageIndex: number, matchIndex: number}} 1330 * @typedef {{messageIndex: number, matchIndex: number}}
1331 */ 1331 */
1332 WebInspector.ConsoleView.RegexMatchRange; 1332 WebInspector.ConsoleView.RegexMatchRange;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698