Bug 1535444 - Update MozTogglePictureInPicture actor definition. r=Felipe
authorMike Conley <mconley@mozilla.com>
Thu, 14 Mar 2019 20:51:02 +0000
changeset 464071 afb5f4cea79143c6395c6a6e28faf9affdd43f33
parent 464070 87ea67b789a3fdea8a6b6aa134bb4abe740bc59c
child 464072 1d23b016870aef983893b745c7b76fd16c486a24
push id35707
push userrmaries@mozilla.com
push dateFri, 15 Mar 2019 03:42:43 +0000
treeherdermozilla-central@5ce27c44f79e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersFelipe
bugs1535444
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1535444 - Update MozTogglePictureInPicture actor definition. r=Felipe Differential Revision: https://phabricator.services.mozilla.com/D23579
toolkit/actors/PictureInPictureChild.jsm
toolkit/modules/ActorManagerParent.jsm
--- a/toolkit/actors/PictureInPictureChild.jsm
+++ b/toolkit/actors/PictureInPictureChild.jsm
@@ -9,17 +9,19 @@ var EXPORTED_SYMBOLS = ["PictureInPictur
 const {ActorChild} = ChromeUtils.import("resource://gre/modules/ActorChild.jsm");
 
 var gWeakVideo = null;
 
 class PictureInPictureChild extends ActorChild {
   handleEvent(event) {
     switch (event.type) {
       case "MozTogglePictureInPicture": {
-        this.togglePictureInPicture(event.target);
+        if (event.isTrusted) {
+          this.togglePictureInPicture(event.target);
+        }
         break;
       }
     }
   }
 
   togglePictureInPicture(video) {
     if (this.inPictureInPicture(video)) {
       this.closePictureInPicture(video);
--- a/toolkit/modules/ActorManagerParent.jsm
+++ b/toolkit/modules/ActorManagerParent.jsm
@@ -348,17 +348,17 @@ let ACTORS = {
   },
 };
 
 if (AppConstants.NIGHTLY_BUILD) {
   ACTORS.PictureInPicture = {
     child: {
       module: "resource://gre/actors/PictureInPictureChild.jsm",
       events: {
-        "MozTogglePictureInPicture": {capture: true, wantUntrusted: true},
+        "MozTogglePictureInPicture": {capture: true},
       },
 
       messages: [
         "PictureInPicture:SetupPlayer",
       ],
     },
   };
 }