Bug 1596958 - Synchronize layouthistorystate to parent process, r=peterv

Differential Revision: https://phabricator.services.mozilla.com/D53288
This commit is contained in:
Olli Pettay
2019-12-05 20:30:45 +00:00
parent b8e7a8c120
commit c96e061efc
15 changed files with 141 additions and 54 deletions

View File

@@ -1697,6 +1697,7 @@ nsDocumentViewer::Close(nsISHEntry* aSHEntry) {
static void DetachContainerRecurse(nsIDocShell* aShell) {
// Unhook this docshell's presentation
aShell->SynchronizeLayoutHistoryState();
nsCOMPtr<nsIContentViewer> viewer;
aShell->GetContentViewer(getter_AddRefs(viewer));
if (viewer) {
@@ -1824,6 +1825,7 @@ nsDocumentViewer::Destroy() {
// and shEntry has no window state at this point we'll be ok; we just won't
// cache ourselves.
shEntry->SyncPresentationState();
shEntry->SynchronizeLayoutHistoryState();
// Shut down accessibility for the document before we start to tear it down.
#ifdef ACCESSIBILITY