Bug 1734394 - Make Geckoview use the session store collector r=geckoview-reviewers,agi,farre

When the session storage prefs are enabled, GeckoSession updateSessionState will provide the bundle of information, including zoom, scroll, and form data, to the delegate. Currently works for Fission and on Fenix.

Differential Revision: https://phabricator.services.mozilla.com/D148215
This commit is contained in:
Cathy Lu
2022-06-23 16:44:32 +00:00
parent 763f918deb
commit eb6e2ad0ed
26 changed files with 589 additions and 298 deletions

View File

@@ -5791,7 +5791,7 @@ nsDocShell::OnStateChange(nsIWebProgress* aProgress, nsIRequest* aRequest,
}
}
if constexpr (SessionStoreUtils::NATIVE_LISTENER) {
if (StaticPrefs::browser_sessionstore_platform_collection_AtStartup()) {
if (IsForceReloadType(mLoadType)) {
if (WindowContext* windowContext =
mBrowsingContext->GetCurrentWindowContext()) {
@@ -6535,7 +6535,7 @@ nsresult nsDocShell::EndPageLoad(nsIWebProgress* aProgress,
// incorrectly overrides session store data from the following load.
return NS_OK;
}
if constexpr (SessionStoreUtils::NATIVE_LISTENER) {
if (StaticPrefs::browser_sessionstore_platform_collection_AtStartup()) {
if (WindowContext* windowContext =
mBrowsingContext->GetCurrentWindowContext()) {
using Change = SessionStoreChangeListener::Change;