Commit graph

483 commits

Author SHA1 Message Date
Iulian Moraru
d07f446854 Backed out 2 changesets (bug 1789390) for causing bc failures regarding unreferenced file on BackgroundTask_uninstall.jsm. CLOSED TREE
Backed out changeset 4cec525d92f4 (bug 1789390)
Backed out changeset 6fcec3502cb2 (bug 1789390)
2022-09-13 13:20:20 +03:00
Nicholas Rishel
f203d491e0 Bug 1789390 - Remove scheduled and Action Center notifications during uninstall. r=nalexander
Non-MSIX notifications are not removed when Firefox is uninstalled. To handled this we've added a new `uninstall` background task and extended `nsIWindowsAlertService` to deregister notifications on uninstall.

Differential Revision: https://phabricator.services.mozilla.com/D156625
2022-09-13 06:09:30 +00:00
Nicholas Rishel
eb7902be5c Bug 1789390 - Pre: Comment cleanup. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D157180
2022-09-13 06:09:30 +00:00
Nick Alexander
ae5109c174 Bug 1788960 - Part 1: Round trip name for privileged alerts through Firefox restart. r=nrishel
On Windows, when an alert is privileged and `name` is non-empty, round
trip its `name` (as `privilegedName`) through the Windows notification
mechanism, and provide it to the "relaunch" callback.

Differential Revision: https://phabricator.services.mozilla.com/D156636
2022-09-13 02:43:17 +00:00
Nick Alexander
f7cb13e745 Bug 1781929 - Part 4: Pass through or launch Firefox from notification server. r=nrishel
When the notification server callback is executed by the Windows
notification system, it invokes Firefox with additional command line
parameters, most importantly the Windows-specific notification
"Windows tag".

If no appropriate Firefox is running, the command line will be
processed, the provided Windows tag will be inspected (and seen to not
be registered with this running Firefox instance) and a "launch URL"
stored as part of the Windows notification itself opened (if one is
provided).

If an appropriate Firefox is running, the remoting protocol will
forward this command line to the running instance.  If the instance
recognizes the provided `--notification-windowsTag`, the command line
will be ignored.  When the notification server exits, Windows will
fallback to the Windows 8.1 style notification callbacks registered
for this Windows tag and the existing (non notification server)
behaviour will occur.

In fact, the server therefore waits for a Windows tag-specific system
event to be signalled by the invoked Firefox (or a sibling process).
If we were to return `S_OK` from the notification server immediately,
and a running Firefox process would handle the notification via
Windows 8.1-style notification callbacks, then Windows would fall back
to those callbacks.  The invoked callbacks unregister themselves upon
completion, often before the launched Firefox has an opportunity to
process the command line.  By waiting for this system event, we allow
the invoked Firefox to process the command line while its own
notification callbacks are registered and therefore recognize that its
callbacks will handle the notification.

Differential Revision: https://phabricator.services.mozilla.com/D154468
2022-09-03 22:49:02 +00:00
Nicholas Rishel
b1c91cad45 Bug 1784367 - Prevent duplicate Windows notifications from occuring due to multiple tabs receiving same notification. r=nalexander
Use the existing mName field of alert which includes the host port and tag (or uuid) for Windows notification tag.

When a notification originates from the browser chrome, generate an identify on the fly as before.

The tag is hashed in order to fit the 16 character limit for tags. Note the limit was bumped to 64 in Windows 10 Creators Update.

Differential Revision: https://phabricator.services.mozilla.com/D155140
2022-09-03 22:49:00 +00:00
Marian-Vasile Laza
08d282ce78 Backed out 5 changesets (bug 1781929, bug 1784367) for causing bc test failures. CLOSED TREE
Backed out changeset 34003f6f7b27 (bug 1781929)
Backed out changeset 8e6fe1c18e8d (bug 1781929)
Backed out changeset e50432e37751 (bug 1781929)
Backed out changeset abf6eff708d8 (bug 1781929)
Backed out changeset 15fec49b7587 (bug 1784367)
2022-09-03 02:26:04 +03:00
Nick Alexander
7ad3c38071 Bug 1781929 - Part 4: Pass through or launch Firefox from notification server. r=nrishel
When the notification server callback is executed by the Windows
notification system, it invokes Firefox with additional command line
parameters, most importantly the Windows-specific notification
"Windows tag".

If no appropriate Firefox is running, the command line will be
processed, the provided Windows tag will be inspected (and seen to not
be registered with this running Firefox instance) and a "launch URL"
stored as part of the Windows notification itself opened (if one is
provided).

If an appropriate Firefox is running, the remoting protocol will
forward this command line to the running instance.  If the instance
recognizes the provided `--notification-windowsTag`, the command line
will be ignored.  When the notification server exits, Windows will
fallback to the Windows 8.1 style notification callbacks registered
for this Windows tag and the existing (non notification server)
behaviour will occur.

In fact, the server therefore waits for a Windows tag-specific system
event to be signalled by the invoked Firefox (or a sibling process).
If we were to return `S_OK` from the notification server immediately,
and a running Firefox process would handle the notification via
Windows 8.1-style notification callbacks, then Windows would fall back
to those callbacks.  The invoked callbacks unregister themselves upon
completion, often before the launched Firefox has an opportunity to
process the command line.  By waiting for this system event, we allow
the invoked Firefox to process the command line while its own
notification callbacks are registered and therefore recognize that its
callbacks will handle the notification.

Differential Revision: https://phabricator.services.mozilla.com/D154468
2022-09-02 20:22:51 +00:00
Nicholas Rishel
d7f6839d2f Bug 1784367 - Prevent duplicate Windows notifications from occuring due to multiple tabs receiving same notification. r=nalexander
Use the existing mName field of alert which includes the host port and tag (or uuid) for Windows notification tag.

When a notification originates from the browser chrome, generate an identify on the fly as before.

The tag is hashed in order to fit the 16 character limit for tags. Note the limit was bumped to 64 in Windows 10 Creators Update.

Differential Revision: https://phabricator.services.mozilla.com/D155140
2022-09-02 20:22:49 +00:00
Nick Alexander
e08bbee6eb Bug 1787956 - Add nsIAlertNotification.launchURL. r=smaug
`launchURL` captures the URL that triggered the alert, if it comes
from a DOM notification.  If Firefox is launched when not already
running to handle an alert, it will navigate to this URL.

This URL can be set, and chrome privileged alerts can use this to
launch Firefox to a specific URL when it is launched.  Toast
notifications popped by background tasks will use this to re-engage
Firefox users to a campaign-specific URL.

This functionality will be tested in the Windows-specific tests
accompanying Bug 1781929.

Differential Revision: https://phabricator.services.mozilla.com/D155907
2022-09-01 22:48:21 +00:00
Nick Alexander
174303a612 Bug 1787573 - Allow privileged Windows native notification actions to have activationType="system". r=nrishel,smaug
This allows Windows native notification action buttons to access the
built-in "dismiss" and "snooze" support without requiring a Firefox
invocation.

Differential Revision: https://phabricator.services.mozilla.com/D155906
2022-09-01 22:48:21 +00:00
Eemeli Aro
28bccea7aa Bug 1771752 - Migrate notification alert DTD strings to Fluent. r=fluent-reviewers,flod,jaws
The alert.properties file is not migrated here, as its contents are
also used by OS-specific alert notifications:
- widget/cocoa/OSXNotificationCenter.mm
- widget/windows/ToastNotificationHandler.cpp

Differential Revision: https://phabricator.services.mozilla.com/D154380
2022-08-16 16:24:23 +00:00
Christian Holler
146a80ecff Bug 1783844 - Remove IPC::Principal type remains from codebase. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D154091
2022-08-10 13:39:11 +00:00
Mark Banner
7428be4a86 Bug 1782008 - Remove now unnecessary .eslintrc.js files. r=webcompat-reviewers,extension-reviewers,media-playback-reviewers,pip-reviewers,denschub,rpl,alwu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D152736
2022-08-03 11:16:20 +00:00
Tooru Fujisawa
a032f53a63 Bug 1780543 - Part 5: Add mozilla/chrome-script environment. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D152430
2022-07-26 02:46:30 +00:00
Nick Alexander
81d66e3c24 Bug 1775136 - Part 2: Support requireInteraction and actions in alert service and native Windows notifications. r=mhowell,smaug
1.  `requireInteraction` already existed, but it doesn't do anything.
    This patch makes it mean `scenario="reminder"` in the Windows
    Toast notification schema: see
    https://docs.microsoft.com/en-us/uwp/schemas/tiles/toastschema/element-toast.

2.  `actions` is intended to eventually support the Chrome-only
    extension to the Web Notifications API: see
    https://developer.mozilla.org/en-US/docs/Web/API/Notification/actions.

3.  We run into an `xpconnect` limit on the number of supported
    parameters.  Rather than bump the limit, which has global
    consequence, I added a second `init*` method.  The existing
    abstraction is horrible, but I can't rework it within my
    timelines.  Should we choose to invest, we might migrate to WebIDL
    so that we can sensibly use options objects.

Differential Revision: https://phabricator.services.mozilla.com/D150667
2022-07-12 03:18:42 +00:00
Nick Alexander
f8bca9ddeb Bug 1775136 - Part 1: Add nsIWindowsAlertService to enable testing. r=mhowell
This also provides an entry point for Windows-specific styling of
alerts, should specific consumers want one: e.g.,
`nsIWindowsAlertsService.showWindowsAlert(...)` allowing to configure
the toast template, for example.

Differential Revision: https://phabricator.services.mozilla.com/D151187
2022-07-12 03:18:41 +00:00
Butkovits Atila
bf8e6bd398 Backed out 2 changesets (bug 1775136) for causing failures at test_windows_alert_service.js
Backed out changeset bfa523daaf13 (bug 1775136)
Backed out changeset 5e75e93d9ba3 (bug 1775136)
2022-07-12 04:35:51 +03:00
Nick Alexander
ef2284fee4 Bug 1775136 - Part 2: Support requireInteraction and actions in alert service and native Windows notifications. r=mhowell,smaug
1.  `requireInteraction` already existed, but it doesn't do anything.
    This patch makes it mean `scenario="reminder"` in the Windows
    Toast notification schema: see
    https://docs.microsoft.com/en-us/uwp/schemas/tiles/toastschema/element-toast.

2.  `actions` is intended to eventually support the Chrome-only
    extension to the Web Notifications API: see
    https://developer.mozilla.org/en-US/docs/Web/API/Notification/actions.

3.  We run into an `xpconnect` limit on the number of supported
    parameters.  Rather than bump the limit, which has global
    consequence, I added a second `init*` method.  The existing
    abstraction is horrible, but I can't rework it within my
    timelines.  Should we choose to invest, we might migrate to WebIDL
    so that we can sensibly use options objects.

Differential Revision: https://phabricator.services.mozilla.com/D150667
2022-07-11 23:23:53 +00:00
Nick Alexander
986e5f08fe Bug 1775136 - Part 1: Add nsIWindowsAlertService to enable testing. r=mhowell
This also provides an entry point for Windows-specific styling of
alerts, should specific consumers want one: e.g.,
`nsIWindowsAlertsService.showWindowsAlert(...)` allowing to configure
the toast template, for example.

Differential Revision: https://phabricator.services.mozilla.com/D151187
2022-07-11 23:23:53 +00:00
Tooru Fujisawa
52c95734e7 Bug 1667455 - Part 9: Stop importing Services.jsm from chrome-priv HTML code, single-line cases. r=kmag,necko-reviewers,geckoview-reviewers,extension-reviewers,m_kato,dragana
Differential Revision: https://phabricator.services.mozilla.com/D150898
2022-07-11 12:41:52 +00:00
Tooru Fujisawa
bf93d07148 Bug 1667455 - Part 5: Stop importing Services.jsm from chrome-priv JS code, top-level single-line cases. r=kmag,webdriver-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,extension-reviewers,application-update-reviewers,pip-reviewers,twisniewski,m_kato,jdescottes,mconley,AlexandruIonescu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D150894
2022-07-11 12:41:50 +00:00
Mark Banner
3ff024cf6e Bug 1768175 - Clean up some unnecessary global definitions (location, sizeToContent) for ESLint. r=Gijs
The 'location: true' addition has filtered down to ESLint a while ago, so we no longer need to define it ourselves.
sizeToContent can be used from the window object directly.

Differential Revision: https://phabricator.services.mozilla.com/D145720
2022-05-09 10:15:34 +00:00
Nika Layzell
05dc5e0d76 Bug 1754037 - Part 3c: Automatically update all ParamTraits implementations, r=ipc-reviewers,media-playback-reviewers,bryce,mccr8
Automatically generated rewrites of all ParamTraits and IPDLParamTraits
implementations in-tree to use IPC::Message{Reader,Writer}.

Differential Revision: https://phabricator.services.mozilla.com/D140004
2022-03-04 15:39:41 +00:00
Evgenia Kotovich
0d0980ee0d Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D128482
2021-10-18 09:26:33 +00:00
Noemi Erli
2bba3cec69 Backed out changeset 2ab6bb03dcc1 (bug 1576768) for causing failures in test_double_submit.html CLOSED TREE 2021-10-18 02:05:57 +03:00
Evgenia Kotovich
3e3dff109c Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D128482
2021-10-17 14:59:14 +00:00
Alexandru Michis
dac6815201 Backed out changeset 7c08aa027893 (bug 1576768) for causing multiple failures.
CLOSED TREE
2021-10-15 16:52:43 +03:00
Evgenia Kotovich
a8b32926fa Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D128482
2021-10-15 12:58:11 +00:00
Andi-Bogdan Postelnicu
2fc4f70e9b Bug 1725145 - Preparation for the hybrid build env. r=necko-reviewers,firefox-build-system-reviewers,valentin,glandium
Automatically generated path that adds flag `REQUIRES_UNIFIED_BUILD = True` to `moz.build`
when the module governed by the build config file is not buildable outside on the unified environment.

This needs to be done in order to have a hybrid build system that adds the possibility of combing
unified build components with ones that are built outside of the unified eco system.

Differential Revision: https://phabricator.services.mozilla.com/D122345
2021-08-25 10:46:17 +00:00
Andi-Bogdan Postelnicu
2508edc4c5 Bug 1519636 - Reformat recent changes to the Google coding style. r=necko-reviewers,geckoview-reviewers,agi
Updated with clang-format version 11.0.1 (taskcluster-GI8pmG3eQ_OSXfjFfr2yFw)

\# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D113294
2021-04-26 15:52:25 +00:00
Agi Sferro
f8a731e34e Bug 1696145 - Support Notification.silent and .vibrate on Android. r=smaug,droeh,aklotz
Differential Revision: https://phabricator.services.mozilla.com/D111924
2021-04-20 18:35:36 +00:00
Csoregi Natalia
cd658de8c3 Backed out 2 changesets (bug 1696145) for causing build bustage on notifications. CLOSED TREE
Backed out changeset 2e18b65dd133 (bug 1696145)
Backed out changeset 6d302afe732f (bug 1696145)
2021-04-20 20:13:56 +03:00
Agi Sferro
97ede8ffca Bug 1696145 - Support Notification.silent and .vibrate on Android. r=smaug,droeh,aklotz
Differential Revision: https://phabricator.services.mozilla.com/D111924
2021-04-20 16:38:45 +00:00
Mike Conley
b29a236f04 Bug 1686315 - Fix up more tests to pass with content prompt subdialogs enabled or disabled. r=Gijs
Batch 2 of 2.

Differential Revision: https://phabricator.services.mozilla.com/D110483
2021-04-13 15:51:48 +00:00
Tim Nguyen
10883c2a9d Bug 1699062 - Flatten toolkit/themes/*/global/alerts/. r=desktop-theme-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D108759
2021-03-17 17:17:55 +00:00
Brindusan Cristian
055e135f72 Backed out changeset 74e09e7c0071 (bug 1699062) for build bustages in alert.css. CLOSED TREE 2021-03-17 18:57:26 +02:00
Tim Nguyen
a5f2f16f6a Bug 1699062 - Flatten toolkit/themes/*/global/alerts/. r=desktop-theme-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D108759
2021-03-17 15:31:16 +00:00
Tim Nguyen
be558cf7e8 Bug 893934 - Flatten toolkit/components/alerts/resources/content/. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D108755
2021-03-17 11:53:33 +00:00
Simon Giesecke
b5855b89fc Bug 1634281 - Remove unused nsDataHashtable.h includes. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D106007
2021-03-03 08:58:52 +00:00
Simon Giesecke
9af107a839 Bug 1691913 - Rename nsBaseHashtable::Put to InsertOrUpdate. r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
This makes the naming more consistent with other functions called
Insert and/or Update. Also, it removes the ambiguity whether
Put expects that an entry already exists or not, in particular because
it differed from nsTHashtable::PutEntry in that regard.

Differential Revision: https://phabricator.services.mozilla.com/D105473
2021-02-26 09:11:46 +00:00
Micah Tigley
1b5b46ec79 Bug 1680637 - Update tests using the old dialog UI to only use the old UI. r=jaws,Gijs,marionette-reviewers,whimboo,remote-protocol-reviewers
Depends on D100172

Differential Revision: https://phabricator.services.mozilla.com/D101388
2021-01-14 21:45:14 +00:00
Olli Pettay
2371718010 Bug 1685577 - Disable dom.input_events.canSuspendInBCG.enabled for now, r=sefeng
Differential Revision: https://phabricator.services.mozilla.com/D101051
2021-01-08 12:58:24 +00:00
Sean Feng
851fe92332 Bug 1682866 - Always use normal priority for DelayedDeleteRunnable r=smaug
DelayedDeleteRunnable would schedule itself twice and use input priority
for the second time because it only wants to run after everything
that could possibly touch this tab. This was needed because we were
strict with IPC messages. However, this is no longer needed because
IPC messages with destroyed actors will be discarded nowadays, so
we don't have to use input priority anymore.

Another reason for making this change is that input events could be
suspended when the runnable is about to run, so we need to either
use a different priority or resume input events.

Differential Revision: https://phabricator.services.mozilla.com/D100345
2020-12-22 17:56:28 +00:00
Kartik Gautam
5d5093a494 Bug 1679452 - Replace :not(X):not(Y) with :not(X, Y) r=ntim
Differential Revision: https://phabricator.services.mozilla.com/D100147
2020-12-19 11:24:13 +00:00
Kartik Gautam
f7ffcd09fb Bug 1679758 - Remove trailing empty lines r=sylvestre,marionette-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D99595
2020-12-15 10:34:54 +00:00
Dorel Luca
7320ae982a Backed out changeset f3aaf04fce3b (bug 1679758) for Devtool failures in browser_styleeditor_syncAddProperty.js. CLOSED TREE 2020-12-13 16:38:21 +02:00
Kartik Gautam
caf549c200 Bug 1679758 - Remove trailing empty lines r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D99595
2020-12-13 13:28:30 +00:00
Christoph Kerschbaumer
01b80dad31 Bug 1680768: Remove unused argument aPrincipal within closeAlert() in nsIAlertsService.idl r=nika
Differential Revision: https://phabricator.services.mozilla.com/D98776
2020-12-07 17:44:34 +00:00
Ricky Stewart
02a7b4ebdf Bug 1654103: Standardize on Black for Python code in mozilla-central.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00