This reverts commit 40c8cb96f7.
Revert "Bug 1963712 - Allow GIF images in Windows Toast Notifications, r=nrishel,win-reviewers,saschanaz,omc-reviewers,aminomancer"
This reverts commit 4cd7bc1434.
After the changes for https://bugzilla.mozilla.org/show_bug.cgi?id=1931246 and https://bugzilla.mozilla.org/show_bug.cgi?id=2016419, there is still a case where Firefox reacts to toast notification clicks in an unexpected way. If the user's profile has the pref alerts.useSystemBackend.windows.notificationserver.enabled set to false, it was expected that the Windows 8 style callback would handle the callback, so notificationserver should just return success.
With the change for https://bugzilla.mozilla.org/show_bug.cgi?id=1931246, a request to launch firefox without recognized args is treated as just a generic "start the app" request, which broke the assumptions of the Windows 8 style callback case.
This change restores the behavior for the particular case where it looks like the toast notification was created by a Mozilla app with this setting.
Differential Revision: https://phabricator.services.mozilla.com/D284175
After the changes for https://bugzilla.mozilla.org/show_bug.cgi?id=1931246 and https://bugzilla.mozilla.org/show_bug.cgi?id=2016419, there is still a case where Firefox reacts to toast notification clicks in an unexpected way. If the user's profile has the pref alerts.useSystemBackend.windows.notificationserver.enabled set to false, it was expected that the Windows 8 style callback would handle the callback, so notificationserver should just return success.
With the change for https://bugzilla.mozilla.org/show_bug.cgi?id=1931246, a request to launch firefox without recognized args is treated as just a generic "start the app" request, which broke the assumptions of the Windows 8 style callback case.
This change restores the behavior for the particular case where it looks like the toast notification was created by a Mozilla app with this setting.
Differential Revision: https://phabricator.services.mozilla.com/D284175
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.
In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.
One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.
Most of the heavy lifting was done through:
$ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
$ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'
Differential Revision: https://phabricator.services.mozilla.com/D268706
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.
In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.
One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.
Most of the heavy lifting was done through:
$ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
$ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'
Differential Revision: https://phabricator.services.mozilla.com/D268706
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.
In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.
One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.
Most of the heavy lifting was done through:
$ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
$ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'
Differential Revision: https://phabricator.services.mozilla.com/D268706
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.
In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.
One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.
Most of the heavy lifting was done through:
$ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
$ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'
Differential Revision: https://phabricator.services.mozilla.com/D268706
Destructing a handler doesn't always mean the corresponding notification is dead.
Given this patch is making RemoveHandler not call SendFinishing, it's being added to a few functions where needed.
Differential Revision: https://phabricator.services.mozilla.com/D202330
Destructing a handler doesn't always mean the corresponding notification is dead.
Given this patch is making RemoveHandler not call SendFinishing, it's being added to a few functions where needed.
Differential Revision: https://phabricator.services.mozilla.com/D202330
Destructing a handler doesn't always mean the corresponding notification is dead.
Given this patch is making RemoveHandler not call SendFinishing, it's being added to a few functions where needed.
Differential Revision: https://phabricator.services.mozilla.com/D202330
Also tweaks the action list a bit:
1. Now this puts the non-default actions first. It aligns better to Chrome behavior and in general I expect users to interact with non-default actions than default ones (which are snooze/settings).
2. This changes how hasActionButton is set; previously it was set to YES when actions exist, now it's set to YES when actions *does not* exist. The reason here is that hasActionButton=YES means macOS will add a default action button (that triggers NSUserNotificationActivationTypeActionButtonClicked), and having it only makes the action list clunky when other actions exist.
3. This stops setting otherActionTitle, as setting it only adds a default close action button. Not having it aligns better to Safari/Chrome and makes the action list less clunky.
Differential Revision: https://phabricator.services.mozilla.com/D240936
This would allow more conservative approach as we'll be able to reuse existing topics.
* alertactioncallback is now removed and instead fires alertclickcallback with a non-null subject.
* alerterror is now removed as observing alertshow/alertfinished together should suffice for that purpose (already being used by PNotification)
Not having separate alertactioncallback would also simplify future web API work, as it'll use the same click event but with an extra member in the event object. (https://notifications.spec.whatwg.org/#ref-for-dom-notificationevent-action)
Differential Revision: https://phabricator.services.mozilla.com/D239176
* The existing InitWindowsTag implementation is merged with ComputeAlertName into AlertNotification::InitId.
* NotificationStorage and NotificationDB now solely uses this new ID.
* Notification Web API stops generating ID for new notifications and let NotificationParent get ID from AlertNotification.
* Modified existing mochitests which were depending on the previous alertName format for web notifications (as it was always intended to be implementation detail).
* Intentionally let nsIAlertsService backends to keep using GetAlertName because changing all of them at once felt scary 😬 (especially given it has callers outside mozilla-central). It can be a follow-up.
Differential Revision: https://phabricator.services.mozilla.com/D236354
Per the documentation the system should handle `arguments=dismiss` to fire dismiss event but somehow it still fires activate event. This patch thus handles it manually while still taking advantage of the Windows provided localization of the button.
Differential Revision: https://phabricator.services.mozilla.com/D198286
Per the documentation the system should handle `arguments=dismiss` to fire dismiss event but somehow it still fires activate event. This patch thus handles it manually.
Differential Revision: https://phabricator.services.mozilla.com/D198286
This prevents a failed debug assertion in the image decoder due to color management attempting to initialize off the main thread. This is only an issue for debug builds, release builds instead return an error in color management initialization and otherwise continue on to decode the image correctly.
Differential Revision: https://phabricator.services.mozilla.com/D197028
When `nsIWindowsAlertNotification`'s `handleActions` property is set to true, actions are sent in the notification observer's `aData` field instead of the notification cookie.
Differential Revision: https://phabricator.services.mozilla.com/D196613