Commit graph

83 commits

Author SHA1 Message Date
Fatih
bb769eccc9 Bug 1897590: Check RoundWindowSize RFPTarget before restoring tab sizes. r=tjr,sessionstore-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D211034
2024-05-31 16:03:43 +00:00
Nikki Sharpley
ecc3669212 Bug 1892033 - Move sidebar style persistence from XULstore to SessionStore r=sidebar-reviewers,sessionstore-reviewers,backup-reviewers,dao,Gijs,sclements,kpatenio
Move style persistence from XULstore to SessionStore.

Follow up bug to fix persistence of sidebar when only a new tab is open and window is closed, and its
accompanying test `browser_sidebar_persist.js`: Bug 1898613

Depends on D207048

Differential Revision: https://phabricator.services.mozilla.com/D207787
2024-05-24 20:16:31 +00:00
Sam Foster
562487ee21 Bug 1896791 - Fix logging typo for the createTabsForSessionRestore return value. r=sessionstore-reviewers,nsharpley,sclements
Differential Revision: https://phabricator.services.mozilla.com/D210391
2024-05-16 17:58:14 +00:00
Sam Foster
e6346b7f19 Bug 1854373 Use the loggers to capture errors and debug details during session restore.r=sessionstore-reviewers,markh,sclements
* Timestamped log files are written to a `sessionstore-logs` directory in the profile directory
* Errors will always get written to disk, the logOnSuccess pref ensures all logs are saved even if no error has been captured
* The prefs configure how much logging we do. We have more verbose logging by default in  nightly/early-beta, and less (errors, warnings) in release.
* Logging statements have been added to the early phases of session restore. We'll add more I'm sure as we troubleshoot specific bugs.

Differential Revision: https://phabricator.services.mozilla.com/D208816
2024-05-09 20:30:15 +00:00
Peter Van der Beken
749a66c89d Bug 1865387 - Don't recreate session-store's history listener for browsing-context-did-set-embedder notification if browserId didn't change. r=geckoview-reviewers,nika,sessionstore-reviewers,owlish,kaya,farre
Differential Revision: https://phabricator.services.mozilla.com/D193929
2024-05-07 06:24:13 +00:00
Nikki Sharpley
e900310aa3 Bug 1885894 - Remove sidebar persistence from XULStore r=sessionstore-reviewers,backup-reviewers,sidebar-reviewers,Gijs,mconley,sfoster,sclements
Since we are moving away from XUL for the revamped sidebar, remove persistence off of XULstore.
For now, this involves moving persistence of "sidebar-command" and "positionend" to SessionStore.

A follow up bug 1892033 for moving the style attribute to SessionStore has been filed. This is slightly more involved,
hence the separate patch.

Differential Revision: https://phabricator.services.mozilla.com/D207048
2024-05-06 15:11:20 +00:00
Sarah Clements
6c0504ee55 Bug 1892965 - Rename SidebarUI and SidebarLauncher r=sidebar-reviewers,places-reviewers,nsharpley
Differential Revision: https://phabricator.services.mozilla.com/D208901
2024-05-03 15:20:15 +00:00
kycn
93a268b437 Bug 1677190 - Move buildRestoreData to toolkit to use it on both Android and Desktop. r=geckoview-reviewers,sessionstore-reviewers,owlish,farre
Differential Revision: https://phabricator.services.mozilla.com/D208642
2024-05-02 17:41:06 +00:00
Norisz Fay
287ff7968f Backed out changeset 75c44ff76360 (bug 1892965) for causing multiple failures 2024-05-01 22:58:27 +03:00
Sarah Clements
be64abc5f7 Bug 1892965 - Rename SidebarUI and SidebarLauncher r=sidebar-reviewers,places-reviewers,nsharpley
Differential Revision: https://phabricator.services.mozilla.com/D208901
2024-05-01 12:19:41 +00:00
Sam Foster
f2be9ced5a Bug 1886659 - Remove the FX_SESSION_RESTORE_CLOSED_TABS_NOT_SAVED probe. r=sessionstore-reviewers,sclements
Differential Revision: https://phabricator.services.mozilla.com/D206717
2024-04-05 22:13:48 +00:00
Nika Layzell
a3f9d28206 Bug 1887029 - Simplify TabAttributes to explicitly specify supported attributes, r=sessionstore-reviewers,sfoster,dao
The only tab attribute which is ever persisted by SessionStore is
"customizemode". This patch limits the logic to only allow persisting and
restoring this attribute.

The browser_attributes.js test is also updated to use the "customizemode"
attribute for testing, rather than a custom specified attribute.

Differential Revision: https://phabricator.services.mozilla.com/D205481
2024-04-05 16:42:51 +00:00
Nika Layzell
72006e5961 Bug 1886892 - Part 1: Remove non-SHIP code from desktop SessionStore, r=sessionstore-reviewers,tabbrowser-reviewers,mconley,farre,geckoview-reviewers,owlish
In bug 1804140, we shipped SHIP everywhere on desktop. Unfortunately, we
never removed the now-dead code from SessionStore.

This patch removes the easy to identify SessionStore code for non-SHIP,
now that it is a fully unsupported configuration.

Differential Revision: https://phabricator.services.mozilla.com/D205479
2024-04-05 16:42:51 +00:00
Butkovits Atila
159929cd10 Backed out 3 changesets (bug 1887029, bug 1886892) for causing failures at browser_all_files_referenced.js. CLOSED TREE
Backed out changeset 07f554ea4869 (bug 1887029)
Backed out changeset daa5f2355675 (bug 1886892)
Backed out changeset 389163cbd649 (bug 1886892)
2024-04-01 21:50:42 +03:00
Nika Layzell
0278634a50 Bug 1887029 - Simplify TabAttributes to explicitly specify supported attributes, r=sessionstore-reviewers,sfoster,dao
The only tab attribute which is ever persisted by SessionStore is
"customizemode". This patch limits the logic to only allow persisting and
restoring this attribute.

The browser_attributes.js test is also updated to use the "customizemode"
attribute for testing, rather than a custom specified attribute.

Differential Revision: https://phabricator.services.mozilla.com/D205481
2024-04-01 17:11:23 +00:00
Nika Layzell
7008e75b63 Bug 1886892 - Part 1: Remove non-SHIP code from desktop SessionStore, r=sessionstore-reviewers,tabbrowser-reviewers,mconley
In bug 1804140, we shipped SHIP everywhere on desktop. Unfortunately, we
never removed the now-dead code from SessionStore.

This patch removes the easy to identify SessionStore code for non-SHIP,
now that it is a fully unsupported configuration.

Differential Revision: https://phabricator.services.mozilla.com/D205479
2024-04-01 17:11:22 +00:00
Nika Layzell
afbdf6822c Bug 1886852 - Avoid registering unnecessary MessageManager listeners when SHIP is enabled, r=smaug!
Differential Revision: https://phabricator.services.mozilla.com/D205377
2024-03-21 19:35:40 +00:00
Dave Townsend
27cc52d631 Bug 1864896: Autofix unused function arguments (browser/components/sessionstore). r=sessionstore-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D202953
2024-03-19 09:36:34 +00:00
Emilio Cobos Álvarez
0e321f79be Bug 232598 - Return null for unset attributes in XUL. r=smaug,devtools-reviewers,omc-reviewers,zombie,nchevobbe,settings-reviewers,application-update-reviewers,credential-management-reviewers,mossop,aminomancer,bytesized,issammani,sessionstore-reviewers,dao
I just got bit by this in bug 1873833, let's just fix it. There isn't
all that much stuff depending on it anymore.

Differential Revision: https://phabricator.services.mozilla.com/D204496
2024-03-18 09:15:07 +00:00
Gijs Kruitbosch
f7c632a681 Bug 1878636 - remove filterPrivateTabs as it creates needless performance churn, r=sfoster,sessionstore-reviewers,kaya,farre
Differential Revision: https://phabricator.services.mozilla.com/D200687
2024-02-13 10:34:29 +00:00
Emilio Cobos Álvarez
ea8818c428 Bug 1869796 - Remove some unused chrome flags. r=smaug,sessionstore-reviewers,dao
And rename CHROME_WINDOW_MIN to CHROME_WINDOW_MINIMIZE, for parallel
with the resize flag.

Differential Revision: https://phabricator.services.mozilla.com/D197869
2024-01-09 00:36:09 +00:00
Mark Banner
8ce23e4908 Bug 1864821 - Replace PromiseUtils.defer() with Promise.withResolvers() in system modules. r=Gijs,perftest-reviewers,necko-reviewers,extension-reviewers,application-update-reviewers,fxview-reviewers,sync-reviewers,sessionstore-reviewers,reusable-components-reviewers,rpl,jesup,hjones,kshampur,skhamis,nalexander,sclements
Differential Revision: https://phabricator.services.mozilla.com/D197489
2024-01-05 09:22:34 +00:00
Emilio Cobos Álvarez
8d837fe97f Bug 1870512 - Remove top-level windows with WindowType::Popup. r=tnikkel,sessionstore-reviewers,dao
These are only used right now for XUL notifications. They are extremely
weird (I bet there's tons of code that assume that WindowType::Popup
corresponds to nsMenuPopupFrame), and afaict there's no good reason why
these have to be this way.

They no longer are on Linux (because Wayland doesn't support such
thing for example).

XUL alerts work fine with this patch on all platforms after some basic
testing.

The other usage of this for the gfx sanity test can use type=dialog.
Actually it can just be a toplevel, but that breaks the XUL skeleton UI.

Differential Revision: https://phabricator.services.mozilla.com/D196665
2023-12-20 18:38:57 +00:00
Norisz Fay
12d5bd6705 Backed out 3 changesets (bug 1870512) as part of previous backout since issues are still present CLOSED TREE
Backed out changeset c909d207f316 (bug 1870512)
Backed out changeset cf0bda3b4253 (bug 1870512)
Backed out changeset 39cc9d155c12 (bug 1870512)
2023-12-18 23:37:42 +02:00
Emilio Cobos Álvarez
af00d61151 Bug 1870512 - Remove top-level windows with WindowType::Popup. r=tnikkel,sessionstore-reviewers,dao
These are only used right now for XUL notifications. They are extremely
weird (I bet there's tons of code that assume that WindowType::Popup
corresponds to nsMenuPopupFrame), and afaict there's no good reason why
these have to be this way.

They no longer are on Linux (because Wayland doesn't support such
thing for example).

XUL alerts work fine with this patch on all platforms after some basic
testing.

Depends on D196664

Differential Revision: https://phabricator.services.mozilla.com/D196665
2023-12-18 17:56:41 +00:00
Sarah Clements
c41e2a0182 Bug 1865154 - Add check for activeIndex in tabState.entries r=sessionstore-reviewers,sfoster
* Only add previously open tabs to the newWindowState in _prepDataForDeferredRestore
if they have entries

Differential Revision: https://phabricator.services.mozilla.com/D196157
2023-12-18 16:55:11 +00:00
Sarah Clements
c619ad7090 Bug 1863692 - Only transfer window attributes for pinned tabs with deferred sessions r=sessionstore-reviewers,dao
* add new marionette test

Differential Revision: https://phabricator.services.mozilla.com/D195006
2023-12-05 10:54:20 +00:00
Noemi Erli
91215a4280 Backed out changeset e1a0d895f3a9 (bug 1863692) for causing failures in test_restore_manually.py 2023-12-04 14:52:24 +02:00
Sarah Clements
a7e4b965c2 Bug 1863692 - Only transfer window attributes for pinned tabs with deferred sessions r=sessionstore-reviewers,dao
* add new marionette test

Differential Revision: https://phabricator.services.mozilla.com/D195006
2023-12-04 11:28:16 +00:00
Sarah Clements
b8cd7eaa7f Bug 1848459 - add telemetry to count closed tabs lost in session restore r=sfoster,sessionstore-reviewers
* Add histogram to sessionrestore code to count how often and the number of
closed tabs that aren't saved on window close due to no open saveable tabs
* Add test coverage

Differential Revision: https://phabricator.services.mozilla.com/D193055
2023-11-23 13:38:06 +00:00
Cosmin Sabou
99a1108422 Backed out changeset 0d228f1cfc6f (bug 1848459) for failures on browser_closed_tabs_closed_windows. CLOSED TREE 2023-11-21 17:05:42 +02:00
Sarah Clements
e578e63c18 Bug 1848459 - add telemetry to count closed tabs lost in session restore r=sfoster,sessionstore-reviewers
* Add histogram to sessionrestore code to count how often and the number of
closed tabs that aren't saved on window close due to no open saveable tabs
* Add test coverage

Differential Revision: https://phabricator.services.mozilla.com/D193055
2023-11-21 12:48:37 +00:00
Paul Zuehlcke
0e9dc5fabc Bug 1863701 - Remove SSTabClosing event. r=sessionstore-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D193069
2023-11-08 21:23:38 +00:00
Paul Zuehlcke
5e49f50910 Bug 1861215 - Skip recording closed tabs in SessionStore for PBM reset action. r=sfoster,sessionstore-reviewers,tabbrowser-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D192686
2023-11-08 12:07:17 +00:00
Paul Zuehlcke
80f52af4ec Bug 1861215 - Also clear closing tabs in SessionStore.purgeDataForPrivateWindow. r=sessionstore-reviewers,sfoster
Differential Revision: https://phabricator.services.mozilla.com/D191884
2023-10-31 11:31:03 +00:00
Paul Zuehlcke
343ba506e9 Bug 1858144 - Clear session store closed tabs on reset PBM action. r=sessionstore-reviewers,sfoster
Differential Revision: https://phabricator.services.mozilla.com/D190699
2023-10-17 10:23:51 +00:00
Sam Foster
0db730dada Bug 1833522 - Add closed tabs from closed windows to the history:recently-closed tab menus. r=dao,extension-reviewers,sessionstore-reviewers,sclements,robwu,Standard8,fxview-reviewers
* Change the signature for SessionStore.getClosedTabCount to accept either a window or options object
* Extend tests for the recently-closed-tabs menu(s)
* Add a test manifest to run the session/recently-closed tabs related extension tests with the
  legacy (false) values for the all-windows and closed tabs from closed windows prefs

Differential Revision: https://phabricator.services.mozilla.com/D186400
2023-09-08 00:36:32 +00:00
Masatoshi Kimura
9d11daf3a3 Bug 1850247 - Fix typo in the pref name. r=sessionstore-reviewers,sfoster
Depends on D186884

Differential Revision: https://phabricator.services.mozilla.com/D186885
2023-08-31 16:58:13 +00:00
Sam Foster
7075d4e4c8 Bug 1845836 - Include closed tabs from closed windows in fxview-next's recently closed tabs list. r=kcochrane,dao,fxview-reviewers,sessionstore-reviewers,sclements
* Add a browser.sessionstore.closedTabsFromClosedWindows pref and consult it when building recently-closed tab lists in firefoxview-next
* Add a _resolveClosedDataSource to SessionStore which allows us to find the window state and _closedTabs given a DOMWindow, a window closedId, or a window session store Id.
* Carry window closedId and source window Id into tab items when building recently-closed tab lists in firefoxview-next. This gives us the necessary context when we need to undoClose or forget a tab item in the list.
* Add a getClosed TabCount and TabData for Closed Windows method to SessionStore
* Modify undoCloseTab and forgetClosedTab to accept source params we can resolve to window state data using _resolveClosedDataSource

Differential Revision: https://phabricator.services.mozilla.com/D185108
2023-08-22 20:42:57 +00:00
Sam Foster
165bfa3ba4 Bug 1847617 - Add about:home to the list of URLs we filter out when deciding if a closing window has state that should be saved. r=dao,sessionstore-reviewers
* And fix the urlbar test that breaks now that about:home tabs with no history aren't saved when closed.

Differential Revision: https://phabricator.services.mozilla.com/D185605
2023-08-11 19:14:51 +00:00
Cristian Tuns
dcf50463d3 Backed out changeset 4ab6eb349233 (bug 1847617) for causing bc failures in /browser_aboutHomeLoading.js CLOSED TREE 2023-08-08 23:57:39 -04:00
Sam Foster
df35ca0918 Bug 1847617 - Add about:home to the list of URLs we filter out when deciding if a closing window has state that should be saved. r=dao,sessionstore-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D185605
2023-08-08 23:05:51 +00:00
Sam Foster
6e8f34b18c Bug 1842610 - Add SessionStore.forgetClosedWindowById and forgetClosedTabById and update RecentlyClosedTabsInView to use the new forget and aggregated getClosedTabData methods. r=kcochrane,fxview-reviewers,sessionstore-reviewers,dao,sclements
* We already make use of the closedId in RecentlyClosedTabsInView to re-open the tab via SS.undoCloseById so it made sense to do the same for forgetting a closed tab
* In the test setup, one of tabs is opened and closed in a different window. This gives us coverage both for the closed tab list rendering, as well as re-opening and forgeting tabs with different source windows
* Both the forget-by-closed-id methods match undoClosedById's behavior and throw if the closedId doesnt match a closed window or tab

Differential Revision: https://phabricator.services.mozilla.com/D184192
2023-07-31 18:54:43 +00:00
Gregory Pappas
3eac12bbd7 Bug 1845311 - Use ChromeUtils.defineLazyGetter in more places r=arai,webdriver-reviewers,geckoview-reviewers,extension-reviewers,application-update-reviewers,credential-management-reviewers,devtools-reviewers,fxview-reviewers,anti-tracking-reviewers,sessionstore-reviewers,pbz,joschmidt,robwu,issammani,bytesized,owlish,dao
Differential Revision: https://phabricator.services.mozilla.com/D184481
2023-07-26 16:28:11 +00:00
Sarah Clements
1a1b01a996 Bug 1844791 - Change maxLength splice to slice in SessionStore._lastClosedActions r=sfoster,sessionstore-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D184246
2023-07-21 21:59:59 +00:00
Sam Foster
2df4be65fa Bug 1842895 - Rename SessionStoreInternal._closedTabs and _closedWindowTabs to differentiate from other closedTabs collections. r=sessionstore-reviewers,sclements
Differential Revision: https://phabricator.services.mozilla.com/D183300
2023-07-19 16:37:15 +00:00
Sarah Clements
84ec9ebeeb Bug 1843587 - Change getClosedTabData param to default to non-private window object r=sfoster,fxview-reviewers,sessionstore-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D183739
2023-07-18 11:11:21 +00:00
Sarah Clements
7e6847ff4f Bug 1820660 - Persist recently closed tabs between sessions r=dao,sfoster,extension-reviewers,sessionstore-reviewers,robwu
* For cases where a user does not have automatic session restore enabled, recently closed
tabs will persist between sessions and previously open tabs will be added to the recently closed tabs
list; upon manual session restore, the previously open tabs will reopen and be removed from the closed tabs list

* Add marionette test and fix test bustages due to these changes.

Differential Revision: https://phabricator.services.mozilla.com/D178521
2023-07-18 10:40:00 +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