Fix remote resource blocking with shared processes
Now that a shared WebKitUserContentManager is shared between web views, the old "load a JS file when remote resource loading is allowed" doesn't work any more. Instead, set a variable on the frame's window object in the web extension notified that a new page has been loaded, and use that instead.
This commit is contained in:
parent
1a391758fa
commit
6c57839ddf
5 changed files with 26 additions and 44 deletions
|
|
@ -14,7 +14,6 @@ let PageState = function() {
|
|||
};
|
||||
PageState.prototype = {
|
||||
init: function() {
|
||||
this.allowRemoteImages = false;
|
||||
this.isLoaded = false;
|
||||
this.undoEnabled = false;
|
||||
this.redoEnabled = false;
|
||||
|
|
@ -108,7 +107,7 @@ PageState.prototype = {
|
|||
window.webkit.messageHandlers.contentLoaded.postMessage(null);
|
||||
},
|
||||
loadRemoteImages: function() {
|
||||
this.allowRemoteImages = true;
|
||||
window._gearyAllowRemoteResourceLoads = true;
|
||||
let images = document.getElementsByTagName("IMG");
|
||||
for (let i = 0; i < images.length; i++) {
|
||||
let img = images.item(i);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue