Commit Graph

4088 Commits

Author SHA1 Message Date
agoloman
63c83deb26 Revert "Bug 1606785 - Enable Prettier for CSS files r=desktop-theme-reviewers,Standard8,frontend-codestyle-reviewers,emilio" for causing multiple failures.
This reverts commit ec5fa1d4c0.

Revert "Bug 1606785 - Format Firefox CSS files with Prettier r=desktop-theme-reviewers,perftest-reviewers,places-reviewers,translations-reviewers,omc-reviewers,backup-reviewers,browser-installer-reviewers,sparky,dao,pdahiya,nrishel,kpatenio"

This reverts commit baa5d72bbd.

Revert "Bug 1606785 - Format browser/themes and toolkit/themes CSS files with Prettier r=desktop-theme-reviewers,pip-reviewers,tabbrowser-reviewers,places-reviewers,dao,mconley"

This reverts commit 9604b0a8ae.

Revert "Bug 1606785 - Format browser/themes/preferences CSS files with Prettier r=settings-reviewers,desktop-theme-reviewers,dao,mconley"

This reverts commit 686c1cf85f.

Revert "Bug 1606785 - Format urlbar CSS files with Prettier r=urlbar-reviewers,desktop-theme-reviewers,dao"

This reverts commit a7a4f31251.

Revert "Bug 1606785 - Format webcompat CSS files with Prettier r=webcompat-reviewers,denschub"

This reverts commit 41bc4d5237.

Revert "Bug 1606785 - Format search CSS files with Prettier r=search-reviewers,jteow"

This reverts commit 7bb7f82374.

Revert "Bug 1606785 - Format dom CSS files with Prettier r=emilio"

This reverts commit c22e910235.

Revert "Bug 1606785 - Format android CSS files with Prettier r=geckoview-reviewers,hiro"

This reverts commit c08e43fc3d.

Revert "Bug 1606785 - Format layout CSS files with Prettier r=layout-reviewers,dholbert"

This reverts commit 4f2a32d1a4.

Revert "Bug 1606785 - Format devtools CSS files with Prettier r=devtools-reviewers,nchevobbe,frontend-codestyle-reviewers"

This reverts commit c05f675ddf.

Revert "Bug 1606785 - Format recomp CSS files with Prettier r=reusable-components-reviewers,desktop-theme-reviewers,dao,mkennedy"

This reverts commit b10c7de8d0.

Revert "Bug 1606785 - Format sidebar CSS files with Prettier r=sidebar-reviewers,desktop-theme-reviewers,dao,nsharpley"

This reverts commit d32c555e37.

Revert "Bug 1606785 - Format shopping CSS files with Prettier r=shopping-reviewers,desktop-theme-reviewers,dao,rking"

This reverts commit 965887a708.

Revert "Bug 1606785 - Format profiles CSS files with Prettier r=profiles-reviewers,desktop-theme-reviewers,dao,mossop"

This reverts commit 8338860f74.

Revert "Bug 1606785 - Format genai and ml CSS files with Prettier r=firefox-ai-ml-reviewers,Mardak"

This reverts commit d66681f553.

Revert "Bug 1606785 - Format firefoxview CSS files with Prettier r=fxview-reviewers,desktop-theme-reviewers,dao,jsudiaman"

This reverts commit 530b815cad.

Revert "Bug 1606785 - Format aboutlogins, megalist, and form autofill CSS files with Prettier r=credential-management-reviewers,mtigley,desktop-theme-reviewers,dao"

This reverts commit 813c864381.
2025-05-21 04:49:28 +00:00
hannajones
baa5d72bbd Bug 1606785 - Format Firefox CSS files with Prettier r=desktop-theme-reviewers,perftest-reviewers,places-reviewers,translations-reviewers,omc-reviewers,backup-reviewers,browser-installer-reviewers,sparky,dao,pdahiya,nrishel,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D249182
2025-05-21 03:55:13 +00:00
Dão Gottwald
e0a00e5f7d Bug 1966912 - Remove addTab's index alias for the tabIndex parameter. r=extension-reviewers,sessionstore-reviewers,tabbrowser-reviewers,robwu,dwalker
Differential Revision: https://phabricator.services.mozilla.com/D249783
2025-05-20 12:06:21 +00:00
Rob Wu
da9a9a8b6f Bug 1948263 - Change "Add-ons and Themes" to "Extensions and Themes" r=willdurand,fluent-reviewers,bolsson
This change is made for the following reasons:

- Similarity between new "Extensions" menu item, which shows up instead
  of "Extensions and Themes" when the Extensions Button is hidden.
- Consistency with about:preferences, which shows "Extensions & Themes"
  (this was introduced in bug 1483335 and was not touched when the menu
  labels were renamed in bug 1698931).
- Consistency with mobile (bug 1885561)

This effectively reverts the rename of bug 1698931.

Differential Revision: https://phabricator.services.mozilla.com/D248162
2025-05-20 09:56:36 +00:00
Rob Wu
11bb0674a4 Bug 1948263 - Add Extensions appmenu item if needed r=willdurand,fluent-reviewers,bolsson,Gijs
By default, this patch does not change any behavior.
Only when the Extensions Button is hidden, then this replaces the
current generic "Add-ons and Themes" option with the "Extensions"
menu, which opens the Extensions Panel.

Differential Revision: https://phabricator.services.mozilla.com/D248161
2025-05-20 09:56:32 +00:00
Rob Wu
1b1787bc0b Bug 1948263 - Show "Moved to menu" notification after hiding r=willdurand,fluent-reviewers,bolsson
Differential Revision: https://phabricator.services.mozilla.com/D248160
2025-05-20 09:56:29 +00:00
Rob Wu
67ea63720e Bug 1948259 - Allow user to unhide the button via context menu r=willdurand
Allow the user to unhide the hidden button via a context menu item on
the button, in case they do not know about the Customize Toolbar option.

The context menu can be used on the "hidden button" because there are
some situations where the button is temporarily unhidden.

Differential Revision: https://phabricator.services.mozilla.com/D248159
2025-05-20 09:56:25 +00:00
Rob Wu
1dda631789 Bug 1948259 - Add menu item to hide/show Extensions Button in Customize mode r=willdurand,fluent-reviewers,bolsson
Bug 1948258 added a way to hide the Extensions Button, but not a way to
show it. This patch makes the following changes:

- always show the Extensions button in Customization mode, even if the
  user wants to hide the button unconditionally.

- add menu item to toggle the visibility of the Extensions Button.

- the new menu item is not shown anywhere except on the Extensions
  Button in Customization mode.

Differential Revision: https://phabricator.services.mozilla.com/D248158
2025-05-20 09:56:21 +00:00
Sandor Molnar
32b4815cfe Revert "Bug 1966912 - Remove addTab's index alias for the tabIndex parameter. r=extension-reviewers,sessionstore-reviewers,tabbrowser-reviewers,robwu,dwalker" for causing remote failures @ browser_TabManager.js
This reverts commit 38a0034022.
2025-05-19 21:07:58 +00:00
Dão Gottwald
38a0034022 Bug 1966912 - Remove addTab's index alias for the tabIndex parameter. r=extension-reviewers,sessionstore-reviewers,tabbrowser-reviewers,robwu,dwalker
Differential Revision: https://phabricator.services.mozilla.com/D249783
2025-05-19 19:48:54 +00:00
Mark Banner
8a3c99b9cb Bug 1966662 - Migrate most of toolkit/components/search to moz-src uris. r=search-reviewers,scunnane
Differential Revision: https://phabricator.services.mozilla.com/D249563
2025-05-17 17:38:49 +00:00
Rob Wu
187993ede6 Bug 1948258 - Unhide button when (browserAction) panel opens r=willdurand
This is the basis for the follow-up patches to unhide the button as
needed. In this patch specifically, the hidden button is shown when a
browserAction panel is opened, and hidden again when the panel closes.

This also includes test coverage for ensuring that the browserAction
panel is shown along with the button when needed.

Differential Revision: https://phabricator.services.mozilla.com/D248157
2025-05-16 12:55:28 +00:00
Rob Wu
4f6f7c1712 Bug 1948258 - Allow Extensions button to be hidden via "Remove from Toolbar" r=willdurand
This adds the ability to hide the Extensions button via the standard
"Remove from Toolbar" menu item. The option is behind a temporary hidden
pref, until the follow-up work completes, as elaborated at
https://bugzilla.mozilla.org/show_bug.cgi?id=1948258#c1

Differential Revision: https://phabricator.services.mozilla.com/D248156
2025-05-16 12:55:25 +00:00
Rob Wu
8bc6e28aa7 Bug 1948258 - Add pref that enables the button to be hidden r=willdurand
This pref will be used as the mechanism to store the users preference
for the desired visibility of the Extensions Button. This initial patch
hides the button based on the pref only, and follow-up patches will
adjust the conditions (show the button independently of the pref) and
add UI to toggle this pref.

Differential Revision: https://phabricator.services.mozilla.com/D248155
2025-05-16 12:55:21 +00:00
Rob Wu
3d29b9c917 Bug 1966823 - Ignore rejection from "onMoveToNewWindow" in browser_ext_tabGroups_move.js r=rpl
This is a known source of intermittent failures (bug 1938594).
Analysis in https://bugzilla.mozilla.org/show_bug.cgi?id=1966823#c3

Differential Revision: https://phabricator.services.mozilla.com/D249744
2025-05-16 11:23:44 +00:00
Dão Gottwald
0007fe7bd1 Bug 1966617 - Make adoptTabGroup support both elementIndex and tabIndex, and stop converting tab indices to element indices. r=robwu,sthompson,tabbrowser-reviewers,sessionstore-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D249619
2025-05-16 00:39:26 +00:00
Rob Wu
040f148464 Bug 1966617 - Partial tabGroups.move fix + test coverage r=zombie
Differential Revision: https://phabricator.services.mozilla.com/D249561
2025-05-16 00:39:22 +00:00
Rob Wu
c6223d7101 Bug 1963825 - tabGroups.move index = desired final index r=zombie,tabbrowser-reviewers,dao
To ensure that a group ends up at the position specified by `index`,
this patch adjusts the index when the tab group moves to the right.
Before this patch, the tab group appeared at a too low (left) index
because the original logic did not account for tabs shifting after a
repositioning to the right.

This also introduces stricter validation for moving tabs near pinned
tabs or other tab groups. Previously, the tabbrowser internals adjusted
the index as needed to fit adjacent to pinned tabs or groups. Now, the
extension API throws an error.

The new behavior matches developer expectations and Chrome's behavior:
https://bugzilla.mozilla.org/show_bug.cgi?id=1963825#c9

Differential Revision: https://phabricator.services.mozilla.com/D249493
2025-05-16 00:39:18 +00:00
agoloman
4b62de7961 Revert "Bug 1965343 - Adopt whole tab group at once in replaceGroupWithWindow r=tabbrowser-reviewers,sthompson" for causing bc failures @browser_tab_groups.js.
This reverts commit fac3f86e95.
2025-05-15 18:42:30 +00:00
Rob Wu
fac3f86e95 Bug 1965343 - Adopt whole tab group at once in replaceGroupWithWindow r=tabbrowser-reviewers,sthompson
The `replaceGroupWithWindow` method currently adopts a tab group in
multiple steps, asynchronously. This can result in externally observable
inconsistencies past initial adoption (see bug).

To fix this, this patch changes the adoption logic by passing the tab
group as the initial item to adopt, and adopts the whole group at once
as needed. Now the logic is similar to drag and drop adoption as
implemented in bug 1908441.

Since tabToAdopt is no longer just a tab, but also a tab group (or even
a tab group label since bug 1908441), the logic in ext-browser.js needs
to be adjusted to make sure that it does not mistake non-tab elements
for tabs. Test coverage is in browser_ext_tabGroups_move_onMoved.js,
as not changing that caused the test to fail with:

> FAIL Tab did indeed move to the new window - {"oldWindowId":3,"oldPosition":"undefined"} deepEqual {"oldWindowId":3,"oldPosition":1} -

Differential Revision: https://phabricator.services.mozilla.com/D248537
2025-05-15 13:35:45 +00:00
Rob Wu
525d45a292 Bug 1965007 - Fire tabGroups.onRemoved when window is closing r=zombie
Also add a new removeInfo option to the onRemoved event, with the
isWindowClosing property. This is comparable to the removeInfo parameter
in the tabs.onRemoved event, in case extensions want to special-case the
behavior.

Differential Revision: https://phabricator.services.mozilla.com/D249112
2025-05-14 21:19:29 +00:00
Rob Wu
94716102d0 Bug 1963830 - Reverse TabMove / tabs.onMoved when moving tab groups forwards r=tabbrowser-reviewers,dao
To allow extensions to correctly mirror the positions of tabs that were
bulk-moved by moving a tab group, emit the TabMove event in the reverse
order if the tab group moves forwards. This ensures that the previously
recorded index of a tab before the bulk-move remains valid.

Differential Revision: https://phabricator.services.mozilla.com/D248995
2025-05-14 16:04:08 +00:00
Valentin Gosu
58db94290b Bug 1948543 - Do not use file extension when sniffing mime type r=necko-reviewers,willdurand,kershaw,devtools-reviewers,bomsy,geckoview-reviewers,nalexander
This patch adds a network.sniff.use_extension pref.
When false, the file extension of a URL will only be used to sniff file://

Differential Revision: https://phabricator.services.mozilla.com/D246585
2025-05-13 10:34:58 +00:00
Atila Butkovits
6677b18a72 Revert "Bug 1948543 - Do not use file extension when sniffing mime type r=necko-reviewers,willdurand,kershaw,devtools-reviewers,bomsy,geckoview-reviewers,nalexander" for causing bustages at IndexOutOfBoundsException.
This reverts commit 5eef155802.
2025-05-13 02:30:01 +00:00
Valentin Gosu
5eef155802 Bug 1948543 - Do not use file extension when sniffing mime type r=necko-reviewers,willdurand,kershaw,devtools-reviewers,bomsy,geckoview-reviewers,nalexander
This patch adds a network.sniff.use_extension pref.
When false, the file extension of a URL will only be used to sniff file://

Differential Revision: https://phabricator.services.mozilla.com/D246585
2025-05-13 01:48:28 +00:00
Emilio Cobos Álvarez
02216609fd Bug 1965660 - Remove unneeded ::-moz-focus-inner usage from the front-end. r=devtools-reviewers,webcompat-reviewers,twisniewski,nchevobbe
These became unneeded either when:

 * We shipped the non-native theme (for newtab etc).
 * We made unthemed buttons not show this inner ring.

Differential Revision: https://phabricator.services.mozilla.com/D248698
2025-05-12 15:18:37 +00:00
Rob Wu
c2fb04ffe8 Bug 1965714 - Drop optional from queryInfo in tabGroups.query() r=zombie
Differential Revision: https://phabricator.services.mozilla.com/D248716
2025-05-12 02:20:24 +00:00
Rob Wu
e7af560fb9 Bug 1965057 - Set isAdoptingGroup in replaceGroupWithWindow r=tabbrowser-reviewers,sthompson
The tabGroups.onRemoved / onCreated / onMoved event depends on the
isAdoptingGroup / removedByAdoption flags to identify tab groups that are
adopted by another window. Although this flag is set for the
`gBrowser.adoptTabGroup` method, it is not in the
`gBrowser.replaceGroupWithWindow` method, which results in incorrect
events.

This patch fixes the issue by setting the isAdoptingGroup flag in
`gBrowser.replaceGroupWithWindow`.

Differential Revision: https://phabricator.services.mozilla.com/D248327
2025-05-08 23:36:16 +00:00
Rob Wu
eafe92dd52 Bug 1965083 - Add private browsing checks to tabGroups events r=zombie
Differential Revision: https://phabricator.services.mozilla.com/D248441
2025-05-08 18:05:28 +00:00
Rob Wu
38b9ddf35c Bug 1963616 - Don't try adding action context menus without permission r=willdurand
When an extension does not have the contextMenus or menus permission,
it is not possible to have extension-defined context menus on an
extension's action button. The actionContextMenu() call would never
add menu items in this case.

As the bug report shows, trying to call actionContextMenu() can throw
an error when the ext-menus.js module has not been loaded. To avoid
this error, verify that the extension has the permission to add menus.

Because ext-menus.js is declared with `"events": ["startup"]`, the
module is guaranteed to be loaded if an extension has the permissions.

Differential Revision: https://phabricator.services.mozilla.com/D248154
2025-05-07 23:27:01 +00:00
Sandor Molnar
793b19de78 Revert "Bug 1948543 - Do not use file extension when sniffing mime type r=necko-reviewers,willdurand,kershaw,devtools-reviewers,bomsy" for causing android gv-junit failures.
This reverts commit f1a97648e9.
2025-05-07 14:55:56 +00:00
Valentin Gosu
f1a97648e9 Bug 1948543 - Do not use file extension when sniffing mime type r=necko-reviewers,willdurand,kershaw,devtools-reviewers,bomsy
This patch adds a network.sniff.use_extension pref.
When false, the file extension of a URL will only be used to sniff file://

Differential Revision: https://phabricator.services.mozilla.com/D246585
2025-05-07 12:21:40 +00:00
Cristina Horotan
9e3f67048c Revert "Bug 1948543 - Do not use file extension when sniffing mime type r=necko-reviewers,willdurand,kershaw" for causing dt failures at 7f63794d20
This reverts commit 7f63794d20.
2025-05-07 00:39:21 +00:00
Valentin Gosu
7f63794d20 Bug 1948543 - Do not use file extension when sniffing mime type r=necko-reviewers,willdurand,kershaw
This patch adds a network.sniff.use_extension pref.
When false, the file extension of a URL will only be used to sniff file://

Differential Revision: https://phabricator.services.mozilla.com/D246585
2025-05-06 23:08:50 +00:00
Jeremy Swinarton
186b5eaa63 Bug 1964152: Dispatch TabGrouped and TabUngrouped from the tab group, not the tab r=dao,sthompson,tabbrowser-reviewers,zombie
Differential Revision: https://phabricator.services.mozilla.com/D247660
2025-05-06 15:43:04 +00:00
William Durand
7ca91393b3 Bug 1956488 - Add sections to the add-on install/update/optional prompts. r=rpl,fluent-reviewers,desktop-theme-reviewers,dao,bolsson
Differential Revision: https://phabricator.services.mozilla.com/D247088
2025-05-06 14:03:24 +00:00
Rob Wu
2f6ff59ac1 Bug 1962683 - Avoid missed event in browser_ext_tabs_group_ungroup.js r=zombie
This patch moves the tabs API calls after the tabGroups event call,
which increases the likelihood that the tabGroups implementation loads
(with the event registered) before tabs.group() is called, to address
https://bugzilla.mozilla.org/show_bug.cgi?id=1962683#c3

Differential Revision: https://phabricator.services.mozilla.com/D246779
2025-04-29 18:23:26 +00:00
Norisz Fay
af318eba45 Backed out changeset f03d4b22573f (bug 1962683) for causing mochitest failures on browser_ext_tabs_group_ungroup.js CLOSED TREE 2025-04-29 17:16:13 +03:00
Rob Wu
e6e595260e Bug 1962683 - Avoid missed event in browser_ext_tabs_group_ungroup.js r=zombie
This patch moves the tabs API calls after the tabGroups event call,
which increases the likelihood that the tabGroups implementation loads
(with the event registered) before tabs.group() is called, to address
https://bugzilla.mozilla.org/show_bug.cgi?id=1962683#c3

Differential Revision: https://phabricator.services.mozilla.com/D246779
2025-04-29 13:14:56 +00:00
Rob Wu
f196bdf30a Bug 1962683 - Temporarily skip intermittently failing test assertion r=zombie
Differential Revision: https://phabricator.services.mozilla.com/D246744
2025-04-25 13:44:46 +00:00
Rob Wu
d808e75edb Bug 1960126 - Split browser_ext_tabs_group_ungroup.js r=zombie
Differential Revision: https://phabricator.services.mozilla.com/D246703
2025-04-25 13:44:46 +00:00
Rob Wu
6521fc35e2 Bug 1962592 - Reduce tab moves in adoptTabGroup r=tabbrowser-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D246702
2025-04-25 13:44:46 +00:00
Rob Wu
6899ed5a68 Bug 1962592 - Avoid unnecessary tabs.onMoved when moving tab groups r=zombie
This patch covers multiple cases:

- Pre-existing issue: adoptTabGroup adopts tabs by first moving the tabs
  elsewhere, then moving it into a group. When moved into a group,
  TabMove is fired, which previously translated to tabs.onMoved. That
  would result in too much event noise.

- When tabGroups.move is called, it first adopted the tab group in
  another window, and then moved the tab group as a whole. This
  results in unnecessary tabs.onMoved events too. The fix is to specify
  the desired position at once to adoptTabGroup.

Differential Revision: https://phabricator.services.mozilla.com/D246701
2025-04-25 13:44:46 +00:00
Rob Wu
cbf77f8d55 Bug 1962475 - Do not fire tabGroups.onRemoved and onCreated when moving across windows r=zombie,tabbrowser-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D246688
2025-04-25 13:44:45 +00:00
zombie
57343ff9a1 Bug 1962127 - Split tabGroups_move_onMoved to a separate test r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D246696
2025-04-25 13:44:45 +00:00
zombie
4bcea23706 Bug 1962127 - Implement tabGroups.query r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D246658
2025-04-25 13:44:45 +00:00
zombie
60be587fd4 Bug 1961663 - Implement tabGroups.onCreated and onRemoved r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D246529
2025-04-25 13:44:45 +00:00
zombie
7063143eaf Bug 1961660 - Implement tabGroups.move and onMoved r=robwu,tabbrowser-reviewers,dwalker,sthompson
Differential Revision: https://phabricator.services.mozilla.com/D246378
2025-04-25 13:44:44 +00:00
zombie
0f0180e660 Bug 1961657 - Implement tabGroups.update and onUpdated r=robwu,tabbrowser-reviewers,dwalker,sthompson
Differential Revision: https://phabricator.services.mozilla.com/D246164
2025-04-25 13:44:44 +00:00
zombie
bdc8557b9e Bug 1961539 - Introduce tabGroups, implement tabGroups.get r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D246120
2025-04-25 13:44:44 +00:00