Index: Source/devtools/front_end/console/ConsoleViewMessage.js |
diff --git a/Source/devtools/front_end/console/ConsoleViewMessage.js b/Source/devtools/front_end/console/ConsoleViewMessage.js |
index 3486bd34d060f736c89a4c54f2f30c8d2e2176b1..f35e1ba74757b0f8b9a96fbda81216b1c92f9191 100644 |
--- a/Source/devtools/front_end/console/ConsoleViewMessage.js |
+++ b/Source/devtools/front_end/console/ConsoleViewMessage.js |
@@ -937,7 +937,7 @@ WebInspector.ConsoleViewMessage.prototype = { |
return String.format(format, parameters, formatters, formattedResult, append); |
}, |
- clearHighlight: function() |
+ clearHighlights: function() |
{ |
if (!this._formattedMessage) |
return; |
@@ -945,6 +945,7 @@ WebInspector.ConsoleViewMessage.prototype = { |
WebInspector.removeSearchResultsHighlight(this._formattedMessage); |
}, |
+ // XXX: Can we remove this? |
lushnikov
2014/11/07 16:27:19
yes!
aknudsen
2014/11/09 00:02:13
Done.
|
highlightSearchResults: function(regexObject) |
{ |
if (!this._formattedMessage) |
@@ -1266,6 +1267,27 @@ WebInspector.ConsoleViewMessage.prototype = { |
{ |
return this._message.messageText; |
}, |
+ |
+ /** |
+ * @return {!string} |
lushnikov
2014/11/07 16:27:19
no need for an exclamation mark - string is non-nu
aknudsen
2014/11/08 12:00:52
Acknowledged.
aknudsen
2014/11/09 00:02:14
Done.
|
+ */ |
lushnikov
2014/11/07 16:27:17
wrong comment alining regarding asterisks
aknudsen
2014/11/08 12:00:52
Acknowledged.
aknudsen
2014/11/09 00:02:13
Done.
|
+ getText: function () { |
lushnikov
2014/11/07 16:27:19
brace on a new line
aknudsen
2014/11/08 12:00:52
Acknowledged.
aknudsen
2014/11/09 00:02:13
Done.
|
+ if (!this._messageElement) |
+ return ''; |
lushnikov
2014/11/07 16:27:19
we use only double-quotes for strings
aknudsen
2014/11/08 12:00:52
Acknowledged.
aknudsen
2014/11/09 00:02:13
Done.
|
+ return this._messageElement.textContent; |
+ }, |
+ |
+ /** |
+ * @return {!Array.<!Element>} |
lushnikov
2014/11/07 16:27:19
comment aligning + annotation for arguments
aknudsen
2014/11/08 12:00:52
Acknowledged.
aknudsen
2014/11/09 00:02:13
Done.
|
+ */ |
+ highlightMatch: function(start, end) |
+ { |
+ var highlightNodes = []; |
+ if (this._formattedMessage) |
+ highlightNodes = WebInspector.highlightSearchResults(this._messageElement, |
lushnikov
2014/11/07 16:27:19
no wrap
aknudsen
2014/11/08 12:00:52
Acknowledged.
aknudsen
2014/11/09 00:02:13
Done.
|
+ [new WebInspector.SourceRange(start, end - start + 1)]); |
+ return highlightNodes; |
+ }, |
lushnikov
2014/11/07 16:27:19
no trailing comma
aknudsen
2014/11/08 12:00:52
Acknowledged.
aknudsen
2014/11/09 00:02:13
Done.
|
} |
/** |