Commit graph

2737 commits

Author SHA1 Message Date
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
Butkovits Atila
f8a9ce74db Backed out changeset aaf82d1483ad (bug 1801019) for causing failures at browser_screenshots_telemetry_tests.js. CLOSED TREE 2023-02-21 23:04:05 +02:00
Niklas Baumgardner
ab7aa855c8 Bug 1801019 - Add telemetry for screenshots component. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D164948
2023-02-21 19:59:09 +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
Andreas Pehrson
ce6e191224 Bug 1816693 - In PanelMultiView.jsm don't tie the openPopup args to the main window lifetime through the cancelCallback capture. r=Gijs
It appears that even a noop function `() => {}` will capture the entire scope,
so this patch also changes the normal state of the cancel callback to be
undefined.

Differential Revision: https://phabricator.services.mozilla.com/D170039
2023-02-16 12:34:40 +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
Itiel
bb430b7130 Bug 1815130 - Handle custom panel headers better when they are in the overflow panel r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D169253
2023-02-13 17:33:54 +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
Emilio Cobos Álvarez
0bcd46b1b0 Bug 1815866 - Notify for DOM changes when nodes are moved to the palette due to area reset. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D169357
2023-02-09 23:21:14 +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
Marian-Vasile Laza
68dfb2fe1d Backed out changeset a55825557cf0 (bug 984589) for bc failures on browser_identityPopup_focus.js. CLOSED TREE 2023-02-04 00:26:30 +02:00
Amy Churchwell
04cca1a961 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-02-03 21:27:18 +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
Rob Wu
0c3022d4ac Bug 1811459 - Avoid _moveOutKids on disconnected panelmultiview r=Gijs,rpl
`this.forNode` (with `this` being a `PanelMultiView` instance) may
return a node that was already disconnected before, in which case its
`node` member will be void. To avoid unexpected promise rejections, add
a null check before `_moveOutKids()`.

Differential Revision: https://phabricator.services.mozilla.com/D167369
2023-01-30 14:43:24 +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
Gijs Kruitbosch
3762db01b9 Bug 1475606 - remove loadOneTab and switch its callers over, r=dao,perftest-reviewers,sparky
Depends on D165774

Differential Revision: https://phabricator.services.mozilla.com/D165775
2023-01-03 22:24:44 +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
Marco Bonardo
74f9ed119f Bug 1805889 - Stop abusing the options object in the Panel View. r=Gijs
Make Places views constructors arguments more coherent, passing the root
and view elements up to the super class explicitly.
Remove the options argument, that was not strictly necessary, the same info can
be obtained directly.
Rename the "builder" attribute to "afterplacescontent" to clarify what it is
and make panel use it, instead of passing an insertionPoint option.

Additional cleanups:
Make chevron and BMB menus use coherent popupshowing observers.
Remove useless .viewElt accessor, .associatedElement can be used instead.
Avoid an access to the private _rootElt property from the controller.

Differential Revision: https://phabricator.services.mozilla.com/D164827
2022-12-19 10:18:22 +00: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
Cristian Tuns
b638ccfac9 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
be1f057109 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
Shane Hughes
fb5d56588d Bug 1805360 - Fix FxA panel separators. r=mconley
Replace menuseparator -> toolbarseparator in the FxA panel.

Differential Revision: https://phabricator.services.mozilla.com/D164537
2022-12-13 18:49:56 +00:00
Gijs Kruitbosch
38d4b2f917 Bug 1803158 - convert session restore consumers to reference the sys.mjs files instead, r=webdriver-reviewers,perftest-reviewers,extension-reviewers,credential-management-reviewers,Standard8,sgalich,whimboo,sparky,willdurand
Differential Revision: https://phabricator.services.mozilla.com/D163350
2022-12-06 16:02:03 +00:00
Mike Conley
1dea2f808d Bug 1801678 - Compute the right insertion point for a browser action widget when the toolbar is overflowed. r=Gijs
We have a function, OverflowableToolbar.findOverflowedInsertionPoints, whose job it is to compute
the right insertion point for a widget if the widget is being inserted into an overflowable
toolbar.

That function failed to account for the possibility that the widget was a browser action, and
would return the #defaultList instead of the #webExtList if the item was overflowing. This
patch checks the ID of the widget first, and then supplies the correct list.

Differential Revision: https://phabricator.services.mozilla.com/D162586
2022-11-24 18:51:19 +00:00
Mike Conley
62b8b0976b Bug 1801678 - Refactor OverflowableToolbar to turn #webExtList into a memoizing getter. r=Gijs
The WebExtension overflow list is created lazily because the panel itself is lazy, and only gets
inserted the first time it is needed. Originally, I had written a separate function `#getWebExtList()`
to do the work of forcing the WebExtension overflow list to de-lazify, and then hold a reference
to it in #webExtList.

It turns out, that's a bit of a footgun. More than once, I've used #webExtList directly, forgetting
that the value might turn out to be `null` because the list hasn't delazified yet.

In order to smooth out that rough edge, this patch makes `#webExtList` a memoizing (evalutes once,
caches the return value for subsequent calls) getter so that anything that uses it doesn't have
to worry about the lazification. The reference member is now called #webExtListRef, and I've
added documentation about how it's probably best not to use it directly.

Differential Revision: https://phabricator.services.mozilla.com/D162585
2022-11-24 18:51:19 +00:00
Mike Conley
5c458d3f99 Bug 1798377 - Don't display the overflow button unless there's at least 1 item overflowed with non-zero width. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D162576
2022-11-24 18:51:18 +00:00
Mike Conley
bc3e16afed Bug 1800967 - Update internal OverflowableToolbar state when unpinning an extension button from the toolbar when overflowed. r=willdurand,Gijs
We have some internal bookkeeping within OverflowableToolbar to remember the state of things that
have overflowed, like how wide the window needs to be before they can be moved back, etc. When an
item is removed from an overflowable toolbar while overflowed, we update that internal bookkeeping
so that OverflowableToolbar doesn't accidentally try to move those items back into the toolbar
when the window becomes wide enough again.

We've added a new overflow list for extension buttons, but we weren't updating our internal accounting
when items had been overflowed into that list. This patch fixes that.

Differential Revision: https://phabricator.services.mozilla.com/D162434
2022-11-24 18:51:18 +00:00
Itiel
1367cf8302 Bug 1577257 - Share logic behind panel headers across the UI r=willdurand,Gijs,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D160972
2022-11-17 21:34:34 +00:00