Bug 1696418 - Don't highlight the default action for more permission panels when Proton is enabled. r=sfoster

Differential Revision: https://phabricator.services.mozilla.com/D107505
This commit is contained in:
Mike Conley 2021-03-09 03:06:51 +00:00
Родитель 869570bb3e
Коммит 389534e150
4 изменённых файлов: 37 добавлений и 0 удалений

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

@ -28,6 +28,13 @@ XPCOMUtils.defineLazyGetter(this, "gFluentStrings", function() {
return new Localization(["branding/brand.ftl", "browser/browser.ftl"], true);
});
XPCOMUtils.defineLazyPreferenceGetter(
this,
"gProtonDoorhangersEnabled",
"browser.proton.doorhangers.enabled",
false
);
class EncryptedMediaParent extends JSWindowActorParent {
isUiEnabled() {
return Services.prefs.getBoolPref("browser.eme.ui.enabled");
@ -239,6 +246,7 @@ class EncryptedMediaParent extends JSWindowActorParent {
aBrowser.ownerGlobal.openPreferences("general-drm");
},
dismiss: true,
disableHighlight: gProtonDoorhangersEnabled,
};
let secondaryActions = [

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

@ -1243,6 +1243,10 @@ function prompt(aActor, aBrowser, aRequest) {
);
}
if (gProtonDoorhangersEnabled) {
mainAction.disableHighlight = true;
}
notification = chromeDoc.defaultView.PopupNotifications.show(
aBrowser,
"webRTC-shareDevices",

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

@ -602,6 +602,14 @@ XPCOMUtils.defineLazyPreferenceGetter(
false
);
/* Temporary pref while the Proton doorhangers work stablizes. */
XPCOMUtils.defineLazyPreferenceGetter(
this,
"gProtonDoorhangers",
"browser.proton.doorhangers.enabled",
false
);
/* Import aboutWelcomeFeature from Nimbus Experiment API
to access experiment values */
XPCOMUtils.defineLazyGetter(this, "aboutWelcomeFeature", () => {
@ -7538,6 +7546,7 @@ var IndexedDBPromptHelper = {
Ci.nsIPermissionManager.ALLOW_ACTION
);
},
disableHighlight: gProtonDoorhangers,
};
var secondaryActions = [
@ -7636,6 +7645,7 @@ var CanvasPermissionPromptHelper = {
state && state.checkboxChecked
);
},
disableHighlight: gProtonDoorhangers,
};
let secondaryActions = [
@ -7800,6 +7810,10 @@ var WebAuthnPromptHelper = {
}
};
if (gProtonDoorhangers) {
mainAction.disableHighlight = true;
}
this._tid = tid;
this._current = PopupNotifications.show(
gBrowser.selectedBrowser,

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

@ -31,6 +31,13 @@ XPCOMUtils.defineLazyGetter(this, "strBundle", () => {
);
});
XPCOMUtils.defineLazyPreferenceGetter(
this,
"gProtonDoorhangersEnabled",
"browser.proton.doorhangers.enabled",
false
);
const LoginInfo = Components.Constructor(
"@mozilla.org/login-manager/loginInfo;1",
"nsILoginInfo",
@ -772,6 +779,10 @@ class LoginManagerPrompter {
showOptions
);
if (gProtonDoorhangersEnabled) {
mainAction.disableHighlight = true;
}
let notification = PopupNotifications.show(
browser,
notificationID,