mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1250288 - Add a pref for showing favicons in web notifications. r=MattN
MozReview-Commit-ID: 9hxv7Ts8L8u
This commit is contained in:
parent
a0d55ff986
commit
7b87747344
@ -4519,6 +4519,8 @@ pref("dom.webnotifications.serviceworker.enabled", true);
|
||||
|
||||
// Alert animation effect, name is disableSlidingEffect for backwards-compat.
|
||||
pref("alerts.disableSlidingEffect", false);
|
||||
// Show favicons in web notifications.
|
||||
pref("alerts.showFavicons", false);
|
||||
|
||||
// DOM full-screen API.
|
||||
pref("full-screen-api.enabled", false);
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
#include "mozilla/dom/ContentChild.h"
|
||||
#include "mozilla/dom/PermissionMessageUtils.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
#include "nsXULAppAPI.h"
|
||||
|
||||
@ -126,11 +127,14 @@ nsresult
|
||||
ShowWithBackend(nsIAlertsService* aBackend, nsIAlertNotification* aAlert,
|
||||
nsIObserver* aAlertListener)
|
||||
{
|
||||
nsresult rv = ShowWithIconBackend(aBackend, aAlert, aAlertListener);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
return rv;
|
||||
if (Preferences::GetBool("alerts.showFavicons")) {
|
||||
nsresult rv = ShowWithIconBackend(aBackend, aAlert, aAlertListener);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
// If the backend doesn't support favicons, show the alert without one.
|
||||
// If favicons are disabled, or the backend doesn't support them, show the
|
||||
// alert without one.
|
||||
return aBackend->ShowAlert(aAlert, aAlertListener);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user