Commit Graph

4088 Commits

Author SHA1 Message Date
Joel Maher
397e8ec3f4 Bug 1961608 - Green up macosx 15.30. r=aryx,necko-reviewers,extension-reviewers,media-playback-reviewers,credential-management-reviewers,sync-reviewers,anti-tracking-reviewers,sessionstore-reviewers,places-reviewers,omc-reviewers,profiles-reviewers,pdahiya,alwu,jhirsch,mtigley,skhamis,timhuang,valentin,robwu,nsharpley
Differential Revision: https://phabricator.services.mozilla.com/D246100
2025-04-22 18:12:28 +00:00
Stephanie Cunnane
8a13f6721b Bug 1961038 - Consistently use "changeReason" rather than "changeSource" in code related to search.engine.default.changed Glean event telemetry. r=search-reviewers,jteow
Differential Revision: https://phabricator.services.mozilla.com/D245820
2025-04-17 21:19:43 +00:00
Joel Maher
986c1b9cc2 Bug 1959265 - clean and sanitize browser/**/xpcshell.toml files. r=aryx,credential-management-reviewers,search-reviewers,sessionstore-reviewers,places-reviewers,omc-reviewers,migration-reviewers,backup-reviewers,home-newtab-reviewers,urlbar-reviewers,firefox-ai-ml-reviewers,profiles-reviewers,willdurand,tarek,dimi,jteow,sthompson,mconley,pdahiya,mossop
Differential Revision: https://phabricator.services.mozilla.com/D244829
2025-04-17 18:30:44 +00:00
William Durand
9088de1e2d Bug 1954525 - Add support for data collection permissions in browser.permissions.request(). r=rpl,fluent-reviewers,bolsson
Differential Revision: https://phabricator.services.mozilla.com/D244817
2025-04-15 16:22:22 +00:00
Rob Wu
d1ae025d4a Bug 1959716 - Support groupId in tabs.onUpdated (desktop only) r=zombie,dao
Note: only implemented in desktop Firefox. On mobile, the tab groups
feature does not exist, so tabs.onUpdated would never fire. The
mobile-specific tabs.json schema does not declare "properties" filter
either, so there is no place to list the "groupId" filter either.

Differential Revision: https://phabricator.services.mozilla.com/D245264
2025-04-11 23:07:16 +00:00
Rob Wu
3e9aa82468 Bug 1959714 - Implement tabs.group() and tabs.ungroup() r=zombie,dao,frontend-codestyle-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D245249
2025-04-11 23:07:15 +00:00
Rob Wu
05a677bb1f Bug 1959715 - Support groupId in tabs.query r=zombie
Differential Revision: https://phabricator.services.mozilla.com/D245160
2025-04-11 23:07:15 +00:00
Rob Wu
2004e55a76 Bug 1959713 - Expose tabs.Tab.groupId r=zombie,dao,tabbrowser-reviewers,frontend-codestyle-reviewers
This patch exposes a groupId field on tabs.Tab objects in extensions.

On mobile (Android), the value is always -1.

On desktop, the value is the numeric representation composed from the
internal ID, which happens to fit in a safe integer. As long as the
browser is not running past year 2255, this works. As a fallback,
when an ID in a different format is encountered, the logic falls back
to returning a new unique ID based on a counter. This ID is then
stored in an internal in-memory map to maintain stable consistency.
Since it is unclear when exactly it is safe to discard this value, this
map is never cleared. This minor memory leak is acceptable because it
does not happen in practice, and even if it does, the number of tab
groups over the lifetime of a Firefox session is not going to reach
excessive values.

Differential Revision: https://phabricator.services.mozilla.com/D245159
2025-04-11 23:07:15 +00:00
Stephen Thompson
f2e07044ae Bug 1938424 - metrics event when tabs added to tab group r=dao,jswinarton,tabbrowser-reviewers,extension-reviewers,robwu
When using the tab context menu or drag-dropping tabs to put them into a group, record a metric for the number of tabs added to the group.

Data Science asked us to launch with this metric disabled so that they could control it using server knobs. They expect a high volume of events, so they expect to only enable this metric for some proportion of users.

I converted the existing `TabMove` event derived from `UIEvent` being fired when tabs change their tab index in the tab strip. `UIEvent` doesn't allow for attaching additional context/detail to the event. `TabMove` is now a `CustomEvent` that provides more context about the moved tab and it fires in more cases -- it's possible for the tab index not to change despite the tab having "moved" into/out of a tab group.

This approach would not capture tab movements that occur across multiple frames/event loop iterations.

Differential Revision: https://phabricator.services.mozilla.com/D244616
2025-04-11 13:52:22 +00:00
Gregory Pappas
2c1c232662 Bug 1959061 - Remove overflow/underflow event prefs r=extension-reviewers,emilio,robwu
And use counters

Differential Revision: https://phabricator.services.mozilla.com/D244718
2025-04-08 23:48:03 +00:00
Goloman Adrian
dbfe2fbd57 Backed out changeset 8df80a696c61 (bug 1959061) for causing multiple failures. CLOSED TREE 2025-04-08 17:20:57 +03:00
Gregory Pappas
822da8e785 Bug 1959061 - Remove overflow/underflow event prefs r=extension-reviewers,emilio,robwu
And use counters

Differential Revision: https://phabricator.services.mozilla.com/D244718
2025-04-08 13:22:30 +00:00
Cosmin Sabou
51285c4191 Backed out changeset 65d8bcd98b49 (bug 1959061) for causing build bustages on ScrollContainerFrame. CLOSED TREE 2025-04-08 16:11:10 +03:00
Gregory Pappas
da085e844a Bug 1959061 - Remove overflow/underflow event prefs r=extension-reviewers,emilio,robwu
And use counters

Differential Revision: https://phabricator.services.mozilla.com/D244718
2025-04-08 12:22:39 +00:00
Emilio Cobos Álvarez
67622dd14f Bug 1956758 - Fix a typo in a test.
MANUAL PUSH: Trivial orange fix CLOSED TREE
2025-04-04 13:54:42 +02:00
Emilio Cobos Álvarez
c5bf0c134a Bug 1956758 - Expose whether we use a "native" menubar at runtime. r=stransky,desktop-theme-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D243431
2025-04-04 09:16:33 +00:00
Luca Greco
31e6a83040 Bug 1935135 - Add requestLongerTimeout to browser_ext_browserAction_context.js. r=willdurand
The TV job failures hit so far seems to be both due to the per-testfile timeout being reached before all tasks
in this test file got a chance to run, and in both cases it was hit in chaos mode and on macOS build.

This patch adds a requestLongerTimeout call to increase the per-testfile timeout, which should give the test file
enough time for passing the TV job even when in macOS builds and chaos mode it may be taking slighly longer.

Differential Revision: https://phabricator.services.mozilla.com/D231423
2025-04-01 12:00:18 +00:00
William Durand
22e82b9c44 Bug 1957087 - Update add-on install/update prompt. r=rpl,desktop-theme-reviewers,Itiel
Differential Revision: https://phabricator.services.mozilla.com/D243455
2025-04-01 11:50:44 +00:00
Dão Gottwald
3ba48b6655 Bug 1950904 - Use element index instead of tab index for the drop indicator. r=dwalker,jswinarton,tabbrowser-reviewers,perftest-reviewers,fbilt
Differential Revision: https://phabricator.services.mozilla.com/D239937
2025-03-19 15:07:53 +00:00
erosman
c317879254 Bug 1951166 - Allow page_action as context menu type in MV3 r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D240376
2025-03-05 10:35:44 +00:00
Mark Banner
878a5d5415 Bug 1951652 - Convert browser/components/search/ modules to use moz-src uris. r=search-reviewers,scunnane
Differential Revision: https://phabricator.services.mozilla.com/D240333
2025-03-05 09:24:37 +00:00
William Durand
c8b7fe3ad9 Bug 1659500 - Disable contextualIdentities API on GeckoView builds. r=robwu
Depends on D240002

Differential Revision: https://phabricator.services.mozilla.com/D238525
2025-03-03 14:14:38 +00:00
Gijs Kruitbosch
dcb8be8cff Bug 1950871 - switch browser/components/tabbrowser to use moz-src, r=dao,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D239926
2025-03-03 12:47:49 +00:00
Andrea Marchesini
c1c6a9d919 Bug 1917847 - Remove "extensions.ui.installDialogFullDomains" pref, r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D236687
2025-03-03 08:31:43 +00:00
Rob Wu
d5d91000ab Bug 1949946 - Fix typo in pref in browser_ext_canOpenModalPicker.js test r=extension-reviewers,willdurand
Differential Revision: https://phabricator.services.mozilla.com/D239248
2025-02-24 14:08:48 +00:00
Rob Wu
2b9e9d3154 Bug 1949587 - Restore picker behavior for hidden extension pages r=edgar
Since Firefox 136, pickers cannot be opened from non-focused tabs.
Unintentionally, background pages of extensions and devtools pages of
extensions were also affected, because their browsers are embedded in a
hidden XUL window, which is considered not focused.

This patch updates CanonicalBrowsingContext::CanOpenModalPicker to allow
pickers to be opened from specific hidden extension browsers again.

To evaluate the feasibility of enforcing the restriction for hidden
background pages, this patch puts the restriction behind a pref,
enabled by default on Nightly only. If no signs of broken extensions
are reported for a few releases, we can set the pref by default, to
enforce the restriction (and document the change accordingly).
After another few releases we can evaluate whether to enforce the
restriction permanently (effectively removing the exception from
this patch) or to revert the pref.

Differential Revision: https://phabricator.services.mozilla.com/D239046
2025-02-21 19:02:19 +00:00
Joel Maher
6d2e459f55 Bug 1948426 - Carry over annotations from macosx 11.20 to 15.30. r=aryx,pip-reviewers,sessionstore-reviewers,tabbrowser-reviewers,urlbar-reviewers,jteow,nsharpley,mconley
Differential Revision: https://phabricator.services.mozilla.com/D238336
2025-02-20 22:03:44 +00:00
Rob Wu
ff0298c05d Bug 1949092 - Fix canOpenModalPicker for nested browsers + tests r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D238843
2025-02-20 21:38:40 +00:00
Meg Viar
7c54ffb59e Bug 1946446 - Update about:rights r=geckoview-reviewers,desktop-theme-reviewers,fluent-reviewers,dao,flod,m_kato,sessionstore-reviewers,Gijs,nsharpley
- Redirect about:rights to terms page
  - Remove code related to old in-tree about:rights page

[[ https://mozilla-hub.atlassian.net/browse/FIDE-2485 | See Jira ticket ]]

Differential Revision: https://phabricator.services.mozilla.com/D237913
2025-02-18 18:27:15 +00:00
Tooru Fujisawa
38bcd773fa Bug 1947063 - Part 1: Add bypassCache option to BrowserTestUtils.reloadTab. r=mossop,devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D237560
2025-02-14 15:10:35 +00:00
Emilio Cobos Álvarez
300a114109 Bug 1947023 - Propagate hidden-under-embedder properly to nested tops. r=nika,devtools-reviewers,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D237502
2025-02-10 17:50:57 +00:00
Rob Wu
0083780043 Bug 1945303 - Add missing await in test_ext_manifest_commands.js r=willdurand
Differential Revision: https://phabricator.services.mozilla.com/D237083
2025-02-07 02:55:37 +00:00
Moritz Beier
3ef77c7282 Bug 1880913 - Part 2: Move search request handling from browser.js to SearchUIUtils. r=search-reviewers,firefox-desktop-core-reviewers ,mossop,scunnane
Differential Revision: https://phabricator.services.mozilla.com/D235596
2025-02-04 11:07:11 +00:00
Matt Mower
2b6183fd48 Bug 1538451 - Add openShortcutSettings() to browser.commands extension API. r=robwu,desktop-theme-reviewers,dao
- Introduce browser.commands.openShortcutSettings() method that can be
  called by extensions to open the shortcuts view in AddonManager. The
  extension's own shortcuts card is focused and scrolled into view.
- Add mochitests to verify:
  - AddonManager tab is opened or reused if already open when
    openShortcutSettings() is called.
  - AddonManager view is correctly set to shortcuts when
    openShortcutSettings() is called. The extension's own shortcuts card
    can be found in the page and is focused.
  - openShortcutSettings() works even when commands is an empty object
    in the manifest.
  - openShortcutSettings() is not available when commands is not defined
    in the manifest.

Supersedes https://bugzilla.mozilla.org/attachment.cgi?id=9183595 which
appears to be abandoned.

Differential Revision: https://phabricator.services.mozilla.com/D217920
2025-02-03 17:19:03 +00:00
Emilio Cobos Álvarez
79c93cc546 Bug 581863 - Web ext fixes. r=robwu
* In ext-windows.js, set the position and size on creation. This moves
   the burden of doing so to widget, and could avoid flickering.

 * In browser_ext_windows_size.js, we cope with the fact that on linux
   the specified size might be the inner rather than outer size. This
   was already the case before, but outer{Width,Height} reported always
   the inner size so it was papered.

 * In browser_unified_extensions_overflowable_toolbar.js and the
   relevant head file, we make the code a bit more reliable. This is all
   to workaround a mutter but on automation, where if a window was
   already maximized and you request a resize, mutter will (correctly)
   restore() the window, but will lose the resize information. This
   doesn't happen on newer Mutter versions. Still, it seems easier to
   use window.maximize(), etc than manually trying to maximize the
   window.

 * In head_unified_extensions.js we also remove the code to ensure
   stable positions since it was broken (it was checking
   win.screen.{top,left}, rather than win.screen{X,Y}). We can always
   bring it back fixed if really needed.

Differential Revision: https://phabricator.services.mozilla.com/D234903
2025-02-03 17:08:45 +00:00
Emilio Cobos Álvarez
4eaad99f2b Bug 581863 - Fix nsWindow coordinates to make sense. r=stransky,win-reviewers,rkraesig,devtools-reviewers,ochameau
I stumbled upon this bug while realizing that some of the math I'm doing
for PiP windows doesn't work at all on Linux (bug 1934760), because
screenX != mozInnerScreenX, even though outerWidth == innerWidth.

I've tested this on X11 and Wayland (plasma and Gnome) with CSD and SSD,
and in general, this is the same thing Windows does, so should be fine.

The basic idea is:

 * Keep mBounds being frame manager bounds (so, outer* and screen*),
   relative to mShell.

 * Keep mClientMargin to translate from mBounds to client bounds.

This is both simpler and makes the math consistent.

Differential Revision: https://phabricator.services.mozilla.com/D230981
2025-02-03 17:08:44 +00:00
Punam Dahiya
9bdd1e1bb4 Bug 1937178 - Move ShortURL.sys.mjs and SearchShortcuts.sys.mjs functionality outside of newtab r=search-reviewers,home-newtab-reviewers,urlbar-reviewers,scunnane,jteow,mconley
Differential Revision: https://phabricator.services.mozilla.com/D235828
2025-01-30 18:20:22 +00:00
Mike Conley
4f4b8deeb3 Bug 1944611 - Temporarily remap tippytop URIs back to chrome://activity-stream/content/data/content/tippytop/. r=jteow,home-newtab-reviewers,thecount
Differential Revision: https://phabricator.services.mozilla.com/D236006
2025-01-30 03:01:29 +00:00
Sandor Molnar
e425e231c8 Backed out changeset 202a0b27fd64 (bug 1944611) for causing build bustages CLOSED TREE 2025-01-30 02:56:52 +02:00
Mike Conley
57dae4469e Bug 1944611 - Temporarily remap tippytop URIs back to chrome://activity-stream/content/data/content/tippytop/. r=jteow,home-newtab-reviewers,thecount
Differential Revision: https://phabricator.services.mozilla.com/D236006
2025-01-30 00:32:25 +00:00
Mike Conley
e9c91b99ec Bug 1941026 - Decouple tippytop from the newtab codebase and move under the topsites component. r=pdahiya,jteow,home-newtab-reviewers,urlbar-reviewers,nbarrett
Differential Revision: https://phabricator.services.mozilla.com/D235316
2025-01-24 15:16:59 +00:00
Joel Maher
26692106d7 Bug 1941893 - Green up mingwclang and 32bit windows tests on 24h2 update. r=aryx
Differential Revision: https://phabricator.services.mozilla.com/D234399
2025-01-17 21:23:22 +00:00
Mike Conley
b6aa0cf47f Bug 1917913 - Make PanelMultiView.sys.mjs pass the valid-jsdoc ESLint rule and add missing source documentation. r=sfoster
This also makes some members and methods private that were using the
underscore pseudoprivate technique.

Differential Revision: https://phabricator.services.mozilla.com/D225820
2025-01-16 21:14:22 +00:00
Dão Gottwald
8855c8d6ca Bug 1941304 - Use tabs.svg when List All Tabs button is not in the tabs toolbar. r=desktop-theme-reviewers,tabbrowser-reviewers,emilio,dwalker
Differential Revision: https://phabricator.services.mozilla.com/D234013
2025-01-14 15:56:26 +00:00
kernp25
c807a2be8a Bug 1688743 - Make menus.update and menus.remove throw when menu item is not found. r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D232166
2025-01-14 09:59:27 +00:00
Joel Maher
248157ee22 Bug 1938960 - additional greening up of win11 24h2, carry forward existing annotations. r=aryx,webdriver-reviewers,credential-management-reviewers,devtools-reviewers,sessionstore-reviewers,nchevobbe,dimi,whimboo,sfoster
Differential Revision: https://phabricator.services.mozilla.com/D233026
2025-01-07 19:51:49 +00:00
Luca Greco
775328ed67 Bug 1786601 - Tweak browser_ext_tabs_events.js to expect SessionStore onMoveToNewWindow uncaught rejection. r=dao,sessionstore-reviewers,robwu
This patch modifies SessionStoreInternal.onMoveToNewWindow to raise a more specific error message when
no TabState is found for the tab being moved, and then allows that more specific error message
as an uncaught rejection in browser_ext_tabs_events.js through PromiseTestUtils.allowMatchingRejectionsGlobally.

These changes don't address the underlying issue hit by SessionStoreInternal, but in the short term
it will allow to prevent the high frequency intermittent failure currently hit by the
browser_ext_tabs_events.js (and to keep the existing test coverage which would be lost if we
would instead skip the entire test file to workaround the intermittency).

An inline comment added right above the call to PromiseTestUtils.allowMatchingRejectionsGlobally
includes a mention to Bug 1938594 (a new bug filed under the "Firefox :: Session Restore" bugzilla
component to track additional investigations on the SessionStore/TabStateFlusher side) as a reminder
of the underlying issue (and to remove the workaround when it may not be necessary anymore).

Differential Revision: https://phabricator.services.mozilla.com/D230528
2024-12-22 18:06:56 +00:00
Tom Schuster
b5796e10bf Bug 1936523 - Remove inline event handlers from PopupNotifications. r=Gijs,extension-reviewers,reusable-components-reviewers,mstriemer
I ended up having to change some of the fundamentals of the popupnotification element because the code relied on being able to inherit inline event handler attributes such as buttoncommand as oncommand on the button element and so on.

The primary user of the popupnotification element seems to be `PopupNotifications`. Following a pre-existing coupling with `PopupNotifications._onCheckboxCommand`, by default all commands/actions will simply call the corresponding `PopupNotifications` handler. However, I found at least one instance in `panelUI.js` that tries to override the command handlers. I solved this by dispatching a custom cancelable event on the popupnotification element.

Differential Revision: https://phabricator.services.mozilla.com/D231927
2024-12-18 17:38:57 +00:00
Alexandre Poirot
f6cdc992fc Bug 1934478 - Fix sending request from Web Extension and Browser toolboxes. r=extension-reviewers,devtools-reviewers,nchevobbe,rpl
The source of trouble here is the Web Extension Fallback Document,
which is loaded via the system principal and used by DevTools
as the top level target.

Because of it being system principal, we use the special "devtools loader" for ESM.
This is what cause the exception about the "global" option.
Using global attribute set to contextual fixes this exception.

Because of it being the top level target, we are trying to send the request
from its document. But as it is a system principal, it is ignored by the Network Observer.
So that the resent request is sent, but isn't shown.

Using the currently selected target in Network Command helps circumvent that
by sending the request with a real extension document and the request
is then shown in the network monitor.
But this change also impact web page and browser debugging.

Differential Revision: https://phabricator.services.mozilla.com/D231602
2024-12-17 19:02:42 +00:00
Joel Maher
bd0980024e Bug 1936405 - Green up mochitest* on windows 11 24H2. r=aryx,necko-reviewers,jgilbert,devtools-reviewers,omc-reviewers,ochameau,kershaw,emcminn
Differential Revision: https://phabricator.services.mozilla.com/D231746
2024-12-12 02:43:50 +00:00