-
Mike Conley authored
Bug 1549442 - Make sure to hide the Picture-in-Picture toggle when the mouse cursor leaves the window. r=JSON_voorhees Originally, we were using the :hover pseudoclass to show the Picture-in-Picture toggle, and using the DevTools InspectorUtils module to manually apply that :hover pseudoclass in PictureInPictureToggleChild in the event that the <video> element wasn't able to get the :hover element "naturally". Removing this pseudoclass when the mouse leaves the browser window (without first leaving the toggle) doesn't work, since the mouseout event (which we use to detect the mouse leaving the window) fires _after_ :hover states would normally be cleared, so it's too late to "unlock" it. The solution ended up being replacing the :hover pseudoclass with a .hovering class that PictureInPictureToggleChild continues to manage on its own. Differential Revision: https://phabricator.services.mozilla.com/D47677 --HG-- extra : moz-landing-system : lando
5794ef14