WebInspector.AdvancedSearchView._instance = this;
/** @type {!WebInspector.SearchScope} */
this._searchScope = new WebInspector.SourcesSearchScope();
+ if (WebInspector.AdvancedSearchView._pendingQuery) {
+ this._toggle(WebInspector.AdvancedSearchView._pendingQuery);
+ delete WebInspector.AdvancedSearchView._pendingQuery;
+ }
}
WebInspector.AdvancedSearchView.prototype = {
WebInspector.SearchResultsPane = function(searchConfig)
{
this._searchConfig = searchConfig;
- this.element = document.createElement("div");
+ this.element = createElement("div");
}
WebInspector.SearchResultsPane.prototype = {
WebInspector.AdvancedSearchView.ToggleDrawerViewActionDelegate.prototype = {
/**
* @return {boolean}
+ * // FIXME: remove this suppression.
+ * @suppressGlobalPropertiesCheck
*/
handleAction: function()
{
if (selection.rangeCount)
queryCandidate = selection.toString().replace(/\r?\n.*/, "");
- WebInspector.inspectorView.showPanel("sources");
+ WebInspector.inspectorView.setCurrentPanel(WebInspector.SourcesPanel.instance());
WebInspector.inspectorView.showViewInDrawer("sources.search");
- WebInspector.AdvancedSearchView._instance._toggle(queryCandidate);
+ if (WebInspector.AdvancedSearchView._instance)
+ WebInspector.AdvancedSearchView._instance._toggle(queryCandidate);
+ else
+ WebInspector.AdvancedSearchView._pendingQuery = queryCandidate;
} else {
WebInspector.inspectorView.closeDrawer();
}