Index: Source/devtools/front_end/sources/SourcesView.js |
diff --git a/Source/devtools/front_end/sources/SourcesView.js b/Source/devtools/front_end/sources/SourcesView.js |
index c5c5813fa33ad51eb7d1a168d3223a4498ac7928..3c2938a06ab3627f751548fadf0e8da9631d7db9 100644 |
--- a/Source/devtools/front_end/sources/SourcesView.js |
+++ b/Source/devtools/front_end/sources/SourcesView.js |
@@ -21,7 +21,7 @@ WebInspector.SourcesView = function(workspace, sourcesPanel) |
this._workspace = workspace; |
this._sourcesPanel = sourcesPanel; |
- this._searchableView = new WebInspector.SearchableView(this); |
+ this._searchableView = new WebInspector.SearchableView(this, "sourcesViewSearchConfig"); |
this._searchableView.setMinimalSearchQuerySize(0); |
this._searchableView.show(this.element); |
@@ -497,15 +497,15 @@ WebInspector.SourcesView.prototype = { |
this._searchView.searchCanceled(); |
delete this._searchView; |
- delete this._searchQuery; |
+ delete this._searchConfig; |
}, |
/** |
- * @param {string} query |
+ * @param {!WebInspector.SearchableView.SearchConfig} searchConfig |
* @param {boolean} shouldJump |
* @param {boolean=} jumpBackwards |
*/ |
- performSearch: function(query, shouldJump, jumpBackwards) |
+ performSearch: function(searchConfig, shouldJump, jumpBackwards) |
{ |
this._searchableView.updateSearchMatchesCount(0); |
@@ -514,7 +514,7 @@ WebInspector.SourcesView.prototype = { |
return; |
this._searchView = sourceFrame; |
- this._searchQuery = query; |
+ this._searchConfig = searchConfig; |
/** |
* @param {!WebInspector.View} view |
@@ -543,10 +543,10 @@ WebInspector.SourcesView.prototype = { |
*/ |
function searchResultsChanged() |
{ |
- this.performSearch(query, false, false); |
+ this.performSearch(this._searchConfig, false, false); |
} |
- this._searchView.performSearch(query, shouldJump, !!jumpBackwards, finishedCallback.bind(this), currentMatchChanged.bind(this), searchResultsChanged.bind(this)); |
+ this._searchView.performSearch(this._searchConfig, shouldJump, !!jumpBackwards, finishedCallback.bind(this), currentMatchChanged.bind(this), searchResultsChanged.bind(this)); |
}, |
jumpToNextSearchResult: function() |
@@ -555,7 +555,7 @@ WebInspector.SourcesView.prototype = { |
return; |
if (this._searchView !== this.currentSourceFrame()) { |
- this.performSearch(this._searchQuery, true); |
+ this.performSearch(this._searchConfig, true); |
return; |
} |
@@ -568,7 +568,7 @@ WebInspector.SourcesView.prototype = { |
return; |
if (this._searchView !== this.currentSourceFrame()) { |
- this.performSearch(this._searchQuery, true); |
+ this.performSearch(this._searchConfig, true); |
if (this._searchView) |
this._searchView.jumpToLastSearchResult(); |
return; |
@@ -578,30 +578,46 @@ WebInspector.SourcesView.prototype = { |
}, |
/** |
- * @param {string} text |
+ * @return {boolean} |
+ */ |
+ supportsCaseSensitiveSearch: function() |
+ { |
+ return true; |
+ }, |
+ |
+ /** |
+ * @return {boolean} |
+ */ |
+ supportsRegexSearch: function() |
+ { |
+ return true; |
+ }, |
+ |
+ /** |
+ * @param {string} replacement |
*/ |
- replaceSelectionWith: function(text) |
+ replaceSelectionWith: function(replacement) |
{ |
var sourceFrame = this.currentSourceFrame(); |
if (!sourceFrame) { |
console.assert(sourceFrame); |
return; |
} |
- sourceFrame.replaceSelectionWith(text); |
+ sourceFrame.replaceSelectionWith(replacement); |
}, |
/** |
- * @param {string} query |
- * @param {string} text |
+ * @param {!WebInspector.SearchableView.SearchConfig} searchConfig |
+ * @param {string} replacement |
*/ |
- replaceAllWith: function(query, text) |
+ replaceAllWith: function(searchConfig, replacement) |
{ |
var sourceFrame = this.currentSourceFrame(); |
if (!sourceFrame) { |
console.assert(sourceFrame); |
return; |
} |
- sourceFrame.replaceAllWith(query, text); |
+ sourceFrame.replaceAllWith(searchConfig, replacement); |
}, |
/** |