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

Unified Diff: Source/WebCore/inspector/front-end/Script.js

Issue 8371003: Merge 97851 - Web Inspector: Enable caseSensitive search / Regex support in advanced search. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/912/
Patch Set: Created 9 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/WebCore/inspector/front-end/Script.js
===================================================================
--- Source/WebCore/inspector/front-end/Script.js (revision 98111)
+++ Source/WebCore/inspector/front-end/Script.js (working copy)
@@ -74,9 +74,11 @@
/**
* @param {string} query
+ * @param {boolean} caseSensitive
+ * @param {boolean} isRegex
* @param {function(Array.<PageAgent.SearchMatch>)} callback
*/
- searchInContent: function(query, callback)
+ searchInContent: function(query, caseSensitive, isRegex, callback)
{
/**
* @this {WebInspector.Script}
@@ -87,12 +89,17 @@
{
if (error)
console.error(error);
- callback(searchMatches || []);
+ var result = [];
+ for (var i = 0; i < searchMatches.length; ++i) {
+ var searchMatch = new WebInspector.ContentProvider.SearchMatch(searchMatches[i].lineNumber, searchMatches[i].lineContent);
+ result.push(searchMatch);
+ }
+ callback(result || []);
}
if (this.scriptId) {
// Script failed to parse.
- DebuggerAgent.searchInContent(this.scriptId, query, innerCallback.bind(this));
+ DebuggerAgent.searchInContent(this.scriptId, query, caseSensitive, isRegex, innerCallback.bind(this));
} else
callback([]);
},
« no previous file with comments | « Source/WebCore/inspector/front-end/Resource.js ('k') | Source/WebCore/inspector/front-end/ScriptsSearchScope.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698