mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 866381 - allow inspector to be used on chrome windows, r=dcamp
This commit is contained in:
parent
28464ba636
commit
97bf6d8ae6
@ -184,6 +184,14 @@ InspectorPanel.prototype = {
|
||||
* Hooks the searchbar to show result and auto completion suggestions.
|
||||
*/
|
||||
setupSearchBox: function InspectorPanel_setupSearchBox() {
|
||||
let searchDoc;
|
||||
if (this.target.isLocalTab) {
|
||||
searchDoc = this.browser.contentDocument;
|
||||
} else if (this.target.window) {
|
||||
searchDoc = this.target.window.document;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
// Initiate the selectors search object.
|
||||
let setNodeFunction = function(node) {
|
||||
this.selection.setNode(node, "selectorsearch");
|
||||
@ -193,9 +201,7 @@ InspectorPanel.prototype = {
|
||||
this.searchSuggestions = null;
|
||||
}
|
||||
this.searchBox = this.panelDoc.getElementById("inspector-searchbox");
|
||||
this.searchSuggestions = new SelectorSearch(this.browser.contentDocument,
|
||||
this.searchBox,
|
||||
setNodeFunction);
|
||||
this.searchSuggestions = new SelectorSearch(searchDoc, this.searchBox, setNodeFunction);
|
||||
},
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user