Commit Graph

3662 Commits

Author SHA1 Message Date
Joel Maher
7e69b821f2 Bug 1967293 - Update mochitest manifest annotations to support Ubuntu 24.04. r=aryx,webcompat-reviewers,pip-reviewers,credential-management-reviewers,devtools-reviewers,sessionstore-reviewers,profiler-reviewers,dom-storage-reviewers,twisniewski,asuth,accessibility-frontend-reviewers,julienw,dimi,morgan,mconley,ochameau,nsharpley
Differential Revision: https://phabricator.services.mozilla.com/D250070
2025-05-23 20:13:29 +00:00
Alexandru Marc
2b5b645133 Revert "Bug 1966658 - Populate the partitionedPrincipal to the SessionHistoryEntry in the parent process. r=smaug,sessionstore-reviewers,core-sessionstore-reviewers,farre"
This reverts commit 52c31c4da0.
2025-05-22 07:21:13 +00:00
Tim Huang
52c31c4da0 Bug 1966658 - Populate the partitionedPrincipal to the SessionHistoryEntry in the parent process. r=smaug,sessionstore-reviewers,core-sessionstore-reviewers,farre
In this patch, we populate the partitionedPrincipal when we commit
SessionHistory to the parent process. In addition, we remove the
serialization and deserialization of partitionedPrincipalToInherit in
sessionHistory.

Differential Revision: https://phabricator.services.mozilla.com/D250263
2025-05-22 02:06:53 +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
Alexandru Marc
43acd12a3b Revert "Bug 1955685 - Improve cookie validation - part 7 - Fix existing tests, r=valentin,webdriver-reviewers,extension-reviewers,settings-reviewers,devtools-reviewers,cookie-reviewers,sessionstore-reviewers,migration-reviewers,backup-reviewers,sthompson,robwu,ochameau" for causing multiple failures
This reverts commit 585626d8fc.

Revert "Bug 1955685 - Improve cookie validation - part 6 - CookieValidation for web-ext, r=robwu,cookie-reviewers,valentin"

This reverts commit b38d308433.

Revert "Bug 1955685 - Improve cookie validation - part 5 - 0x20 as invalid chars for cookie names and values r=valentin,cookie-reviewers"

This reverts commit 3578880f65.

Revert "Bug 1955685 - Improve cookie validation - part 4 - expiry validation, r=edgul,cookie-reviewers,valentin"

This reverts commit 26e16d402f.

Revert "Bug 1955685 - Improve cookie validation - part 3 - nsICookieValidation in cookieManager.add, r=edgul,extension-reviewers,settings-reviewers,search-reviewers,devtools-reviewers,cookie-reviewers,sessionstore-reviewers,backup-reviewers,nchevobbe,mconley,Standard8,webdriver-reviewers,whimboo,valentin,sfoster,robwu"

This reverts commit 433a4d736d.

Revert "Bug 1955685 - Improve cookie validation - part 2 - nsICookieValidation in cookieManager.addNative, r=edgul,cookie-reviewers,geckoview-reviewers,nalexander,glandium"

This reverts commit 818c2c1769.

Revert "Bug 1955685 - Improve cookie validation - part 1 - nsICookieValidation, r=edgul,cookie-reviewers"

This reverts commit 55ad680779.
2025-05-20 09:31:40 +00:00
Andrea Marchesini
585626d8fc Bug 1955685 - Improve cookie validation - part 7 - Fix existing tests, r=valentin,webdriver-reviewers,extension-reviewers,settings-reviewers,devtools-reviewers,cookie-reviewers,sessionstore-reviewers,migration-reviewers,backup-reviewers,sthompson,robwu,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D248600
2025-05-20 08:02:18 +00:00
Andrea Marchesini
433a4d736d Bug 1955685 - Improve cookie validation - part 3 - nsICookieValidation in cookieManager.add, r=edgul,extension-reviewers,settings-reviewers,search-reviewers,devtools-reviewers,cookie-reviewers,sessionstore-reviewers,backup-reviewers,nchevobbe,mconley,Standard8,webdriver-reviewers,whimboo,valentin,sfoster,robwu
Differential Revision: https://phabricator.services.mozilla.com/D244897
2025-05-20 08:02:03 +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
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
Jonathan Sudiaman
0905650fec Bug 1963549 - Add profile migration to remove outdated sidebar attrs from XULStore. r=Gijs,sidebar-reviewers,firefox-desktop-core-reviewers ,sessionstore-reviewers,sthompson
There was some discussion on whether the XULStore data should be written back into Session Store or Prefs. My concern there is that since we no longer *write* to XULStore, there is a good chance that this data is outdated anyways, and we'd be overwriting data in other places that *are* up-to-date. My vote is to simply discard this data, it seems that users were already comfortable with clearing their xulstore.json, so it doesn't seem like an issue to do the same programmatically.

Differential Revision: https://phabricator.services.mozilla.com/D248476
2025-05-09 20:35:47 +00:00
DJ
4c6277efaf Bug 1957488 - record reopen event when reopening a deleted tab group. r=sthompson,sessionstore-reviewers,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D248250
2025-05-09 15:00:22 +00:00
Alexandre Lissy
0fb9652cea Bug 1681829 - Block about:restartrequired from being restored during SessionRestore r=sessionstore-reviewers,sfoster
Differential Revision: https://phabricator.services.mozilla.com/D240631
2025-05-09 13:57:25 +00:00
DJ
1a51ae6a74 Bug 1952900 - improve resilience of tab group removal in browser_tab_groups_closed.js. r=jswinarton,sessionstore-reviewers,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D247115
2025-05-01 20:50:13 +00:00
DJ
e83f2402e2 Bug 1938678 - add test for saved group handling when sessionstore is enabled. r=sthompson,sessionstore-reviewers,sfoster
Differential Revision: https://phabricator.services.mozilla.com/D246618
2025-05-01 17:52:14 +00:00
Sam Foster
3bc128efc2 Bug 1905958 - Add a JSON schema for browser session state and a way to validate against it. r=sessionstore-reviewers,sidebar-reviewers,nsharpley,dwalker
- Add the schema itself with definitions for the various data structures the serialized browser
  session state contains
- Add means of validating the current state against the schema with a new SessionStore.vaidateState
  method
- Add a smoke test to the schema by validating against sample session restore document
- Fix an issue in SidebaState which was returning undefined for some property values which isn't valid JSON

Differential Revision: https://phabricator.services.mozilla.com/D246163
2025-05-01 15:21:00 +00:00
John McCann
925d4f422f Bug 1952307 - Use hasAttribute instead of getAttribute in restoreWindowFeatures r=Erchen,sessionstore-reviewers,sthompson
Differential Revision: https://phabricator.services.mozilla.com/D246052
2025-04-28 19:52:13 +00:00
Stephen Thompson
f8fe0335c0 Bug 1938401 - tab group interaction metrics r=dwalker,sessionstore-reviewers,tabbrowser-reviewers
Records counts of user interactions with tab groups:

- expand a collapsed tab group
- collapse an expanded tab group
- rename a tab group
- change a tab group's color
- save and close a tab group
- delete a tab group
- reopen a deleted tab group
- ungroup a tab group
- move a tab group to a new window
- reopen a saved and closed tab group from the list all tabs menu
- reopen a saved and closed tab group from a URL bar suggestion
- reopen a recently closed tab group from the recently closed tabs menu

Differential Revision: https://phabricator.services.mozilla.com/D246123
2025-04-24 02:20:14 +00:00
apostrophest
6033809e9c Bug 1956254 - fix saved tab group behavior on session restore r=dwalker,sessionstore-reviewers
Current behavior on Windows: if you close a window that has open tab groups, the tab groups are automatically saved. Opening Firefox into the initial deferred restore state properly shows the tab groups as saved. However, after restoring the previous session manually, the tab groups exist both in the tab strip (correct) and in the list of saved tab groups (incorrect).

Bug 1950611 and bug 1954488 dealt with several edge cases around saved groups + session restore. In Windows, it looks like on session startup, `_prepDataForDeferredRestore` receives a state where the open tab groups from last session are stored in both `savedGroups` and `windows[].groups[]`. `_prepDataForDeferredRestore` has logic to convert the open tab groups in `windows[].groups[]` into saved groups, but it'll skip any that are already present in the list of saved groups. This was fine until the fix for bug 1954488, which unsets `removeAfterRestore` from the saved group; the `windows[].groups[]` groups get the `removeAfterRestore` flag set, but that does not get put into `savedGroups` because the group already exists in `savedGroups`.

I amended the logic so that when a group is in `windows[].groups[]` and `savedGroups`, the tab group state from `savedGroups` will get `removeAfterRestore` set back to true.

Not totally sure why I could reproduce this on Windows but not on macOS. It looks like the saved groups in `defaultState.savedGroups` still have `removeAfterRestore: true` set even after the `delete group.removeAfterRestore`. I don't understand how that would happen.

Differential Revision: https://phabricator.services.mozilla.com/D246377
2025-04-24 01:44:21 +00:00
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
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
Eric Chen
39a7352079 Bug 1959812 - Defer session restore when Firefox is launched via a taskbar tab window r=sfoster,sessionstore-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D245484
2025-04-17 15:46:29 +00:00
camachoh
8c57346d78 Bug 1824630 - TabStateCache documentation/function signatures are misleading. r=sfoster,sessionstore-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D244456
2025-04-15 23:34:29 +00:00
Jeremy Swinarton
92735f5883 Bug 1960381: Swap session restore triage rotation for nsharpley and jswinarton to avoid overlap with PTO. r=sessionstore-reviewers,sthompson
Differential Revision: https://phabricator.services.mozilla.com/D245439
2025-04-14 17:00:47 +00:00
Stephen Thompson
8551cfa4aa Bug 1938398 - add saved tab group metrics r=jswinarton,sessionstore-reviewers,tabbrowser-reviewers
- record number of saved tab groups
- record min/max/median/average number of tabs in saved tab groups

This patch adds a new observable topic `sessionstore-saved-tab-groups-changed` to SessionStore. This is emitted when a saved tab group is added or removed from the session. BrowserUsageTelemetry subscribes to that topic and updates saved tab group-related metrics.

BrowserUsageTelemetry is also setting those saved tab group-related metrics on startup. BrowserGlue initializes BrowserUsageTelemetry after the session has been restored/set up, so saved tab group information will be available at that time. This is also important to make sure that we keep this metric correct even if a user doesn't touch their saved tab groups during the course of a session.

Differential Revision: https://phabricator.services.mozilla.com/D245138
2025-04-14 16:01:39 +00:00
Alex Hochheiden
9e91a1f021 Bug 1715287 - [lint] Enable remaining pyupgrade rules and lint tree r=linter-reviewers,webdriver-reviewers,translations-reviewers,whimboo,sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D245320
2025-04-13 17:48:23 +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
Florian Quèze
5a2e83431d Bug 1956726 - fix the glean migration of the FX_SESSION_RESTORE_MANUAL_RESTORE_DURATION_UNTIL_EAGER_TABS_RESTORED_MS histogram, r=chutten.
Differential Revision: https://phabricator.services.mozilla.com/D244738
2025-04-10 20:22:23 +00:00
DJ
91384c4388 Bug 1938425 - add telemetry for reopening saved groups. r=dao,sessionstore-reviewers,tabbrowser-reviewers,urlbar-reviewers,sthompson
Differential Revision: https://phabricator.services.mozilla.com/D243737
2025-04-10 17:35:20 +00:00
Butkovits Atila
b9dc6231d7 Backed out changeset 4711e76ce475 (bug 1938425) for causing failures at browser_tab_groups_telemetry.js. CLOSED TREE 2025-04-10 09:35:44 +03:00
DJ
cdc29e0d0d Bug 1938425 - add telemetry for reopening saved groups. r=dao,sessionstore-reviewers,tabbrowser-reviewers,urlbar-reviewers,sthompson
Differential Revision: https://phabricator.services.mozilla.com/D243737
2025-04-10 03:02:30 +00:00
Eric Chen
becacdbeea Bug 1915738 - Part 2: add testing for restore behaviour with taskbar tabs r=sfoster,sessionstore-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D241696
2025-04-09 18:57:25 +00:00
Eric Chen
81fd252f84 Bug 1915738 - Part 1: end session when all non-taskbartab Firefox windows are closed and prepare for restore r=sfoster,sessionstore-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D241499
2025-04-09 18:57:25 +00:00
Cristina Horotan
2d08511dac Backed out changeset 7fed35bbd242 (bug 1938425) for causing bc failures at browser_tab_groups_telemetry.js. CLOSED TREE 2025-04-09 13:06:03 +03:00
DJ
e9f93720b5 Bug 1938425 - add telemetry for reopening saved groups. r=dao,sessionstore-reviewers,tabbrowser-reviewers,urlbar-reviewers,sthompson
Differential Revision: https://phabricator.services.mozilla.com/D243737
2025-04-09 03:07:19 +00:00
smolnar
8c01d285cf Backed out changeset 1c700c5b8a89 (bug 1938425) for causing bc failures @ browser_tab_groups_telemetry.js CLOSED TREE 2025-04-07 19:45:55 +03:00
DJ
b8f461ce7f Bug 1938425 - add telemetry for reopening saved groups. r=dao,sessionstore-reviewers,tabbrowser-reviewers,urlbar-reviewers,sthompson
Differential Revision: https://phabricator.services.mozilla.com/D243737
2025-04-07 14:51:17 +00:00
Jens Stutte
3b58b8ac47 Bug 1955534 - Do not use AsyncShutdown.quitApplicationGranted in SessionStore. r=sessionstore-reviewers,dwalker
SessionStore wants to flush the window and tab status early enough to not be disturbed by things going down, that is in response to "quit-application-granted".
Previously we used the AsyncShutdown blocker quitApplicationGranted here, but that is deprecated as it's not a "real" shutdown phase and caused a loot of confusion elsewhere.
Given we already had our own timer to actually avoid the crash from AsyncShutdown, there is no point in using AsyncShutdown and we can just spin the event loop by ourselves here.

Differential Revision: https://phabricator.services.mozilla.com/D242658
2025-04-04 09:42:46 +00:00
Florian Quèze
9ec8cc29a6 Bug 1956726 - Migrate histograms to use Glean APIs in browser/, r=chutten,sessionstore-reviewers,tabbrowser-reviewers,mconley,nsharpley.
Differential Revision: https://phabricator.services.mozilla.com/D243706
2025-04-03 17:09:35 +00:00
Jeremy Swinarton
d0cf81701e Bug 1927527: Add test to ensure session store cleans up stale closed tab groups r=dwalker,sessionstore-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D243519
2025-04-02 13:16:43 +00:00
Jeremy Swinarton
b5d0e3b6a6 Bug 1953801: Update SessionStore cache immediately after creating a tab group. r=sthompson,sessionstore-reviewers,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D241634
2025-03-28 15:16:23 +00:00
Cosmin Sabou
782522ac2f Backed out changeset bfb6d89e6bb9 (bug 1953801) for causing bc failures on browser_restore_container_tabs_oa. CLOSED TREE 2025-03-25 19:36:35 +02:00
Jeremy Swinarton
39b35f9816 Bug 1953801: Update SessionStore cache immediately after creating a tab group. r=sthompson,sessionstore-reviewers,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D241634
2025-03-25 13:39:45 +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
Jeremy Swinarton
92c3e82bc9 Bug 1954488: Delete removeAfterRestore property from savedGroups if the session is being quit for the second time r=dwalker,sthompson,sessionstore-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D241978
2025-03-18 20:48:58 +00:00
DJ
dcb7322bc1 Bug 1954603 - prevent error in initSession when initializing a windowless session. r=sthompson,jswinarton,sessionstore-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D241886
2025-03-18 17:32:53 +00:00
Dão Gottwald
43ec83d3e6 Bug 1954271 - Update Session Restore triage rotation. r=sessionstore-reviewers,jswinarton
Differential Revision: https://phabricator.services.mozilla.com/D241721
2025-03-17 19:11:26 +00:00
Greg Stoll
52693f9877 Bug 1926973 - make only explicitly unloaded tabs have a grayscale dimmed favicon r=desktop-theme-reviewers,tabbrowser-reviewers,dao,sessionstore-reviewers
This is what UX has decided makes sense, and will be much less disruptive
than dimming out all favicons on session restore. When we're ready the
default value of "browser.tabs.fadeOutExplicitlyUnloadedTabs" will be
true, and the default value of "browser.tabs.fadeOutUnloadedTabs" will
remain false.

Differential Revision: https://phabricator.services.mozilla.com/D241481
2025-03-15 00:30:28 +00:00
DJ
fb605dda4c Bug 1950611 - fix save and restore of groups when they trigger window closing. r=sthompson,jswinarton,sessionstore-reviewers,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D241490
2025-03-14 14:18:20 +00:00
Jeremy Swinarton
80b8a844b4 Bug 1951319: Deferred session restore re-opens tab groups r=dao,sthompson,sessionstore-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D241012
2025-03-12 17:46:04 +00:00