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

Unified Diff: Source/devtools/front_end/console/ConsoleViewMessage.js

Issue 676193002: Navigate between individual search matches in DevTools console (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
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 2d88c73e68ef891d651f7e396b49ff3327815f3f..f58ab732513f2df873986b1794dd6c84482690d9 100644
--- a/Source/devtools/front_end/console/ConsoleViewMessage.js
+++ b/Source/devtools/front_end/console/ConsoleViewMessage.js
@@ -943,7 +943,7 @@ WebInspector.ConsoleViewMessage.prototype = {
return String.format(format, parameters, formatters, formattedResult, append.bind(this));
},
- clearHighlight: function()
+ clearHighlights: function()
{
if (!this._formattedMessage)
return;
@@ -1272,6 +1272,23 @@ WebInspector.ConsoleViewMessage.prototype = {
{
return this._message.messageText;
},
+
+ /**
+ * @return {!string}
+ */
+ getText: function () {
+ return this._messageElement.textContent;
robwu 2014/10/25 23:13:00 What's the difference between the text getter (a f
aknudsen 2014/10/26 11:22:40 The reason for the getText method is to implement
+ },
+
+ highlightMatch: function(start, end, isCurrent)
+ {
+ if (!this._formattedMessage)
+ return;
+
+ console.log("Highlighting from position " + start + " to " + end);
+ WebInspector.highlightSearchResults(this._messageElement,
+ [new WebInspector.SourceRange(start, end - start + 1)], undefined, isCurrent);
+ },
}
/**

Powered by Google App Engine
This is Rietveld 408576698