Commit graph

1094 commits

Author SHA1 Message Date
Gregory Pappas
8a35d5cf5f Bug 1845311 - [Part 2] Use ChromeUtils.defineLazyGetter in more places r=arai,webcompat-reviewers,necko-reviewers,extension-reviewers,settings-reviewers,application-update-reviewers,credential-management-reviewers,devtools-reviewers,fxview-reviewers,sync-reviewers,anti-tracking-reviewers,tabbrowser-reviewers,bytesized,twisniewski,sgalich,mak,kershaw,sclements,pbz,robwu,geckoview-reviewers,amejiamarmol
Differential Revision: https://phabricator.services.mozilla.com/D184623
2023-08-01 23:01:02 +00:00
Sam Foster
584ea48db5 Bug 1843755 - Fix the missing 'Reopen all tabs' button and add a test for it. r=sclements,sessionstore-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D183919
2023-07-19 16:56:56 +00:00
Sam Foster
224b568ae4 Bug 1819675 - Introduce a feature pref to toggle the recently-closed tabs from all windows behavior.r=sclements,dao,extension-reviewers,fxview-reviewers,robwu,sessionstore-reviewers
* Add a default-true pref to provide an escape hatch allowing us to revert to previous behavior
* in which recently-closed tabs are per-window,
* and undoing closed tabs restores them to the window they were closed from.
* Ensure we set the pref for tests which depend on its value
* Add some spot-checks in tests with the pref off

Differential Revision: https://phabricator.services.mozilla.com/D179574
2023-07-06 22:49:52 +00:00
Sam Foster
a24c7b1d6b Bug 1819675 - Include tabs from all windows in all views of recently-closed tabs and re-open them into the current window. r=dao,sclements,fxview-reviewers,fluent-reviewers,flod,robwu,sessionstore-reviewers,tabbrowser-reviewers
* Menu Bar History menu recently-closed tab items includes closed tabs from all currently-open windows
* Toolbar/Appmenu history menu recently-closed tabs list includes closed tabs from all currently-open windows
* Firefox view recently-closed tab list includes closed tabs from all currently-open windows
* All recently-closed tab menu/items re-open in the current window
* Re-open all tabs menu item re-opens all tabs into the current window

* Ensure we filter out tabs without any useful state in firefox-view
* Add a target window argument to undoCloseTab and undoCloseById
* undoCloseTab will remove the tab data from the source window collection and re-open the tab into the target window
* Add an options argument to SessionStore.getWindows to get all private or non-private windows
* Add a getWindowForTabClosedId method on SessionStore, allowing look-up of the window associated with a closed tab
* Ensure recently-closed tab lists only include tabs from non-private windows when attached (i.e. opened from) a non-private window. And vice-versa.
* Update the sessionstore closed tab tests to assert on the new behavior

* Update the browser.sessions.restore implementation to always find and pass the source window when restoring a closed tab
* sessions.restore should always restore closed tabs to the source window as there's no implicit top or current window in the API context

Differential Revision: https://phabricator.services.mozilla.com/D174501
2023-07-06 22:49:52 +00:00
Cosmin Sabou
f16c094fd9 Backed out 2 changesets (bug 1819675) for causing a spike in wpt and browser-chrome failures.
Backed out changeset aa4368bfb81a (bug 1819675)
Backed out changeset e5be8edfd9cf (bug 1819675)
2023-07-08 13:44:40 +03:00
Sam Foster
a4876c8eb5 Bug 1819675 - Introduce a feature pref to toggle the recently-closed tabs from all windows behavior.r=sclements,dao,extension-reviewers,fxview-reviewers,robwu,sessionstore-reviewers
* Add a default-true pref to provide an escape hatch allowing us to revert to previous behavior
* in which recently-closed tabs are per-window,
* and undoing closed tabs restores them to the window they were closed from.
* Ensure we set the pref for tests which depend on its value
* Add some spot-checks in tests with the pref off

Differential Revision: https://phabricator.services.mozilla.com/D179574
2023-07-06 22:49:52 +00:00
Sam Foster
39d8ed9ddf Bug 1819675 - Include tabs from all windows in all views of recently-closed tabs and re-open them into the current window. r=dao,sclements,fxview-reviewers,fluent-reviewers,flod,robwu,sessionstore-reviewers,tabbrowser-reviewers
* Menu Bar History menu recently-closed tab items includes closed tabs from all currently-open windows
* Toolbar/Appmenu history menu recently-closed tabs list includes closed tabs from all currently-open windows
* Firefox view recently-closed tab list includes closed tabs from all currently-open windows
* All recently-closed tab menu/items re-open in the current window
* Re-open all tabs menu item re-opens all tabs into the current window

* Ensure we filter out tabs without any useful state in firefox-view
* Add a target window argument to undoCloseTab and undoCloseById
* undoCloseTab will remove the tab data from the source window collection and re-open the tab into the target window
* Add an options argument to SessionStore.getWindows to get all private or non-private windows
* Add a getWindowForTabClosedId method on SessionStore, allowing look-up of the window associated with a closed tab
* Ensure recently-closed tab lists only include tabs from non-private windows when attached (i.e. opened from) a non-private window. And vice-versa.
* Update the sessionstore closed tab tests to assert on the new behavior

* Update the browser.sessions.restore implementation to always find and pass the source window when restoring a closed tab
* sessions.restore should always restore closed tabs to the source window as there's no implicit top or current window in the API context

Differential Revision: https://phabricator.services.mozilla.com/D174501
2023-07-06 22:49:52 +00:00
Mike Conley
8599b428fb Bug 1839844 - Wait for about:addons to finish loading in browser_create_button_widget to avoid a frequent leak complaint. r=niklas
Differential Revision: https://phabricator.services.mozilla.com/D182264
2023-06-28 16:55:20 +00:00
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
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
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
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
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
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
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
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
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
Mark Banner
7a655466af Bug 1817183 - Update consumers of services/fxaccounts to import ES modules directly. r=markh,settings-reviewers,credential-management-reviewers,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D170062
2023-02-17 16:34:43 +00:00
Cristian Tuns
b3bf09cc0d Backed out 6 changesets (bug 1816934, bug 1817182, bug 1817179, bug 1817183) for causing dt failures in browser_jsterm_autocomplete_null.js CLOSED TREE
Backed out changeset 17d4c013ed92 (bug 1817183)
Backed out changeset cfed8d9c23f3 (bug 1817183)
Backed out changeset 62fe2f589efe (bug 1817182)
Backed out changeset 557bd773fb85 (bug 1817179)
Backed out changeset 7f8a7865868b (bug 1816934)
Backed out changeset d6c1d4c0d2a0 (bug 1816934)
2023-02-17 10:51:33 -05:00
Mark Banner
0ba34b9422 Bug 1817183 - Update consumers of services/fxaccounts to import ES modules directly. r=markh,settings-reviewers,credential-management-reviewers,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D170062
2023-02-17 09:01:45 +00:00
Joel Maher
a62ef05cdb 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
Mark Banner
cdf8548a04 Bug 1814931 - Convert services/sync imports to direct ES imports. r=markh,settings-reviewers,credential-management-reviewers,mconley,dimi
Differential Revision: https://phabricator.services.mozilla.com/D168837
2023-02-13 11:44:29 +00:00
Emilio Cobos Álvarez
44fdb70956 Bug 1815866 - Test. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D169397
2023-02-10 11:39:08 +00:00
Mike Conley
1bf577cba5 Bug 1801266 - Add CustomizableUI.getCollapsedToolbarIds. r=sclements,Gijs
This returns a Set of all registered toolbar areas that are collapsed by default.

Differential Revision: https://phabricator.services.mozilla.com/D163021
2023-02-06 18:31:39 +00:00
Gijs Kruitbosch
96480e22fb Bug 1795255 - bustage fix: fix up some more imports that shouldn't have been removed because of confused environment conflicts. CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D168379
2023-01-31 13:07:58 +00:00
Gijs Kruitbosch
efef52fc92 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
Emilio Cobos Álvarez
46dd8a0d40 Bug 1811487 - Clean-up popup hide / rollup APIs. r=cmartin,stransky
I'm about to extend them for bug 1811486, where I want to force in some
cases the rolled up popups to hide synchronously. These APIs use a ton
of boolean arguments that make them error prone, so refactor them a bit
to use strongly typed enums and flags.

Differential Revision: https://phabricator.services.mozilla.com/D167381
2023-01-24 15:43:49 +00:00
Mike Conley
5de446476e Bug 1805236 - Make the Unified Extensions migration a one-time event using the CUI migration mechanism. r=Gijs
We ran the Unified Extensions migration method on each CUI init on the
off-chance that we would need to turn off or reverse the migration for
some reason.

Now that 109 has rolled out successfully, we can make this a one-time
migration for anybody that isn't following each version (for example,
ESR channel users).

Differential Revision: https://phabricator.services.mozilla.com/D167584
2023-01-24 14:19:05 +00:00
Iulian Moraru
a713f3dd73 Backed out changeset f9a25f51a254 (bug 1811487) for causing bc failures related to PanelMultiView. CLOSED TREE 2023-01-23 21:11:43 +02:00
Emilio Cobos Álvarez
e8d9ad8d88 Bug 1811487 - Clean-up popup hide / rollup APIs. r=cmartin
I'm about to extend them for bug 1811486, where I want to force in some
cases the rolled up popups to hide synchronously. These APIs use a ton
of boolean arguments that make them error prone, so refactor them a bit
to use strongly typed enums and flags.

Differential Revision: https://phabricator.services.mozilla.com/D167381
2023-01-23 16:15:00 +00:00
William Durand
a1f393ad66 Bug 1799009 - Remove gUnifiedExtensions.isEnabled. r=rpl,mconley
Depends on D166923

Differential Revision: https://phabricator.services.mozilla.com/D166934
2023-01-23 10:39:29 +00:00
Mark Banner
a94fe03b9d 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
9946c4fcbb 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
William Durand
09093658ff Bug 1799009 - Remove unified extensions pref and non-unified extensions variants from test suite. r=rpl,mconley,fluent-reviewers,desktop-theme-reviewers,Itiel
This patch removes the use of the "unified extensions" pref and adjust
the existing tests. More clean-ups will be done in follow-ups, e.g. the
removal of `gUnifiedExtensions.isEnabled` and some test-only changes to
no longer create a new window in each test file.

Differential Revision: https://phabricator.services.mozilla.com/D166908
2023-01-19 10:59:25 +00:00
Oriol Brufau
ef235398aa Bug 1808615 - Make addTab default skipLoad to createLazyBrowser. r=Gijs,extension-reviewers,nika,robwu
And make callers rely on that instead of allowInheritPrincipal when
creating lazy tabs.

Unlike allowInheritPrincipal, skipLoad sets the nodefaultsrc attribute.
This avoids a load instead of falling back to about:blank.

One consequence of that is that switching to a lazy about:blank tab will
not notify invoke listeners registered with addTabsProgressListener
(listeners registered with addProgressListener will still be invoked).

Thus test browser_open_in_lazy_tab.js needs to be updated.

Differential Revision: https://phabricator.services.mozilla.com/D166012
2023-01-07 13:51:47 +00:00
Sandor Molnar
95e5493162 Backed out 4 changesets (bug 1631735) for causing bug 1806355 CLOSED TREE
Backed out changeset 781c1031c032 (bug 1631735)
Backed out changeset a6d345a47718 (bug 1631735)
Backed out changeset 4b8cc0917731 (bug 1631735)
Backed out changeset fe09769d7d5a (bug 1631735)
2022-12-20 11:25:25 +02:00
Brad Werth
8831fc8624 Bug 1631735 Part 2: Remove waiting for visibilitychange events from fullscreen tests. r=mstange
Since macOS fullscreen can handle incoming fullscreen requests during a
fullscreen transition, it is no longer necessary to check for
visibilitychange events, which are also no longer fired during these
tests.

Differential Revision: https://phabricator.services.mozilla.com/D164247
2022-12-16 22:36:20 +00:00
Emilio Cobos Álvarez
a14c746228 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