mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1134409 - Make "Full Screen" context-menu command use messages instead of CPOWs. r=mconley.
This commit is contained in:
parent
72e15b5a25
commit
6ae3764aeb
@ -156,7 +156,7 @@
|
||||
<menuitem id="context-video-fullscreen"
|
||||
accesskey="&videoFullScreen.accesskey;"
|
||||
label="&videoFullScreen.label;"
|
||||
oncommand="gContextMenu.fullScreenVideo();"/>
|
||||
oncommand="gContextMenu.mediaCommand('fullscreen');"/>
|
||||
<menuitem id="context-leave-dom-fullscreen"
|
||||
accesskey="&leaveDOMFullScreen.accesskey;"
|
||||
label="&leaveDOMFullScreen.label;"
|
||||
|
@ -1097,5 +1097,9 @@ addMessageListener("ContextMenu:MediaCommand", (message) => {
|
||||
message.data.command == "showstats");
|
||||
media.dispatchEvent(event);
|
||||
break;
|
||||
case "fullscreen":
|
||||
if (content.document.mozFullScreenEnabled)
|
||||
media.mozRequestFullScreen();
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
@ -1078,12 +1078,6 @@ nsContextMenu.prototype = {
|
||||
mm.addMessageListener("ContextMenu:SaveVideoFrameAsImage:Result", onMessage);
|
||||
},
|
||||
|
||||
fullScreenVideo: function () {
|
||||
let video = this.target;
|
||||
if (document.mozFullScreenEnabled)
|
||||
video.mozRequestFullScreen();
|
||||
},
|
||||
|
||||
leaveDOMFullScreen: function() {
|
||||
document.mozCancelFullScreen();
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user