| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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; |
| OLD | NEW |