summaryrefslogtreecommitdiffstats
path: root/webkit/glue/devtools/js/devtools.js
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/glue/devtools/js/devtools.js')
-rw-r--r--webkit/glue/devtools/js/devtools.js35
1 files changed, 33 insertions, 2 deletions
diff --git a/webkit/glue/devtools/js/devtools.js b/webkit/glue/devtools/js/devtools.js
index 1432a08..430b9e0 100644
--- a/webkit/glue/devtools/js/devtools.js
+++ b/webkit/glue/devtools/js/devtools.js
@@ -420,9 +420,9 @@ WebInspector.SourceView.prototype.setupSourceFrameIfNeeded = function() {
self.sourceFrame.addEventListener('syntax highlighting complete',
self._syntaxHighlightingComplete, self);
self.sourceFrame.syntaxHighlightJavascript();
+ } else {
+ self._sourceFrameSetupFinished();
}
- } else {
- self._sourceFrameSetupFinished();
}
});
return true;
@@ -593,6 +593,37 @@ WebInspector.StylePropertyTreeElement.prototype.applyStyleText = function(
/**
+ * This function overrides standard searchableViews getters to perform search
+ * only in the current view (other views are loaded asynchronously, no way to
+ * search them yet).
+ */
+WebInspector.searchableViews_ = function() {
+ var views = [];
+ const visibleView = this.visibleView;
+ if (visibleView && visibleView.performSearch) {
+ views.push(visibleView);
+ }
+ return views;
+};
+
+
+/**
+ * @override
+ */
+WebInspector.ResourcesPanel.prototype.__defineGetter__(
+ 'searchableViews',
+ WebInspector.searchableViews_);
+
+
+/**
+ * @override
+ */
+WebInspector.ScriptsPanel.prototype.__defineGetter__(
+ 'searchableViews',
+ WebInspector.searchableViews_);
+
+
+/**
* @override
*/
WebInspector.Console.prototype._evalInInspectedWindow = function(expression) {