Commit Graph

88 Commits

Author SHA1 Message Date
Nikki Sharpley
72b2fd0ee7 Bug 1892957 - Add sidebar position settings to the Customize Sidebar menu r=sidebar-reviewers,fluent-reviewers,desktop-theme-reviewers,sessionstore-reviewers,kcochrane,sfoster
Differential Revision: https://phabricator.services.mozilla.com/D213591
2024-06-21 14:00:00 +00:00
Emilio Cobos Álvarez
f16ff34d47 Bug 1902315 - Remove CHROME_WINDOW_{LOWERED,RAISED}. r=arai,extension-reviewers,sessionstore-reviewers,dao,zombie
These did nothing at the OS level on most OSes (see previous patch), and
were only used on tests, so just remove them.

Note that these were different from the alwaysontop feature, which
remains and is used for stuff like picture-in-picture.

Differential Revision: https://phabricator.services.mozilla.com/D214091
2024-06-19 07:47:37 +00:00
Nikki Sharpley
f60a47f6c5 Bug 1895868 - Sidebar should not be visible in popup windows r=sidebar-reviewers,sessionstore-reviewers,sfoster,kcochrane
- hides sidebar on popup window
- disabled sidebar menu options in View, hence disabling keyboard shortcuts

Differential Revision: https://phabricator.services.mozilla.com/D212597
2024-06-10 22:44:53 +00:00
Tamas Szentpeteri
1b4d233427 Backed out changeset 4ab23ba75a11 (bug 1895868) for causing mochitest failures on browser_history_sidebar.js 2024-06-10 21:55:16 +03:00
Nikki Sharpley
878b2fc533 Bug 1895868 - Sidebar should not be visible in popup windows r=sidebar-reviewers,sessionstore-reviewers,sfoster,kcochrane
- hides sidebar on popup window
- disabled sidebar menu options in View, hence disabling keyboard shortcuts

Differential Revision: https://phabricator.services.mozilla.com/D212597
2024-06-10 17:37:11 +00:00
Fatih
aef2965619 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
f2f0a26b06 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
3bb578be0b 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
6faea180fa 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
811ff6e04e 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
b43107b445 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
fb5818e268 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
15151ae200 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
a2156ad63a Backed out changeset 75c44ff76360 (bug 1892965) for causing multiple failures 2024-05-01 22:58:27 +03:00
Sarah Clements
5209eded5e 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
e3765221a6 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
690b246be7 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
4d05fa6adb 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
8311343a9f 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
c261303179 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
4774bf7dd0 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
0b92bb684d 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
d6abef5db6 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
1c20c25eda 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
3abadca53d 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
0c459bc49a 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
e2e80f646d 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
33f75d6854 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
8c6bfd266a 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
16eab158d1 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
7bc0261e9d 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
e761c059e2 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
8b8bc7d73b Backed out changeset e1a0d895f3a9 (bug 1863692) for causing failures in test_restore_manually.py 2023-12-04 14:52:24 +02:00
Sarah Clements
f32c50299f 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
caa49c9563 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
0d51f8165a 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
007482cff7 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
3e5519ca71 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
f1dff2b8f5 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
8ca7498e3a 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
6b71723304 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
9a29a8c3ee 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
f0971bf7a7 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
f078d2dc51 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
8115a9c131 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
bc3b9132f7 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
e5fbaa1b0f 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
7bb84fd335 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
e9950eccfd 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
3c9ede98f8 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