mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 04:45:45 +00:00
Bug 952934 - Use onFrameTreeReset() to re-collect docShell capability data r=smacleod
From b3a6d0ab445df9e336b969f230c1394f457dd91c Mon Sep 17 00:00:00 2001
This commit is contained in:
parent
a481c0db46
commit
b2502c0e27
@ -301,18 +301,13 @@ let DocShellCapabilitiesListener = {
|
||||
_latestCapabilities: "",
|
||||
|
||||
init: function () {
|
||||
let webProgress = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIWebProgress);
|
||||
|
||||
webProgress.addProgressListener(this, Ci.nsIWebProgress.NOTIFY_LOCATION);
|
||||
gFrameTree.addObserver(this);
|
||||
},
|
||||
|
||||
/**
|
||||
* onLocationChange() is called as soon as we start loading a page after
|
||||
* we are certain that there's nothing blocking the load (e.g. a content
|
||||
* policy added by AdBlock or the like).
|
||||
* onFrameTreeReset() is called as soon as we start loading a page.
|
||||
*/
|
||||
onLocationChange: function() {
|
||||
onFrameTreeReset: function() {
|
||||
// The order of docShell capabilities cannot change while we're running
|
||||
// so calling join() without sorting before is totally sufficient.
|
||||
let caps = DocShellCapabilities.collect(docShell).join(",");
|
||||
@ -322,15 +317,7 @@ let DocShellCapabilitiesListener = {
|
||||
this._latestCapabilities = caps;
|
||||
MessageQueue.push("disallow", () => caps || null);
|
||||
}
|
||||
},
|
||||
|
||||
onStateChange: function () {},
|
||||
onProgressChange: function () {},
|
||||
onStatusChange: function () {},
|
||||
onSecurityChange: function () {},
|
||||
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener,
|
||||
Ci.nsISupportsWeakReference])
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user