Commit graph

3992 commits

Author SHA1 Message Date
Kirk Steuber
efdc464082 Bug 1727820 - Make AppUpdater accomodate API changes and remove race conditions r=bhearsum
This ended up being a nearly total rewrite of AppUpdater, but I think that the changes are worth it.
The flow is much more linear which makes it easier to follow and reason about.
The API is made much more formal by making most methods and members private.
Many potential race conditions have been removed.
Many more potential errors thrown can now be caught by the try/catch that wraps `AppUpdater.check`, causing those errors to show the "Internal Error" message rather than causing the update interface to just freeze.
Cancelling an in-progress update check works more reliably.

This patch does not change AppUpdater consumers to accomodate these changes. That will come later in the patch stack.

Differential Revision: https://phabricator.services.mozilla.com/D159298
2022-10-25 18:10:19 +00:00
Norisz Fay
720e6a2cb3 Backed out 18 changesets (bug 1727820) for causing mochitest failures on browser_updateAsk.js CLOSED TREE
Backed out changeset 577d5618fcd1 (bug 1727820)
Backed out changeset 9e6a904ec81d (bug 1727820)
Backed out changeset d95a38c6e8b4 (bug 1727820)
Backed out changeset dc9b7d7e97ae (bug 1727820)
Backed out changeset 464b501ae051 (bug 1727820)
Backed out changeset 9729c6dd1aac (bug 1727820)
Backed out changeset 3c67eac7d52e (bug 1727820)
Backed out changeset 7c2a0dfca2d2 (bug 1727820)
Backed out changeset 2021fb0cba9e (bug 1727820)
Backed out changeset 7a02de8e6ca6 (bug 1727820)
Backed out changeset 6e9017360297 (bug 1727820)
Backed out changeset 0bfff694ce96 (bug 1727820)
Backed out changeset 746d1c708507 (bug 1727820)
Backed out changeset 3b14d8d1fb94 (bug 1727820)
Backed out changeset c8a1417f3528 (bug 1727820)
Backed out changeset 69ef434ae92c (bug 1727820)
Backed out changeset ad646b770b07 (bug 1727820)
Backed out changeset 18b9dd91761f (bug 1727820)
2022-10-25 05:31:39 +03:00
Kirk Steuber
151f9d2004 Bug 1727820 - Make AppUpdater accomodate API changes and remove race conditions r=bhearsum
This ended up being a nearly total rewrite of AppUpdater, but I think that the changes are worth it.
The flow is much more linear which makes it easier to follow and reason about.
The API is made much more formal by making most methods and members private.
Many potential race conditions have been removed.
Many more potential errors thrown can now be caught by the try/catch that wraps `AppUpdater.check`, causing those errors to show the "Internal Error" message rather than causing the update interface to just freeze.
Cancelling an in-progress update check works more reliably.

This patch does not change AppUpdater consumers to accomodate these changes. That will come later in the patch stack.

Differential Revision: https://phabricator.services.mozilla.com/D159298
2022-10-24 20:53:22 +00:00
Mark Banner
2ffde1e92f Bug 1792341 - Migrate more toolkit/modules consumers to use direct ES module import. r=Gijs,webdriver-reviewers,perftest-reviewers,necko-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,sgalich,owlish,bytesized,AlexandruIonescu,whimboo,mconley,mixedpuppy
Mainly automated changes. Some manual ESLint fixes and whitespace cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D158452
2022-10-18 11:21:26 +00:00
Kagami Sascha Rosylight
232d5682ef Bug 1784840 - Convert all background tasks to ESM r=nalexander,application-update-reviewers,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D156950
2022-10-15 18:24:37 +00:00
nchevobbe
b19310b506 Bug 1792993 - Log additional error message in console when Addonmanager.installSitePermsAddonFromWebPage throws. r=pbz.
This error message provides extra information to developers so they know why the access was denied
(e.g. for public etld, remote subframes, ...).

Differential Revision: https://phabricator.services.mozilla.com/D159246
2022-10-14 17:01:32 +00:00
pmcmanis
be272fdeb5 Bug 1791000 - Implement a custom ping in FOG to emulate a possible nodc implementation r=chutten
Differential Revision: https://phabricator.services.mozilla.com/D158963
2022-10-12 20:19:58 +00:00
Masayuki Nakano
4ba9b4dd1c Bug 1792759 - part 1: Add nsIEditor.clearUndoRedo() to get rid of nsIEditor.transactionManager r=m_kato,NeilDeakin,Standard8
`nsIEditor.transactionManager` is used only for some simple purposes, however,
`nsIEditor` exposes the rich API.  That makes it harder to maintain internal
code around transactions.  Instead, `nsIEditor` exposes only simple and
necessary APIs.

This patch creates a new API to clear undo/redo history and make the users in
mozilla-central use it instead of using `nsITransactionManager.clear()`.

Differential Revision: https://phabricator.services.mozilla.com/D158336
2022-10-09 01:13:49 +00:00
Eemeli Aro
dc1a3bfffa Bug 1793572 - Convert WebRTCParent.jsm from .properties to Fluent. r=mconley,flod
The code is slightly cleaned up to not construct identifiers by concatenating strings, and to avoid using the requestTypes array when determining the prompt contents.

A few messages are moved to and from browser.ftl to group them better, though all of the "WebRTC Pop-up notifications" messages could also be moved from there to webrtcIndicator.ftl, which is now also included by browser.xhtml.

The message `webrtc-allow-share-audio-capture-unsafe-delegation` is added, as it appears to have been missed previously -- it's referred to in code, but the message itself was not defined.

Differential Revision: https://phabricator.services.mozilla.com/D158762
2022-10-08 07:35:29 +00:00
Eemeli Aro
79d817f2a6 Bug 1793572 - Convert getUserMedia.sharingMenu strings from browser.properties to Fluent. r=mconley,flod
The list of items is now formatted using ListFormat rather than manually, which requires a new message webrtc-sharing-menuitem. Based on a review of the existing solutions [1], it should be acceptable to use the same pattern for all of them, even though this may effect a small change for the zh-TW locale.

[1] https://transvision.flod.org/string/?entity=browser/chrome/browser/browser.properties:getUserMedia.sharingMenuCamera&repo=gecko_strings

Differential Revision: https://phabricator.services.mozilla.com/D158761
2022-10-08 07:35:28 +00:00
Eemeli Aro
2c47f765da Bug 1793572 - Convert webrtcIndicator.properties to Fluent. r=mconley,flod
Differential Revision: https://phabricator.services.mozilla.com/D158760
2022-10-08 07:35:28 +00:00
Eemeli Aro
54dedbc0c2 Bug 1793581 - Convert ContentCrashHandlers.jsm strings to Fluent. r=gsvelto,fluent-reviewers,flod
Relevant strings from both browser.ftl and browser.properties are collected into a new contentCrash.ftl, which is only loaded when needed.

Differential Revision: https://phabricator.services.mozilla.com/D158649
2022-10-06 12:07:11 +00:00
nchevobbe
4a6b4a3530 Bug 1778959 - Tweaks to PermissionUI to delegate gated site permissions request flows to synthetic SitePermsAddon install flow. r=permissions-reviewers,pbz
This patch includes a new `PermissionUI.SitePermsAddonInstallRequestPrototype` helper, it inherits from `PermissionPromptForRequestPrototype`
and override the `prompt` method to trigger the synthetic `SitePermsAddon` install flow when a addon gated site permissions is requested
(currently only "midi" and "midi-sysex").

The new `SitePermsAddonInstallRequestPrototype` helper is then set as the `__proto__` for the `MIDIPermissionPrompt.prototype`, which
makes sure that every time the MIDI site permissions are being requested, the user is prompted to install a synthetic addon
as part of the site permission request.

When the `dom.sitepermsaddon-provider.enabled` pref is set to `false`,
or when we're dealing with a `file` scheme, we fall back to `PermissionPromptForRequestPrototype.prompt`.

Differential Revision: https://phabricator.services.mozilla.com/D151478
2022-09-30 22:07:19 +00:00
Julian Descottes
4a1ddfd485 Bug 1790471 - [marionette] Convert /remote/marionette JSM modules to ESM r=webdriver-reviewers,whimboo
Depends on D158295

Differential Revision: https://phabricator.services.mozilla.com/D158296
2022-09-30 11:08:08 +00:00
Mark Banner
8d1ebcb9d6 Bug 1792365 - Convert toolkit/modules consumers to use ES module imports directly. r=webdriver-reviewers,perftest-reviewers,geckoview-reviewers,extension-reviewers,preferences-reviewers,desktop-theme-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,robwu,Gijs,sgalich,bytesized,AlexandruIonescu,dao,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D158094
2022-09-29 06:52:34 +00:00
Mark Banner
c0b3131dd9 Bug 1634555 - Send event telemetry for search default engine changes. r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D157471
2022-09-28 09:40:36 +00:00
Emilio Cobos Álvarez
4e978b56b5 Bug 1689816 - Implement <tabpanels> and <deck> without XUL layout. r=Gijs,Jamie,morgan,preferences-reviewers,mconley,TYLin
Gijs for front-end bits, layout for the new CSS properties and the
removal of nsDeckFrame / nsStackLayout, Jamie and Morgan for the a11y
changes.

As discussed in the bug, the main tricky part here is handling a11y
correctly. For <deck>, that's trivial (just use `visibility: hidden` to
hide the panels visually, while removing the unselected panels from the
a11y tree).

For <tabpanels> however we need to do something special. We do want to
hide stuff visually, but we want to preserve the contents in the a11y
tree.

For that, the easiest fix is introducing a new privileged CSS property
(-moz-subtree-hidden-only-visually), which takes care of not painting
the frame, but marks stuff offscreen in the accessibility tree. This is
not intended to be a property used widely.

Other than that, the changes are relatively straight-forward, though
some of the accessible/mac changes I could get a sanity-check on.

Differential Revision: https://phabricator.services.mozilla.com/D157875
2022-09-27 04:18:16 +00:00
Marian-Vasile Laza
f54a464c90 Backed out changeset 2f74f8f2ed19 (bug 1689816) for causing reftest failures on skip-ink-multiline-position.html. 2022-09-26 23:24:03 +03:00
Emilio Cobos Álvarez
f875681246 Bug 1689816 - Implement <tabpanels> and <deck> without XUL layout. r=Gijs,Jamie,morgan,preferences-reviewers,mconley,TYLin
Gijs for front-end bits, layout for the new CSS properties and the
removal of nsDeckFrame / nsStackLayout, Jamie and Morgan for the a11y
changes.

As discussed in the bug, the main tricky part here is handling a11y
correctly. For <deck>, that's trivial (just use `visibility: hidden` to
hide the panels visually, while removing the unselected panels from the
a11y tree).

For <tabpanels> however we need to do something special. We do want to
hide stuff visually, but we want to preserve the contents in the a11y
tree.

For that, the easiest fix is introducing a new privileged CSS property
(-moz-subtree-hidden-only-visually), which takes care of not painting
the frame, but marks stuff offscreen in the accessibility tree. This is
not intended to be a property used widely.

Other than that, the changes are relatively straight-forward, though
some of the accessible/mac changes I could get a sanity-check on.

Differential Revision: https://phabricator.services.mozilla.com/D157875
2022-09-26 17:40:30 +00:00
Mathew Hodson
a72c385753 Bug 1776578 - Replace init tasks with add_setup in mochitests. r=application-update-reviewers,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D149486
2022-09-26 13:58:49 +00:00
Kirk Steuber
65e31d3d3d Bug 1756450 - Add test for updater's new internalError state r=bhearsum
Differential Revision: https://phabricator.services.mozilla.com/D157999
2022-09-23 19:47:34 +00:00
Kirk Steuber
e2d241ebcf Bug 1756450 - Handle AppUpdater exceptions via new INTERNAL_ERROR state r=bhearsum
Differential Revision: https://phabricator.services.mozilla.com/D156999
2022-09-23 19:47:33 +00:00
Kirk Steuber
7c1c3703cb Bug 1756450 - Add AppUpdater.STATUS.INTERNAL_ERROR r=bhearsum,fluent-reviewers,preferences-reviewers,desktop-theme-reviewers,flod
This patch adds a state to AppUpdater to represent when an internal error has occurred. It also adds the appropriate code to the Update UI to be able to handle this state, along with a panel in each UI and a string that can go in the panels to convey to the user that update has failed.

Ideally, it would be good if this message also directed the user to a SUMO article. See Bug 1787309 for details on this. But at the moment, I would prefer to address Bug 1756450 quickly rather than wait for that to be ready.

Differential Revision: https://phabricator.services.mozilla.com/D156998
2022-09-23 19:47:33 +00:00
Evan
f71e1c1af2 Bug 1788783 -Converted Picture in Picture JSM modules to ESMs. r=kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D157039
2022-09-23 18:11:48 +00:00
Jonathan Sudiaman
c27b002b63 Bug 1790758 - Convert Region.jsm and IgnoreLists.jsm JSM modules to ESMs r=Standard8,preferences-reviewers,credential-management-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D157337
2022-09-20 12:21:45 +00:00
Nicholas Rishel
9454695dd9 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-14 00:42:43 +00:00
Tooru Fujisawa
735b95404c Bug 1790577 - Reset the tab drop indicator in tabs list. r=NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D157197
2022-09-13 17:33:58 +00:00
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
William Durand
ff7944d1e4 Bug 1789407 - Always anchor defaultsearch popup to the urlbar. r=rpl
Depends on D156960

Differential Revision: https://phabricator.services.mozilla.com/D156952
2022-09-09 18:50:32 +00:00
William Durand
0f39a1fdb9 Bug 1790015 - Re-align extension popups when anchored to the unified extensions button. r=rpl
We cannot fully remove `popupOptions` because that wouldn't position the popups correctly in RTL mode.

Differential Revision: https://phabricator.services.mozilla.com/D156960
2022-09-09 17:41:39 +00:00
Tooru Fujisawa
878238b587 Bug 1788782 - Limit the top of drop indicator to the parent box. r=NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D156253
2022-09-06 03:50:52 +00:00
Tooru Fujisawa
51761450bb Bug 1788778 - Part 3: Use the same algorithm as tab bar to detect drag leave. r=NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D156252
2022-09-06 03:50:52 +00:00
Tooru Fujisawa
db2cbe8b0d Bug 1788778 - Part 1: Remove unnecessary call for _clearDropTarget in TabsPanel. r=NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D156250
2022-09-06 03:50:51 +00:00
Emilio Cobos Álvarez
13572bce66 Bug 1788273 - Tweak popup alignment so that it looks good on mirrored wayland popups. r=dao,mak
When these panels had arrows, I guess the bottomcenter topleft alignment
made sense so that you could precisely align the arrow, but that's not
what we do now.

Don't use bottomcenter / leftcenter / rightcenter, since we really want
the sides to align.

This shouldn't change behavior on any platform except Linux + Wayland,
where the alignment looks good now in the case of bug 1784876.

Differential Revision: https://phabricator.services.mozilla.com/D156099
2022-09-02 20:26:29 +00:00
Butkovits Atila
c520b707bd Backed out changeset 368a7ce1b104 (bug 1788273) for causing failures at browser_recently_closed_tabs.js. CLOSED TREE 2022-09-02 16:35:55 +03:00
Emilio Cobos Álvarez
0777329f69 Bug 1788273 - Tweak popup alignment so that it looks good on mirrored wayland popups. r=dao,mak
When these panels had arrows, I guess the bottomcenter topleft alignment
made sense so that you could precisely align the arrow, but that's not
what we do now.

Don't use bottomcenter / leftcenter / rightcenter, since we really want
the sides to align.

This shouldn't change behavior on any platform except Linux + Wayland,
where the alignment looks good now in the case of bug 1784876.

Differential Revision: https://phabricator.services.mozilla.com/D156099
2022-09-02 11:18:54 +00:00
Tooru Fujisawa
f31cd07e4a Bug 1771831 - Make it possible to reorder tabs in "List all tabs" list by drag-and-drop. r=NeilDeakin
Also the tab list item can be dragged to the tab bar to reorder, or moved to
other window, or detached.

Differential Revision: https://phabricator.services.mozilla.com/D147709
2022-08-31 13:22:53 +00:00
Butkovits Atila
9faa735912 Backed out changeset f47d9c27992d (bug 1771831) for causing failures at browser_tabdetach.js. CLOSED TREE 2022-08-31 03:54:04 +03:00
Tooru Fujisawa
d50c882977 Bug 1771831 - Make it possible to reorder tabs in "List all tabs" list by drag-and-drop. r=NeilDeakin
Also the tab list item can be dragged to the tab bar to reorder, or moved to
other window, or detached.

Differential Revision: https://phabricator.services.mozilla.com/D147709
2022-08-30 22:49:43 +00:00
Butkovits Atila
59d03e0b1d Backed out 2 changesets (bug 1676492) for causing failures at test_navigation.py. CLOSED TREE
Backed out changeset 09fd88048f35 (bug 1676492)
Backed out changeset bc76e6966ec9 (bug 1676492)
2022-08-30 20:56:51 +03:00
Neil Deakin
507f721d6c Bug 1676492, show the bookmarks toolbar when a new window is opened when the preference is set to show a blank page, r=Mardak,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D155003
2022-08-30 14:02:02 +00:00
Marco Bonardo
2226b10cd0 Bug 1782854 - Don't store local uri favicons after pageShow. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D155217
2022-08-23 15:46:05 +00:00
Butkovits Atila
cfc14cb683 Backed out changeset 924abe0bf6fd (bug 1772180) for causing failures at browser_UnsubmittedCrashHandler.js. CLOSED TREE 2022-08-23 18:35:21 +03:00
Barret Rennie
ec7127af72 Bug 1772180 - Port osfile.jsm usage to IOUtils in browser/modules/ r=Gijs
This patch changes calls to set access time to calls to set last modified time,
*but* setting lastModifiedTime will set both.

Differential Revision: https://phabricator.services.mozilla.com/D153697
2022-08-23 14:50:05 +00:00
Narcis Beleuzu
0dce053a4a Backed out changeset 64f9bfbf800e (bug 1782854) for dt failure on browser_aboutdebugging_tab_favicons.js 2022-08-22 20:47:07 +03:00
Marco Bonardo
b98d9c21b2 Bug 1782854 - Don't store local uri favicons after pageShow. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D155217
2022-08-22 16:29:37 +00:00
Max Christian Pohle
bff8e45651 Bug 1779314: Add logging to the updater interface code r=bytesized,application-update-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D154658
2022-08-19 14:37:33 +00:00
William Durand
cb31c16d87 Bug 1784292 - Anchor extension popups to the unified extensions button. r=mconley,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D154408
2022-08-19 06:25:13 +00:00
Emilio Cobos Álvarez
0618f92da8 Bug 1785053 - Add comments that I forgot to upload to phabricator. DONTBUILD
MANUAL PUSH: Comment-only change.
2022-08-17 14:18:22 +02:00