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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js

Issue 1830003002: [DevTools] SourceFrame implements Search interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed ordering of comment tags Created 4 years, 9 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 | « third_party/WebKit/Source/devtools/front_end/source_frame/SourceFrame.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js b/third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js
index 337ba81e460741222c568b1a3b2022ca5e3bae12..e96704fe77fa05c85c9575eb1441ec72d96744df 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js
@@ -316,9 +316,18 @@ WebInspector.SourcesView.prototype = {
if (this._currentUISourceCode === uiSourceCode)
return sourceView;
+ var currentFrame = this.currentSourceFrame();
+ if (currentFrame)
+ currentFrame.setSearchableView(null);
+
this._currentUISourceCode = uiSourceCode;
this._editorContainer.showFile(uiSourceCode);
this._updateScriptViewToolbarItems();
+
+ currentFrame = this.currentSourceFrame();
+ if (currentFrame)
+ currentFrame.setSearchableView(this._searchableView);
+
return sourceView;
},
@@ -497,8 +506,6 @@ WebInspector.SourcesView.prototype = {
*/
performSearch: function(searchConfig, shouldJump, jumpBackwards)
{
- this._searchableView.updateSearchMatchesCount(0);
-
var sourceFrame = this.currentSourceFrame();
if (!sourceFrame)
return;
@@ -506,37 +513,7 @@ WebInspector.SourcesView.prototype = {
this._searchView = sourceFrame;
this._searchConfig = searchConfig;
- /**
- * @param {!WebInspector.Widget} view
- * @param {number} searchMatches
- * @this {WebInspector.SourcesView}
- */
- function finishedCallback(view, searchMatches)
- {
- if (!searchMatches)
- return;
-
- this._searchableView.updateSearchMatchesCount(searchMatches);
- }
-
- /**
- * @param {number} currentMatchIndex
- * @this {WebInspector.SourcesView}
- */
- function currentMatchChanged(currentMatchIndex)
- {
- this._searchableView.updateCurrentMatchIndex(currentMatchIndex);
- }
-
- /**
- * @this {WebInspector.SourcesView}
- */
- function searchResultsChanged()
- {
- this.performSearch(this._searchConfig, false, false);
- }
-
- this._searchView.performSearch(this._searchConfig, shouldJump, !!jumpBackwards, finishedCallback.bind(this), currentMatchChanged.bind(this), searchResultsChanged.bind(this));
+ this._searchView.performSearch(this._searchConfig, shouldJump, jumpBackwards);
},
/**
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/source_frame/SourceFrame.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698