зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1599529 - Use JSWindowActor message for Picture-in-Picture keyboard shortcut, and enable shortcut for Linux GTK. r=mstriemer
Differential Revision: https://phabricator.services.mozilla.com/D54786 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
5a7c036fa2
Коммит
a0cc4d0fe9
|
@ -213,7 +213,7 @@
|
|||
<key id="key_toggleReaderMode" keycode="&toggleReaderMode.win.keycode;" command="View:ReaderView" disabled="true"/>
|
||||
#endif
|
||||
|
||||
#ifdef XP_WIN
|
||||
#ifndef XP_MACOSX
|
||||
<key id="key_togglePictureInPicture" key="&togglePictureInPicture.key;" command="View:PictureInPicture" modifiers="accel,shift"/>
|
||||
<key key="&togglePictureInPicture.key2;" command="View:PictureInPicture" modifiers="accel,shift"/>
|
||||
#endif
|
||||
|
|
|
@ -149,7 +149,10 @@ var PictureInPicture = {
|
|||
onCommand(event) {
|
||||
let win = event.target.ownerGlobal;
|
||||
let browser = win.gBrowser.selectedBrowser;
|
||||
browser.messageManager.sendAsyncMessage("PictureInPicture:KeyToggle");
|
||||
let actor = browser.browsingContext.currentWindowGlobal.getActor(
|
||||
"PictureInPicture"
|
||||
);
|
||||
actor.sendAsyncMessage("PictureInPicture:KeyToggle");
|
||||
},
|
||||
|
||||
async focusTabAndClosePip() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче