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 4060a6161a6fd665005da0c50bb1c19a4773ff2e..ae47da5346be3542bc349179ca7ad53cae301481 100644 |
--- a/Source/devtools/front_end/console/ConsoleViewMessage.js |
+++ b/Source/devtools/front_end/console/ConsoleViewMessage.js |
@@ -951,22 +951,12 @@ WebInspector.ConsoleViewMessage.prototype = { |
return String.format(format, parameters, formatters, formattedResult, append); |
}, |
- clearHighlight: function() |
+ clearHighlights: function() |
{ |
if (!this._formattedMessage) |
return; |
- WebInspector.removeSearchResultsHighlight(this._formattedMessage); |
- }, |
- |
- highlightSearchResults: function(regexObject) |
- { |
- if (!this._formattedMessage) |
- return; |
- |
- this._highlightSearchResultsInElement(regexObject, this._messageElement); |
- if (this._anchorElement) |
- this._highlightSearchResultsInElement(regexObject, this._anchorElement); |
+ WebInspector.removeSearchResultsHighlight(this._formattedMessage, WebInspector.highlightedSearchResultClassName); |
}, |
_highlightSearchResultsInElement: function(regexObject, element) |
@@ -1283,6 +1273,28 @@ WebInspector.ConsoleViewMessage.prototype = { |
}, |
/** |
+ * @return {string} |
+ */ |
+ getText: function () |
lushnikov
2014/12/04 16:07:34
We have getter text() and method getText, which is
aknudsen
2014/12/05 22:30:02
Done.
|
+ { |
+ if (!this._messageElement) |
+ return ""; |
+ return this._messageElement.textContent; |
+ }, |
+ |
+ /** |
+ * @param {!Array.<!Object>} ranges |
+ * @return {!Array.<!Element>} |
+ */ |
+ highlightMatches: function(ranges) |
+ { |
+ var highlightNodes = []; |
+ if (this._formattedMessage) |
+ highlightNodes = WebInspector.highlightSearchResults(this._messageElement, ranges); |
+ return highlightNodes; |
+ }, |
+ |
+ /** |
* @param {string} string |
* @return {?Element} |
*/ |