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

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

Issue 632573002: Adding regex support to search bar in dev tools console (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Implement regex search similar to Sublime Text 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
« no previous file with comments | « Source/devtools/front_end/console/ConsoleView.js ('k') | Source/devtools/front_end/inspectorCommon.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 50968de8b92b7d15813da12fe2e1993b230f89cf..bfb60758e4f906c4f8cdbfee9ed5de82df84a7ba 100644
--- a/Source/devtools/front_end/console/ConsoleViewMessage.js
+++ b/Source/devtools/front_end/console/ConsoleViewMessage.js
@@ -1269,6 +1269,24 @@ WebInspector.ConsoleViewMessage.prototype = {
{
return this._message.messageText;
},
+
+ /**
+ * @return {!string}
+ */
+ getText: function()
+ {
+ return this._messageElement.textContent;
+ },
+
+ 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);
+ },
}
/**
« no previous file with comments | « Source/devtools/front_end/console/ConsoleView.js ('k') | Source/devtools/front_end/inspectorCommon.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698