Skip to content

Commit

Permalink
Bug 1531101 - When the PictureInPicture window closes, stop cloning i…
Browse files Browse the repository at this point in the history
…mmediately to update the original video UAWidget. r=Felipe

Differential Revision: https://phabricator.services.mozilla.com/D22165
  • Loading branch information
mikeconley committed Mar 13, 2019
1 parent 01bf415 commit d4cbc7c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions toolkit/actors/PictureInPictureChild.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ class PictureInPictureChild extends ActorChild {
}, { once: true });

this.content.addEventListener("unload", () => {
let video = gWeakVideo && gWeakVideo.get();
if (video) {
video.stopCloningElementVisually();
}
gWeakVideo = null;
}, { once: true });
}
Expand Down

0 comments on commit d4cbc7c

Please sign in to comment.