mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 737100 - Extend Pointer Lock (Mouse Lock) for non-fullscreen elements, use capture phase for event listener, and add listener to browser
This commit is contained in:
parent
b83c5a57ac
commit
7d32334c6e
@ -1647,7 +1647,6 @@ ContentPermissionPrompt.prototype = {
|
||||
var browserBundle = Services.strings.createBundle("chrome://browser/locale/browser.properties");
|
||||
|
||||
var requestingWindow = aRequest.window.top;
|
||||
var topDoc = requestingWindow.document;
|
||||
var chromeWin = this._getChromeWindow(requestingWindow).wrappedJSObject;
|
||||
var browser = chromeWin.gBrowser.getBrowserForDocument(requestingWindow.document);
|
||||
var requestPrincipal = aRequest.principal;
|
||||
@ -1701,7 +1700,7 @@ ContentPermissionPrompt.prototype = {
|
||||
options = { removeOnDismissal: autoAllow,
|
||||
eventCallback: function (type) {
|
||||
if (type == "removed") {
|
||||
topDoc.removeEventListener("mozfullscreenchange", onFullScreen);
|
||||
browser.removeEventListener("mozfullscreenchange", onFullScreen, true);
|
||||
if (autoAllow)
|
||||
aRequest.allow();
|
||||
}
|
||||
@ -1716,7 +1715,7 @@ ContentPermissionPrompt.prototype = {
|
||||
// upon exit), so if the page enters fullscreen mode after requesting
|
||||
// pointerLock (but before the user has granted permission), we should
|
||||
// remove the now-impotent notification.
|
||||
topDoc.addEventListener("mozfullscreenchange", onFullScreen);
|
||||
browser.addEventListener("mozfullscreenchange", onFullScreen, true);
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user