зеркало из https://github.com/mozilla/gecko-dev.git
Bug 861495 - Transplant getOuterWindowWithId from nsIDOMWindowUtils to a window-related service: webappsUI.jsm. r=gavin
This commit is contained in:
Родитель
0bfb4890cd
Коммит
7dbdb26370
|
@ -87,19 +87,13 @@ this.webappsUI = {
|
|||
},
|
||||
|
||||
_getBrowserForId: function(aId) {
|
||||
let someWindow = Services.wm.getMostRecentWindow(null);
|
||||
|
||||
if (someWindow) {
|
||||
let windowUtils = someWindow.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIDOMWindowUtils);
|
||||
let content = windowUtils.getOuterWindowWithId(aId);
|
||||
if (content) {
|
||||
let browser = content.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIWebNavigation)
|
||||
.QueryInterface(Ci.nsIDocShell).chromeEventHandler;
|
||||
let win = browser.ownerDocument.defaultView;
|
||||
return [win, browser];
|
||||
}
|
||||
let content = Services.wm.getOuterWindowWithId(aId);
|
||||
if (content) {
|
||||
let browser = content.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIWebNavigation)
|
||||
.QueryInterface(Ci.nsIDocShell).chromeEventHandler;
|
||||
let win = browser.ownerDocument.defaultView;
|
||||
return [win, browser];
|
||||
}
|
||||
|
||||
return [null, null];
|
||||
|
|
Загрузка…
Ссылка в новой задаче