зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1441810 - Ensure session save/restore works even if no ContentDelegate is set. r=jchen
This commit is contained in:
Родитель
f9c00d1336
Коммит
d9f21c82b4
|
@ -41,11 +41,6 @@ class GeckoViewContent extends GeckoViewContentModule {
|
|||
this);
|
||||
this.messageManager.addMessageListener("GeckoView:ZoomToInput",
|
||||
this);
|
||||
|
||||
this.progressFilter =
|
||||
Cc["@mozilla.org/appshell/component/browser-status-filter;1"]
|
||||
.createInstance(Ci.nsIWebProgress);
|
||||
this.flags = Ci.nsIWebProgress.NOTIFY_LOCATION;
|
||||
}
|
||||
|
||||
onDisable() {
|
||||
|
@ -206,6 +201,13 @@ class GeckoViewContent extends GeckoViewContentModule {
|
|||
addEventListener("load", this, {capture: true, mozSystemGroup: true, once: true});
|
||||
addEventListener("pageshow", this, {capture: true, mozSystemGroup: true, once: true});
|
||||
|
||||
if (!this.progressFilter) {
|
||||
this.progressFilter =
|
||||
Cc["@mozilla.org/appshell/component/browser-status-filter;1"]
|
||||
.createInstance(Ci.nsIWebProgress);
|
||||
this.flags = Ci.nsIWebProgress.NOTIFY_LOCATION;
|
||||
}
|
||||
|
||||
this.progressFilter.addProgressListener(this, this.flags);
|
||||
let webProgress = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIWebProgress);
|
||||
|
|
|
@ -16,6 +16,8 @@ class GeckoViewContent extends GeckoViewModule {
|
|||
"GeckoView:SaveState",
|
||||
"GeckoView:RestoreState"
|
||||
]);
|
||||
|
||||
this.messageManager.addMessageListener("GeckoView:SaveStateFinish", this);
|
||||
}
|
||||
|
||||
onEnable() {
|
||||
|
@ -33,7 +35,6 @@ class GeckoViewContent extends GeckoViewModule {
|
|||
|
||||
this.messageManager.addMessageListener("GeckoView:DOMFullscreenExit", this);
|
||||
this.messageManager.addMessageListener("GeckoView:DOMFullscreenRequest", this);
|
||||
this.messageManager.addMessageListener("GeckoView:SaveStateFinish", this);
|
||||
}
|
||||
|
||||
onDisable() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче