Commit Graph

1074 Commits

Author SHA1 Message Date
Mark Banner
81c86b200c Bug 1834204 - Update more consumers to import ES modules directly. r=kpatenio,geckoview-reviewers,whimboo,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D178590
2023-05-26 11:36:33 +00:00
Natalia Csoregi
1b67d0b941 Backed out 3 changesets (bug 1834222, bug 1834176) for causing RemoteProcessMonitor failures. CLOSED TREE
Backed out changeset 346d3a1568dd (bug 1834222)
Backed out changeset ea1d8b634bfc (bug 1834176)
Backed out changeset 74d1880272d3 (bug 1834176)
2023-05-24 04:29:45 +03:00
Mark Banner
d1fc869252 Bug 1834176 - Convert NetUtil.jsm to be an ES system module. r=arai,webdriver-reviewers,perftest-reviewers,valentin,extension-reviewers,devtools-reviewers,sync-reviewers,cookie-reviewers,robwu,afinder,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D178589
2023-05-23 19:09:29 +00:00
Noemi Erli
1f146f097e Backed out 2 changesets (bug 1834176) for causing xpc failures in test_unload.js CLOSED TREE
Backed out changeset 57876d77a652 (bug 1834176)
Backed out changeset ae2f0837b528 (bug 1834176)
2023-05-23 12:14:37 +03:00
Mark Banner
08ff6c0ad9 Bug 1834176 - Convert NetUtil.jsm to be an ES system module. r=arai,webdriver-reviewers,perftest-reviewers,valentin,extension-reviewers,devtools-reviewers,sync-reviewers,cookie-reviewers,robwu,afinder,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D178589
2023-05-23 08:13:08 +00:00
Mark Banner
0666077666 Bug 1826062 - Automatic fixes for upgrading Prettier to 2.8.8. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,calu
Differential Revision: https://phabricator.services.mozilla.com/D177027
2023-05-20 12:26:53 +00:00
Mark Banner
91fde42f7b Bug 1826062 - Automatic fixes for Prettier 2.0.5 upgrade. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,owlish
Differential Revision: https://phabricator.services.mozilla.com/D177025
2023-05-20 12:26:49 +00:00
Marco Bonardo
be1ca5c872 Bug 1824117 - Use a custom content prefs group parser in DownloadLastDir. r=Gijs
Make all file: URIs point to the same destination folder.
Make data: URIs point to a destination folder per mime-type. If a mime-type is
not provided it defaults to text/plain, per the data URI spec.
Introduce a migration path in content prefs to remove existing data and file
URIs, users will have to set them again though current ones are not particularly
useful.
Make getFileAsync an async function to simplify the code.

Differential Revision: https://phabricator.services.mozilla.com/D173472
2023-04-14 16:15:59 +00:00
Abhishek Tiwari
cec6f4b2e7 Bug 1820878 - Convert toolkit/mozapps/downloads to ESmodules . r=Standard8,extension-reviewers,application-update-reviewers,bytesized,robwu
Differential Revision: https://phabricator.services.mozilla.com/D172245
2023-04-12 17:32:30 +00:00
Mark Banner
85d8bc064f Bug 1826702 - Convert PermissionTestUtils to an ES module. r=permissions-reviewers,settings-reviewers,media-playback-reviewers,pbz,padenot
Differential Revision: https://phabricator.services.mozilla.com/D174846
2023-04-06 15:07:56 +00:00
Marco Bonardo
e1ffc0d710 Bug 1824746 - Don't show a context menu if there's no download "selected". r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D173753
2023-03-28 12:34:01 +00:00
Marco Bonardo
56e31f5b0e Bug 1817650 - Sometimes the context menu in Downloads Panel opens for the wrong download. r=mtigley
Differential Revision: https://phabricator.services.mozilla.com/D171775
2023-03-24 15:37:34 +00:00
Stanca Serban
3de2959f54 Backed out changeset 8a7883ea39d2 (bug 1817650) for causing mochitests failures in browser_downloads_panel_context_menu.js. CLOSED TREE 2023-03-24 12:54:03 +02:00
Marco Bonardo
876c4b2346 Bug 1817650 - Sometimes the context menu in Downloads Panel opens for the wrong download. r=mtigley
Differential Revision: https://phabricator.services.mozilla.com/D171775
2023-03-24 09:47:48 +00:00
Ho Cheung
af90b2b393 Bug 1797974 - Remove unused isWinVistaOrHigher from DownloadsCommon. r=mak
`isWinVistaOrHigher` in `DownloadsCommon` is no longer used, and the
relevant code will be deleted through this commit.

Differential Revision: https://phabricator.services.mozilla.com/D171314
2023-03-01 13:25:22 +00:00
William Durand
640baa7e87 Bug 1816725 - Remove indicator attribute on the downloads button. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D169839
2023-02-15 09:33:11 +00:00
Daisuke Akatsuka
6a04c74e82 Bug 1733045: Remove nsINavBookmarkObserver. r=mak
Depends on D169583

Differential Revision: https://phabricator.services.mozilla.com/D131754
2023-02-15 00:29:13 +00:00
Joel Maher
417438b9cf Bug 1816191 - Skip tests in order to keep win7 running @ azure. r=gbrown,necko-reviewers,settings-reviewers,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,nalexander,sgalich,alwu
Differential Revision: https://phabricator.services.mozilla.com/D169523
2023-02-14 23:44:12 +00:00
William Durand
cd365e6f7f Bug 1811332 - Make sure this.indicator is truthy before using it. r=Gijs
The `indicator` getter may return `null` so we cannot just call methods on it.

Differential Revision: https://phabricator.services.mozilla.com/D169717
2023-02-14 12:03:02 +00:00
Emilio Cobos Álvarez
e89b11b939 Bug 1815161 - Remove validate attribute support from XUL images. r=Gijs
We have one single user left which goes back to bug 726444. No mention
to this attribute there and it seems to work without it.

Thunderbird has another validate="never" usage for favicons, but they
should replace it by an HTML image element like we did with ours in
bug 1718220.

Differential Revision: https://phabricator.services.mozilla.com/D168920
2023-02-06 13:57:02 +00:00
Neil Deakin
21426e24f4 Bug 1776879, replace text/unicode for clipboard and drag and drop and use text/plain directly, r=edgar,mak,stransky,geckoview-reviewers,extension-reviewers,zombie,m_kato
Most usage is a straight replacement but gtk needs extra changes as it transfers plain text in UTF8 natively and needs to be converted into UTF16, and Windows uses single-byte characters for RTF and CF_HTML formats so we preserve this.

Differential Revision: https://phabricator.services.mozilla.com/D158587
2023-02-01 23:30:55 +00:00
Gijs Kruitbosch
b965c4660a Bug 1795255 - autofix duplicate imports in tests under browser/, r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D166179
2023-01-31 11:48:41 +00:00
Mark Banner
9f5558b211 Bug 1812977 - Remove now unnecessary import-globals-from statements in browser. r=settings-reviewers,mconley
Differential Revision: https://phabricator.services.mozilla.com/D168070
2023-01-30 19:33:37 +00:00
Florian Quèze
e5a0fb38ca Bug 1812034 - set the download progress on the #downloads-indicator-progress-inner element directly instead of on the entire downloads button to limit restyled elements, r=Gijs,desktop-theme-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D167660
2023-01-25 08:58:58 +00:00
Mark Banner
2bd093b567 Bug 1811334 - Automatically replace Cu.reportError with console.error (most of browser/components). r=settings-reviewers,mconley
Differential Revision: https://phabricator.services.mozilla.com/D167297
2023-01-20 17:49:21 +00:00
Gijs Kruitbosch
5a903703c5 Bug 1810995 - update BrowserTestUtils.loadURI consumers to use loadURIString (automated) - browser - r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D167153
2023-01-19 20:16:42 +00:00
Amy Churchwell
69014fc71f Bug 1804411 - Downloads panel animations should honour prefers-reduced-motion settings. r=sfoster,mak
Differential Revision: https://phabricator.services.mozilla.com/D166444
2023-01-17 16:40:09 +00:00
Luca Greco
2d42f59783 Bug 1805225 - Fix browser_pdfjs_preview.js timeout failure on devedition builds. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D165681
2023-01-03 11:16:11 +00:00
Gijs Kruitbosch
897d721410 Bug 1781090 - avoid updating the download icon for hidden windows, r=florian,mak
Differential Revision: https://phabricator.services.mozilla.com/D152658
2022-12-23 14:44:43 +00:00
Mark Banner
df47c60747 Bug 1806359 - Convert telemetry imports to direct ES imports. r=necko-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,janerik,mconley,sgalich,bytesized,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D165002
2022-12-23 12:37:07 +00:00
Emilio Cobos Álvarez
0f61b77b68 Bug 1805415 - Use activateItem() rather than click() to activate menuitems. r=Gijs,extension-reviewers,pip-reviewers,search-reviewers
Bug 1805414 will move menu event handling to the DOM.

With that change the current synthetic click behavior of XUL menuitems
breaks. On current central, we rely on nsMenuFrame::HandleEvent not
getting called at all for synthetic clicks, and instead we just fire a
command event synchronously here:

  https://searchfox.org/mozilla-central/rev/a0d4f8f112c5c792ae272bf6ce50763ddd23ffa2/dom/xul/nsXULElement.cpp#1071

After my patch the command event is fired properly (potentially
asynchronously too) by the regular menu activation machinery, which is
preferable.

 * They fire a command event synchronously (even though on some
   platforms like macOS activating a context menu item is async).

 * They use a totally different codepath from what a user does.

 * They don't deal with native menus, etc.

We have a proper API for this (activateItem) which takes a much more
closer codepath to what users do, requires that the menu is shown, etc.
Use that API instead for testing.

As a benefit, tests now do not need to close the context menu manually
when clicking on a menu item (because we trigger the same code path as
users clicking the menu).

Differential Revision: https://phabricator.services.mozilla.com/D164567
2022-12-15 03:11:55 +00:00
Cristian Tuns
c9c42bc174 Backed out 2 changesets (bug 1805415) for causing dt failures on browser_net_telemetry_throttle_changed.js CLOSED TREE
Backed out changeset 5056d7df9f1e (bug 1805415)
Backed out changeset e13513500184 (bug 1805415)
2022-12-14 08:52:21 -05:00
Emilio Cobos Álvarez
9a53f8dea3 Bug 1805415 - Use activateItem() rather than click() to activate menuitems. r=Gijs,extension-reviewers,pip-reviewers,search-reviewers
Bug 1805414 will move menu event handling to the DOM.

With that change the current synthetic click behavior of XUL menuitems
breaks. On current central, we rely on nsMenuFrame::HandleEvent not
getting called at all for synthetic clicks, and instead we just fire a
command event synchronously here:

  https://searchfox.org/mozilla-central/rev/a0d4f8f112c5c792ae272bf6ce50763ddd23ffa2/dom/xul/nsXULElement.cpp#1071

After my patch the command event is fired properly (potentially
asynchronously too) by the regular menu activation machinery, which is
preferable.

 * They fire a command event synchronously (even though on some
   platforms like macOS activating a context menu item is async).

 * They use a totally different codepath from what a user does.

 * They don't deal with native menus, etc.

We have a proper API for this (activateItem) which takes a much more
closer codepath to what users do, requires that the menu is shown, etc.
Use that API instead for testing.

As a benefit, tests now do not need to close the context menu manually
when clicking on a menu item (because we trigger the same code path as
users clicking the menu).

Differential Revision: https://phabricator.services.mozilla.com/D164567
2022-12-14 10:25:17 +00:00
Gijs Kruitbosch
07047be166 Bug 1803800, r=mak
Differential Revision: https://phabricator.services.mozilla.com/D163932
2022-12-12 17:44:14 +00:00
Emilio Cobos Álvarez
17e422836b Bug 1803010 - Use .value consistently for downloads ui. r=Gijs,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D163312
2022-11-29 15:14:56 +00:00
Shane Hughes
86ca0e0d70 Bug 1802739 - Fix Downloads panel status label not resetting. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D163173
2022-11-27 12:14:20 +00:00
lyavor
d8968bf47f Bug 1800453 - Improve Error Message when blocking mixed content downloads. r=freddyb,flod freddyb
Differential Revision: https://phabricator.services.mozilla.com/D162101
2022-11-24 08:42:19 +00:00
Mark Banner
e319b56680 Bug 1801809 - Automatically replace Cu.reportError with console.error (places, download). r=mak
Depends on D162696

Differential Revision: https://phabricator.services.mozilla.com/D162697
2022-11-22 16:23:38 +00:00
Emilio Cobos Álvarez
a4ea6e43d0 Bug 1801492 - Reset download status descriptions properly. r=dao
Bug 1801492 changed the behavior here in a way that

  <description value="foo">bar</description>

Shows both "foo" and "bar". This code has multiple l10n ids that do a
mix of innerText vs. value attribute, see:

  https://searchfox.org/mozilla-central/rev/3d01e045479a6e5237958bd9aa8eb64306e1f48a/browser/locales/en-US/browser/downloads.ftl#162-168

That's all a bit sketchy over-all, but in order to support all of them
as is, reset them properly.

Differential Revision: https://phabricator.services.mozilla.com/D162464
2022-11-21 16:17:25 +00:00
Norisz Fay
01ab1f4bb5 Backed out changeset f8ee92c050f2 (bug 1801492) for causing bc failures on browser_unknownContentType_blob.js CLOSED TREE 2022-11-21 15:15:25 +02:00
Emilio Cobos Álvarez
7b9c28f16b Bug 1801492 - Reset download status descriptions properly. r=dao
Bug 1801492 changed the behavior here in a way that

  <description value="foo">bar</description>

Shows both "foo" and "bar". This code has multiple l10n ids that do a
mix of innerText vs. value attribute, see:

  https://searchfox.org/mozilla-central/rev/3d01e045479a6e5237958bd9aa8eb64306e1f48a/browser/locales/en-US/browser/downloads.ftl#162-168

That's all a bit sketchy over-all, but in order to support all of them
as is, reset them properly.

Differential Revision: https://phabricator.services.mozilla.com/D162464
2022-11-21 10:37:21 +00:00
Mark Banner
5d1820b074 Bug 1799314 - Convert consumers of testing modules to import ES modules direct (browser/). r=Gijs,settings-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D161914
2022-11-17 12:00:30 +00:00
Mike Conley
c759904dae Bug 1797836 - Part 2: Update CUI to have a general TYPE_PANEL instead of TYPE_MENU_PANEL. r=desktop-theme-reviewers,dao,sclements
Long ago, the menu panel in was a customizable area that users could drag things into.

That changed back around 2017 in bug 1354117 when the Photon redesign was built. The
menu panel become a static menu, but we also made it possible to permanently move things
to the overflow panel of the nav-bar.

It looks like we never updated the area type constant from referring to the old menu panel
though, so it's "TYPE_MENU_PANEL", and registering a node for it happens with
registerMenuPanel. This patch changes to constant to TYPE_PANEL and updates the registration
method to registerPanelNode.

I a check around the codebase as well as GitHub looking to see if there were any
system add-ons or experimental WebExtensions that rely on TYPE_MENU_PANEL / registerMenuPanel,
but I couldn't find any.

Differential Revision: https://phabricator.services.mozilla.com/D161078
2022-11-08 14:51:40 +00:00
Mark Banner
df52ac2d97 Bug 1798212 - Replace defineModuleGetter in Integration.sys.mjs with a ES version. r=settings-reviewers,mossop
Differential Revision: https://phabricator.services.mozilla.com/D161014
2022-11-07 17:56:10 +00:00
Mark Banner
19c189e131 Bug 1798212 - Convert consumers of downloads code to ES modules. r=mak,geckoview-reviewers,extension-reviewers,settings-reviewers,credential-management-reviewers,sgalich,mconley,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D161013
2022-11-07 17:56:10 +00:00
Mark Banner
3e15e427bb Bug 1798212 - Convert downloads code to ES modules. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D161012
2022-11-07 17:56:09 +00:00
Emilio Cobos Álvarez
8eb4bd796d Bug 1795944 - Remove descriptionheightworkaround. r=Gijs
Stuff wraps properly now with flexbox emulation.

Differential Revision: https://phabricator.services.mozilla.com/D159621
2022-10-19 11:55:29 +00:00
Mark Banner
5407bdffa8 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
Shane Hughes
34b247cb72 Bug 1742999 - Make DownloadSpamProtection per-window. r=Gijs,mak
This patch modifies DownloadSpamProtection and DownloadIntegration so
that each window will track blocked spam downloads separately. (Which
shouldn't affect permissions.) When a download is blocked, the helper
app service dispatches a notification, passing the relevant browsing
context and URL to DownloadIntegration. Then it passes the window and
URL to the singleton DownloadSpamProtection. That maps all the windows
to objects that carry the spam download objects. This allows us to only
show blocked spam downloads in the downloads panel of the window from
which they were triggered.

Differential Revision: https://phabricator.services.mozilla.com/D148092
2022-10-04 22:38:18 +00:00
Andrew McCreight
670df172aa Bug 1792457 - Revert workarounds for weak references to XPCWJS crashes. r=Gijs
I have fixed the underlying XPConnect issue, so these workarounds should
no longer be needed.

There are also two more in browser/base/content/browser-siteProtections.js
that I have not fixed.

Differential Revision: https://phabricator.services.mozilla.com/D158158
2022-09-29 11:40:19 +00:00