зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1375490: Part 1 - Correctly support alerts in OOP popups. r=mixedpuppy
MozReview-Commit-ID: KgqAKMLmuTI --HG-- extra : rebase_source : 82ec2b3a8380fac8355009720dbd20c7a6c7dbb6
This commit is contained in:
Родитель
3a6f096a97
Коммит
e5655d2234
|
@ -117,6 +117,9 @@ class BasePopup {
|
|||
this.destroyBrowser(this.browser, true);
|
||||
this.browser.remove();
|
||||
}
|
||||
if (this.stack) {
|
||||
this.stack.remove();
|
||||
}
|
||||
|
||||
if (this.viewNode) {
|
||||
this.viewNode.removeEventListener(this.DESTROY_EVENT, this);
|
||||
|
@ -132,6 +135,7 @@ class BasePopup {
|
|||
}
|
||||
|
||||
this.browser = null;
|
||||
this.stack = null;
|
||||
this.viewNode = null;
|
||||
});
|
||||
}
|
||||
|
@ -220,6 +224,9 @@ class BasePopup {
|
|||
|
||||
createBrowser(viewNode, popupURL = null) {
|
||||
let document = viewNode.ownerDocument;
|
||||
|
||||
let stack = document.createElementNS(XUL_NS, "stack");
|
||||
|
||||
let browser = document.createElementNS(XUL_NS, "browser");
|
||||
browser.setAttribute("type", "content");
|
||||
browser.setAttribute("disableglobalhistory", "true");
|
||||
|
@ -249,6 +256,7 @@ class BasePopup {
|
|||
// will be if and when we popup debugging.
|
||||
|
||||
this.browser = browser;
|
||||
this.stack = stack;
|
||||
|
||||
let readyPromise;
|
||||
if (this.extension.remote) {
|
||||
|
@ -257,7 +265,8 @@ class BasePopup {
|
|||
readyPromise = promiseEvent(browser, "load");
|
||||
}
|
||||
|
||||
viewNode.appendChild(browser);
|
||||
stack.appendChild(browser);
|
||||
viewNode.appendChild(stack);
|
||||
|
||||
ExtensionParent.apiManager.emit("extension-browser-inserted", browser);
|
||||
|
||||
|
|
|
@ -160,7 +160,9 @@
|
|||
this.isLive = true;
|
||||
window.addEventListener("resize", this);
|
||||
window.addEventListener("unload", this);
|
||||
if (linkedTab) {
|
||||
linkedTab.addEventListener("TabClose", this);
|
||||
}
|
||||
// Note:
|
||||
// nsPrompter.js or in e10s mode browser-parent.js call abortPrompt,
|
||||
// when the domWindow, for which the prompt was created, generates
|
||||
|
@ -191,7 +193,9 @@
|
|||
try {
|
||||
window.removeEventListener("resize", this);
|
||||
window.removeEventListener("unload", this);
|
||||
if (this.linkedTab) {
|
||||
this.linkedTab.removeEventListener("TabClose", this);
|
||||
}
|
||||
} catch (e) { }
|
||||
this.isLive = false;
|
||||
// invoke callback
|
||||
|
|
Загрузка…
Ссылка в новой задаче