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

Unified Diff: third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js

Issue 1954423002: DevTools: introduce CSSStyleSheetHeader.originalContentProvider() method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@simplify-network-project
Patch Set: address comments Created 4 years, 7 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/sources/ScriptFormatterEditorAction.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/workspace/UISourceCode.js
diff --git a/third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js b/third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js
index e37d5c28ec10e6fc2ed5fee553fb207cc1124e0e..7822ea65db8e2712f495a366a5a3c84b55ff3079 100644
--- a/third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js
+++ b/third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js
@@ -554,12 +554,21 @@ WebInspector.UISourceCode.prototype = {
searchInContent: function(query, caseSensitive, isRegex, callback)
{
var content = this.content();
- if (content) {
- WebInspector.StaticContentProvider.searchInContent(content, query, caseSensitive, isRegex, callback);
+ if (!content) {
+ this._project.searchInFileContent(this, query, caseSensitive, isRegex, callback);
return;
}
- this._project.searchInFileContent(this, query, caseSensitive, isRegex, callback);
+ // searchInContent should call back later.
+ setTimeout(doSearch.bind(null, content), 0);
+
+ /**
+ * @param {string} content
+ */
+ function doSearch(content)
+ {
+ callback(WebInspector.ContentProvider.performSearchInContent(content, query, caseSensitive, isRegex));
+ }
},
/**
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698