Commit graph

2777 commits

Author SHA1 Message Date
Katherine Patenio
130ce23c4c Bug 1834831 - update imports of browser/modules JSMs r=webdriver-reviewers,perftest-reviewers,zeid,extension-reviewers,settings-reviewers,pip-reviewers,credential-management-reviewers,devtools-reviewers,fxview-reviewers,sessionstore-reviewers,tabbrowser-reviewers,whimboo,mhowell,sgalich,robwu,sparky,Standard8,mconley,dao,sclements
Differential Revision: https://phabricator.services.mozilla.com/D179169
2023-06-19 18:44:48 +00:00
Cristian Tuns
110cfccc1f Backed out 2 changesets (bug 1834831) for causing node failures with checkBundles CLOSED TREE
Backed out changeset 58b351a155c8 (bug 1834831)
Backed out changeset 1acbb5231d14 (bug 1834831)
2023-06-19 13:22:35 -04:00
Katherine Patenio
a73f6ec769 Bug 1834831 - update imports of browser/modules JSMs r=webdriver-reviewers,perftest-reviewers,zeid,extension-reviewers,settings-reviewers,pip-reviewers,credential-management-reviewers,devtools-reviewers,fxview-reviewers,sessionstore-reviewers,tabbrowser-reviewers,whimboo,mhowell,sgalich,robwu,sparky,Standard8,mconley,dao,sclements
Differential Revision: https://phabricator.services.mozilla.com/D179169
2023-06-19 16:46:18 +00:00
Itiel
cf26dda371 Bug 1830679 - Convert element.setAttribute(data-l10n-{id,args}) uses in the codebase to document.l10n.setAttributes(element, id, args) r=eemeli,Gijs,willdurand,extension-reviewers,settings-reviewers,search-reviewers,devtools-reviewers,fxview-reviewers,mconley,Standard8,jdescottes,kcochrane,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D176791
2023-06-14 17:16:39 +00:00
Stanca Serban
d8e339a1d3 Backed out changeset 1c06f781a9cc (bug 1760047) for causing mochitests failures in browser_protectionsUI_milestones.js. CLOSED TREE 2023-06-13 22:00:24 +03:00
Eemeli Aro
9629327848 Bug 1760047 - Migrate browser-siteProtections.js to Fluent. r=anti-tracking-reviewers,fluent-reviewers,flod,bvandersloot
The `PanelMultiView.showSubView()` method needed to be made a bit more robust
for titles set by DOM localization rather than directly.

The following messages are dropped during the migration, as they are unused:
- contentBlocking.trackersView.blocked.label
- contentBlocking.cookiesView.firstParty.empty.label
- contentBlocking.cookiesView.trackers.empty.label
- contentBlocking.cookiesView.thirdParty.empty.label
- contentBlocking.fingerprintersView.blocked.label
- contentBlocking.cryptominersView.blocked.label

Differential Revision: https://phabricator.services.mozilla.com/D178829
2023-06-13 14:48:29 +00:00
Iulian Moraru
1a03d0ff0d Backed out changeset 76c5afdda762 (bug 1830679) for causing xpcshell failures on test_VariablesView_filtering-without-controller.js. CLOSED TREE 2023-06-12 22:03:43 +03:00
Itiel
d6ff8a9975 Bug 1830679 - Convert element.setAttribute(data-l10n-{id,args}) uses in the codebase to document.l10n.setAttributes(element, id, args) r=eemeli,Gijs,willdurand,extension-reviewers,settings-reviewers,search-reviewers,devtools-reviewers,fxview-reviewers,mconley,Standard8,jdescottes,kcochrane,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D176791
2023-06-12 17:16:35 +00:00
Marco Bonardo
6d415162ce Bug 1775603 - Must update the empty bookmarks toolbar message every time a new Places view is created. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D180405
2023-06-09 15:06:37 +00:00
Shane Hughes
52d6ffecf9 Bug 1831906 - Add release notes link to update modal prompts. r=bytesized,omc-reviewers,application-update-reviewers,jprickett
Differential Revision: https://phabricator.services.mozilla.com/D177410
2023-06-08 15:48:01 +00:00
Anna Yeddi
0e8ed851d8 Bug 1532282 - Make sidebar switcher menu to be PanelMultiView for its accessibility. r=Jamie,mconley,dao
Changing a panel for the sidebar menu popup to utilize PanelMultiView component that provides most of the panel's a11y out-of-the-box, as well as adding some additional properties to provide more information to AT.

Also adding a support to `keydown` event for the PanelMultiView focus management to backup the deprecated `keypress`.

Differential Revision: https://phabricator.services.mozilla.com/D178260
2023-06-08 15:32:57 +00:00
Iulian Moraru
da7b8bdc25 Backed out changeset 5e2344a050c6 (bug 1760047) for causing bc failures on browser_protectionsUI_milestones.js. CLOSED TREE 2023-06-05 16:27:39 +03:00
Eemeli Aro
78536fc8f0 Bug 1760047 - Migrate browser-siteProtections.js to Fluent. r=anti-tracking-reviewers,fluent-reviewers,flod,bvandersloot
The `PanelMultiView.showSubView()` method needed to be made a bit more robust
for titles set by DOM localization rather than directly.

The following messages are dropped during the migration, as they are unused:
- contentBlocking.trackersView.blocked.label
- contentBlocking.cookiesView.firstParty.empty.label
- contentBlocking.cookiesView.trackers.empty.label
- contentBlocking.cookiesView.thirdParty.empty.label
- contentBlocking.fingerprintersView.blocked.label
- contentBlocking.cryptominersView.blocked.label

Differential Revision: https://phabricator.services.mozilla.com/D178829
2023-06-05 10:55:31 +00:00
Rob Wu
3c0c3a2676 Bug 1836482 - Replace AddonManager.jsm imports with AddonManager.sys.mjs r=Standard8,webcompat-reviewers,twisniewski
This patch was generated as follows:

Run:
`./mach esmify --imports . --prefix=toolkit/mozapps/extensions/AddonManager`
In the output there are linter/prettifier errors due to unused
XPCOMUtils or separate importESModule calls. These have been fixed
manually and verified with `./mach lint --outgoing`.

The `esmify` script also inserts many unwanted newlines around imports
that are broken on two lines due to length. Due to the number of these,
I fixed them programatically.

1. Create patch from the changes so far.
2. From the patch, delete all lines that consist of "+" (i.e. added blank line).
3. Reset the working dir and apply the revised patch.
4. Verify that the diff between step 1 and 3 looks reasonable.
5. Verify that this patch as a whole looks reasonable.

Commands:

```
git diff > rename.diff
:%g/^+$/d
git commit -va -m WIP-rename
git revert HEAD
git apply --recount rename.diff
git diff HEAD^  # and verify that the removed lines are ok.
git commit -va  # one last review to verify correctness of whole patch.
git rebase -i HEAD~3  # drop the WIP + reverted commit, pick only the last.
```

`git apply` has the `--recount` option to force it to ignore mismatches
in line counts, which happens because we deleted added lines (^+$)
without fixing up the line counts in the file headers.

Differential Revision: https://phabricator.services.mozilla.com/D179874
2023-06-04 13:44:45 +00:00
William Durand
ee1a135f3a Bug 1833438 - Add support for notifications in the extensions panel. r=Itiel,rpl,desktop-theme-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D179345
2023-05-30 20:07:39 +00:00
Cristian Tuns
28d473b72a Backed out changeset 0d84853804a6 (bug 1532282) for causing bc failures in /browser_sidebar_switcher.js CLOSED TREE 2023-05-30 16:48:46 -04:00
Sam Foster
a3004a21be Bug 1819675 - rename SessionStore.getClosedTabCount and getClosedTabData to getClosedTabCountForWindow and getClosedTabDataForWindow. r=dao,fxview-reviewers,kcochrane
- As closed tabs will change to mean closed tabs from all windows, rename these functions to make
  changes in later patches clearer when we mean closed tabs from this window specifically, or closed
  tabs for all private/non-private windows

Differential Revision: https://phabricator.services.mozilla.com/D177849
2023-05-30 18:54:12 +00:00
Anna Yeddi
738c5394ac Bug 1532282 - Make sidebar switcher menu to be PanelMultiView for its accessibility. r=Jamie,mconley,dao
Changing a panel for the sidebar menu popup to utilize PanelMultiView component that provides most of the panel's a11y out-of-the-box, as well as adding some additional properties to provide more information to AT.

Also adding a support to `keydown` event for the PanelMultiView focus management to backup the deprecated `keypress`.

Differential Revision: https://phabricator.services.mozilla.com/D178260
2023-05-30 16:52:55 +00:00
Mark Banner
8b4f426ecf 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
Katherine Patenio
9dd38d03ab Bug 1830418 - Convert browser/components/customizableui/CustomizableUI.jsm to ESM r=Standard8,devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D177423
2023-05-24 15:52:34 +00:00
Eemeli Aro
e48d0b44df Bug 1833037 - Do not depend on this in RecentlyClosedTabsAndWindowsMenuUtils. r=Gijs
Also remove public access to the internal Localization instance
and update the call in CustomizableWidgets to not detach the method.

Differential Revision: https://phabricator.services.mozilla.com/D178049
2023-05-23 12:01:03 +00:00
Mark Banner
130a655906 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
8219a5c503 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
Katherine Patenio
ac4145f34d Bug 1830419 - Convert PanelMutiView.jsm and CustomizableUITestUtils.jsm in browser/components/customizableui to ESMs r=search-reviewers,Standard8,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D178362
2023-05-18 18:34:51 +00:00
Iulian Moraru
170aaf5bb7 Backed out changeset bbb3bbd9b6af (bug 1830679) for causing dt failures on browser_storage_cache_delete.js. CLOSED TREE 2023-05-18 22:09:25 +03:00
Itiel
076aaf6671 Bug 1830679 - Convert element.setAttribute(data-l10n-{id,args}) uses in the codebase to document.l10n.setAttributes(element, id, args) r=eemeli,willdurand,extension-reviewers,settings-reviewers,search-reviewers,devtools-reviewers,fxview-reviewers,mconley,Standard8,jdescottes,kcochrane
Differential Revision: https://phabricator.services.mozilla.com/D176791
2023-05-18 17:19:45 +00:00
Drew Willcoxon
929e1e4d77 Bug 1831760 - Use a native popup menu for positioned popups on Mac. r=dao,mstange
This does two things:

* Modify `nsXULPopupManager::ShowPopup()` so it calls `ShowPopupAsNativeMenu()`
  as long as an anchor wasn't passed in, and only on Mac.
* Modify `-[MOZMenuOpeningCoordinator _openMenu:atScreenPosition:forView:withAppearance:]`
  so it also takes a `aIsContextMenu` param. If the param is true, we synthesize
  a right-click event and pop up a context menu as usual. If it's false, we use
  `-[NSMenu popUpMenuPositioningItem:atLocation:inView:]` instead.

The reason this works is because `-[NSMenu popUpMenuPositioningItem:atLocation:inView:]`
opens the menu in a sensible place when the x-y coords are near the right edge
of the screen. In contrast, `+[NSMenu popUpContextMenu:withEvent:forView:]` will
anchor the menu's top-right corner to the mouse cursor when near the right edge.

Differential Revision: https://phabricator.services.mozilla.com/D177355
2023-05-18 05:51:19 +00:00
Hanna Jones
01dbdb2e39 Bug 1830333 - special case moz-toggle handling in panel multi view r=mstriemer,Gijs
This is a quick fix to unblock some onging work to use moz-toggle in the chrome. I'll follow up by filing a bug to reevaluate focus management in PanelMultiView more generally.

Differential Revision: https://phabricator.services.mozilla.com/D176678
2023-05-09 17:35:11 +00:00
Katherine Patenio
485f34bf93 Bug 1830421 - convert CustomizableWidgets, CustomizeMode, DragPositionManager and SearchWidgetTracker in browser/components/customizableui to ESMs r=Standard8,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D176825
2023-05-03 18:05:26 +00:00
anwar
1dbd9bffb3 Bug 1829673 - Put all mochitest test manifest files under browser/components into alphabetical order. r=mconley,extension-reviewers,credential-management-reviewers,dimi,robwu
Differential Revision: https://phabricator.services.mozilla.com/D176459
2023-05-02 16:13:24 +00:00
William Durand
45cd34a381 Bug 1801266 - Handle the case where an extension widget is not visible and not in the extensions panel. r=mconley,rpl
Differential Revision: https://phabricator.services.mozilla.com/D168532
2023-04-19 07:42:16 +00:00
Tim Giles
e521f4d98e Bug 1826824 - Enable <a> and <html:a> to be tab navigable in <panelview> elements. r=Gijs,Jamie
Since moz-support-link elements can be declared in markup or created
in JS, we needed to add a localName check to the
_makeNavigableTreeWalker function. This localName check allows the
moz-support-link, or any anchor element, to be tab navigable when
used within a <panelview> element.

Differential Revision: https://phabricator.services.mozilla.com/D174981
2023-04-12 14:03:26 +00:00
Ebilite Uchenna
8c931cb313 Bug 1824611 - Convert consumers of toolkit/components/passwordmgr to import ES modules directly. r=Standard8,credential-management-reviewers,settings-reviewers,fxview-reviewers,sclements,sgalich,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D174446
2023-04-11 19:06:24 +00:00
Bilal
3a0a9908fa Bug 1816994 - ESMified UITour JSMs. r=kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D173571
2023-03-29 17:32:27 +00:00
Emilio Cobos Álvarez
5358ca0830 Bug 1823791 - Use width to set the flex-basis of urlbar/searchbar. r=dao,Gijs
And use flex-shrink: 0 to prevent the urlbar from shrinking.

Differential Revision: https://phabricator.services.mozilla.com/D173273
2023-03-27 10:21:31 +00:00
William Durand
b9acf99c16 Bug 1820124 - Remove addonManager.action/link/view Telemetry events. r=rpl,settings-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D171541
2023-03-20 20:11:15 +00:00
Emilio Cobos Álvarez
ac370758b4 Bug 1822131 - Allow XUL elements to shrink-by-default. r=dholbert
Bug 1821920 and bug 1821871 are instances of an interesting behavior
change from bug 1820534.

The default flex-basis of old XUL was auto instead of max-content,
because of this code:

  https://searchfox.org/mozilla-central/rev/af78418c4b5f2c8721d1a06486cf4cf0b33e1e8d/layout/generic/nsFlexContainerFrame.cpp#1327

So stuff that used to wrap now no longer does, in an horizontal flex
container, since xul.css prevents XUL elements from shrinking.

Per the comment, a few tests relied on this, but I believe it should
generally be safe to shrink the items. This only causes to shrink if
they have an explicit width but no min-width (including min-width:
auto).

Some tests like test_mousescroll.xhtml hit this, because they have
explicit sizes but min-width: auto ends up being 0 effectively, but I
believe we should tweak those tests instead.

Differential Revision: https://phabricator.services.mozilla.com/D172462
2023-03-14 12:22:11 +00:00
Norisz Fay
0eabfe04d0 Backed out changeset e3fb28ffc489 (bug 1822131) for causing reftest failures on 540247-1.xhtml 2023-03-14 01:20:07 +02:00
Emilio Cobos Álvarez
f60d745bc2 Bug 1822131 - Allow XUL elements to shrink-by-default. r=dholbert
Bug 1821920 and bug 1821871 are instances of an interesting behavior
change from bug 1820534.

The default flex-basis of old XUL was auto instead of max-content,
because of this code:

  https://searchfox.org/mozilla-central/rev/af78418c4b5f2c8721d1a06486cf4cf0b33e1e8d/layout/generic/nsFlexContainerFrame.cpp#1327

So stuff that used to wrap now no longer does, in an horizontal flex
container, since xul.css prevents XUL elements from shrinking.

Per the comment, a few tests relied on this, but I believe it should
generally be safe to shrink the items. This only causes to shrink if
they have an explicit width but no min-width (including min-width:
auto).

Some tests like test_mousescroll.xhtml hit this, because they have
explicit sizes but min-width: auto ends up being 0 effectively, but I
believe we should tweak those tests instead.

Differential Revision: https://phabricator.services.mozilla.com/D172462
2023-03-13 20:43:34 +00:00
Emilio Cobos Álvarez
7734b14655 Bug 1821376 - Fix interactions of overflow menu with modern flexbox migration. r=Gijs
Customize mode was already using display: flex, so the migration caused
some interesting interactions.

In particular -moz-box-flex: 1 rules had no effect at all, so remove
them (same for the flex="" attribute).

Un-flex items in the overflow menu so that they don't spread too much.

Use flex: 1 in the customization-content-container to reset flex-shrink
to 1 (XUL flex didn't allow shrinking by default, so xul.css has
flex-shrink: 0).

Differential Revision: https://phabricator.services.mozilla.com/D172144
2023-03-10 13:21:23 +00:00
Emilio Cobos Álvarez
6e32187716 Bug 1821387 - Don't use vbox on panel headers. r=Gijs
While at it remove useless display declaration too.

vbox was setting -moz-box-orient: vertical, but that had no effect
because it had display: flex explicitly.

Differential Revision: https://phabricator.services.mozilla.com/D172145
2023-03-09 20:18:47 +00:00
Amy Churchwell
bf5b59317b Bug 984589 - Sideways sliding animation in panels should be disabled when prefers-reduced-motion is turned on. r=sfoster,mhowell,desktop-theme-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D167311
2023-03-08 17:52:48 +00:00
Emilio Cobos Álvarez
a0d7c22299 Bug 1819980 - Add test for this issue. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D171651
2023-03-06 16:04:45 +00:00
Sergey Galich
88fa8a86e6 Bug 1818691 - Add Passwords to Customize Toolbar r=credential-management-reviewers,fluent-reviewers,desktop-theme-reviewers,dao,flod,issammani
Differential Revision: https://phabricator.services.mozilla.com/D170854
2023-03-06 04:15:08 +00:00
Niklas Baumgardner
c057486ca0 Bug 1801019 - Add telemetry for screenshots component. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D164948
2023-02-25 17:26:34 +00:00
Marian-Vasile Laza
5a3faecdb0 Backed out changeset d853ddfd853e (bug 1801019) for bc failures on browser_screenshots_telemetry_tests.js. CLOSED TREE 2023-02-23 21:11:16 +02:00
Niklas Baumgardner
26e4c6bc8a Bug 1801019 - Add telemetry for screenshots component. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D164948
2023-02-23 17:37:01 +00:00
Gijs Kruitbosch
3e5d710873 Bug 1817443 - move url loading method implementations from utilityOverlay.js into their own helper module, r=mossop
openLinkIn would really benefit from being split up a bit, and adding more
globals to the browser window is icky. Also, the story for opening new tabs if
you're not inside a window is a nightmare right now. Moving this code
to a module is a first step to making that story nicer.

I kept wrappers for all the functions I'm moving, and added the `window` as the
first argument. In the future we can update these functions to support being
called without a `window` ref. The one exception is getTopWin, where I updated
the callers in this patch.

I had to tweak the parameter detection of the different arguments supported by
openUILinkIn because forwarding calls means arguments.length is always larger
than 3... but then also removed it in the next commit.

Differential Revision: https://phabricator.services.mozilla.com/D170210
2023-02-23 17:02:43 +00:00
Cristina Horotan
45de4f594f Backed out 5 changesets (bug 1817443) for newtab failure CLOSED TREE
Backed out changeset ba33c510d008 (bug 1817443)
Backed out changeset 07e3bccaeb6d (bug 1817443)
Backed out changeset 2b39dee42948 (bug 1817443)
Backed out changeset a74a52e93af4 (bug 1817443)
Backed out changeset 827855beb033 (bug 1817443)
2023-02-23 17:30:23 +02:00
Gijs Kruitbosch
1c327d22dd Bug 1817443 - move url loading method implementations from utilityOverlay.js into their own helper module, r=mossop
openLinkIn would really benefit from being split up a bit, and adding more
globals to the browser window is icky. Also, the story for opening new tabs if
you're not inside a window is a nightmare right now. Moving this code
to a module is a first step to making that story nicer.

I kept wrappers for all the functions I'm moving, and added the `window` as the
first argument. In the future we can update these functions to support being
called without a `window` ref. The one exception is getTopWin, where I updated
the callers in this patch.

I had to tweak the parameter detection of the different arguments supported by
openUILinkIn because forwarding calls means arguments.length is always larger
than 3... but then also removed it in the next commit.

Differential Revision: https://phabricator.services.mozilla.com/D170210
2023-02-23 14:49:27 +00:00