Bug 1664899 - Set the Picture-in-Picture toggle to Mode 2 by default. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D90157
This commit is contained in:
Mike Conley 2020-09-14 21:12:33 +00:00
Родитель 721a77e759
Коммит c45bb3b77f
4 изменённых файлов: 12 добавлений и 10 удалений

Просмотреть файл

@ -422,7 +422,7 @@ pref("media.videocontrols.picture-in-picture.enabled", false);
pref("media.videocontrols.picture-in-picture.video-toggle.enabled", false);
pref("media.videocontrols.picture-in-picture.video-toggle.always-show", false);
pref("media.videocontrols.picture-in-picture.video-toggle.min-video-secs", 45);
pref("media.videocontrols.picture-in-picture.video-toggle.mode", -1);
pref("media.videocontrols.picture-in-picture.video-toggle.mode", 2);
pref("media.videocontrols.picture-in-picture.video-toggle.position", "right");
pref("media.videocontrols.picture-in-picture.video-toggle.has-used", false);

Просмотреть файл

@ -20,6 +20,7 @@ prefs =
media.videocontrols.picture-in-picture.video-toggle.enabled=true
media.videocontrols.picture-in-picture.video-toggle.testing=true
media.videocontrols.picture-in-picture.video-toggle.always-show=true
media.videocontrols.picture-in-picture.video-toggle.has-used=true
[browser_cannotTriggerFromContent.js]
[browser_contextMenu.js]
@ -53,7 +54,7 @@ skip-if = true # Bug 1546455
[browser_toggleOpaqueOverlay.js]
skip-if = true # Bug 1546455
[browser_togglePointerEventsNone.js]
skip-if = os == 'linux' # Bug 1628777
skip-if = true # Bug 1664920, Bug 1628777
[browser_togglePolicies.js]
skip-if = os == "linux" && bits == 64 # Bug 1605565
[browser_toggleSimple.js]

Просмотреть файл

@ -47,9 +47,9 @@ add_task(async () => {
// The toggle center, because of how it slides out, is actually outside
// of the bounds of a click event. For now, we move the mouse in by a
// hard-coded 2 pixels along the x and y axis to achieve the hover.
let toggleLeft = toggleClientRect.left + 2;
let toggleTop = toggleClientRect.top + 2;
// hard-coded 15 pixels along the x and y axis to achieve the hover.
let toggleLeft = toggleClientRect.left + 15;
let toggleTop = toggleClientRect.top + 15;
info(
"Clicking on toggle, and expecting a Picture-in-Picture window to open"

Просмотреть файл

@ -60,19 +60,20 @@ const HAS_USED_PREF =
* toggle.
*/
const DEFAULT_TOGGLE_STYLES = {
rootID: "pictureInPictureToggleButton",
rootID: "pictureInPictureToggleExperiment",
stages: {
hoverVideo: {
opacities: {
"#pictureInPictureToggleButton": 0.8,
".pip-wrapper": 0.8,
},
hidden: ["#pictureInPictureToggleExperiment"],
hidden: ["#pictureInPictureToggleButton", ".pip-expanded"],
},
hoverToggle: {
opacities: {
"#pictureInPictureToggleButton": 1.0,
".pip-wrapper": 1.0,
},
hidden: ["#pictureInPictureToggleExperiment"],
hidden: ["#pictureInPictureToggleButton", ".pip-expanded"],
},
},
};