From 1d18a1e8ef5aba0458576f6974f844afd6f2c8f6 Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Thu, 26 Apr 2018 17:12:33 +0200 Subject: [follow up] Bug 1216684 - Notification permissions ... in private windows - implemented "_getBrowserForRequest" function (e10 off only) --- application/palemoon/components/nsBrowserGlue.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'application') diff --git a/application/palemoon/components/nsBrowserGlue.js b/application/palemoon/components/nsBrowserGlue.js index 543698c3e..6563df4e6 100644 --- a/application/palemoon/components/nsBrowserGlue.js +++ b/application/palemoon/components/nsBrowserGlue.js @@ -1689,6 +1689,16 @@ ContentPermissionPrompt.prototype = { return chromeWin; }, + _getBrowserForRequest: function (aRequest) { + let requestingWindow = aRequest.window.top; + // find the requesting browser or iframe + let browser = requestingWindow.QueryInterface(Ci.nsIInterfaceRequestor) + .getInterface(Ci.nsIWebNavigation) + .QueryInterface(Ci.nsIDocShell) + .chromeEventHandler; + return browser; + }, + /** * Show a permission prompt. * -- cgit v1.2.3