зеркало из https://github.com/mozilla/gecko-dev.git
Bug 978610 - [e10s] Make window.close() work (r=felipe)
This commit is contained in:
Родитель
7b5a9374ce
Коммит
10b55ebc8c
|
@ -2997,6 +2997,18 @@
|
|||
tab.setAttribute("titlechanged", "true");
|
||||
break;
|
||||
}
|
||||
case "DOMWindowClose": {
|
||||
if (this.tabs.length == 1) {
|
||||
window.close();
|
||||
return;
|
||||
}
|
||||
|
||||
let tab = this._getTabForBrowser(browser);
|
||||
if (tab) {
|
||||
this.removeTab(tab);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "contextmenu": {
|
||||
gContextMenuContentData = { event: aMessage.objects.event,
|
||||
browser: browser };
|
||||
|
@ -3063,6 +3075,7 @@
|
|||
.useRemoteTabs;
|
||||
if (remote) {
|
||||
messageManager.addMessageListener("DOMTitleChanged", this);
|
||||
messageManager.addMessageListener("DOMWindowClose", this);
|
||||
messageManager.addMessageListener("contextmenu", this);
|
||||
}
|
||||
messageManager.addMessageListener("DOMWebNotificationClicked", this);
|
||||
|
|
|
@ -234,6 +234,12 @@ addEventListener("DOMTitleChanged", function (aEvent) {
|
|||
}
|
||||
}, false);
|
||||
|
||||
addEventListener("DOMWindowClose", function (aEvent) {
|
||||
if (!aEvent.isTrusted)
|
||||
return;
|
||||
sendAsyncMessage("DOMWindowClose");
|
||||
}, false);
|
||||
|
||||
addEventListener("ImageContentLoaded", function (aEvent) {
|
||||
if (content.document instanceof Ci.nsIImageDocument) {
|
||||
let req = content.document.imageRequest;
|
||||
|
|
Загрузка…
Ссылка в новой задаче