Commit graph

70 commits

Author SHA1 Message Date
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
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
Adam Vandolder
e0fc545cbc Bug 1556358 - Part 3: Restore FACE state in SessionStore. r=edgar,farre
Depends on D174115

Differential Revision: https://phabricator.services.mozilla.com/D179278
2023-06-28 16:28:27 +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
Stanca Serban
cb33cee97e Backed out 3 changesets (bug 1556358) for causing Bb build bustages in ElementInternals.cpp. CLOSED TREE
Backed out changeset f7e94ea82252 (bug 1556358)
Backed out changeset c80f29a9cefc (bug 1556358)
Backed out changeset 413225d91666 (bug 1556358)
2023-06-16 19:46:02 +03:00
Adam Vandolder
61ab1463b6 Bug 1556358 - Part 3: Restore FACE state in SessionStore. r=edgar,farre
Depends on D174115

Differential Revision: https://phabricator.services.mozilla.com/D179278
2023-06-16 15:02:11 +00:00
Sarah Clements
eb795dabb9 Bug 1833416 - modify undoClosedTab keyboard shortcut r=mconley,sfoster,sessionstore-reviewers,dao
* This patch expands this keyboard shortcut to support whichever of the three
last actions were taken - last tab closed, last window closed or session restore.
* Existing test file was renamed and additional cases added.

Differential Revision: https://phabricator.services.mozilla.com/D178965
2023-06-15 13:28:26 +00:00
Noemi Erli
c9a78e6659 Backed out 3 changesets (bug 1556358) for causing bustages in ElementInternals.cpp CLOSED TREE
Backed out changeset 0ebda393786b (bug 1556358)
Backed out changeset c41794eef66a (bug 1556358)
Backed out changeset a07e3e226569 (bug 1556358)
2023-06-15 01:32:38 +03:00
Adam Vandolder
8149717b64 Bug 1556358 - Part 3: Restore FACE state in SessionStore. r=edgar,farre
Depends on D174115

Differential Revision: https://phabricator.services.mozilla.com/D179278
2023-06-14 20:59:29 +00:00
Cosmin Sabou
c884b4c9ec Backed out changeset 0e2af922ec2a (bug 1820660) for causing webdriver failures on add_cookie/user_prompts.py. CLOSED TREE 2023-06-13 13:52:12 +03:00