Bug 1500829 - Remove nsIDocShell::shouldSaveLayoutState. r=nika
authorNicholas Nethercote <nnethercote@mozilla.com>
Tue, 25 Jun 2019 22:06:39 +0000
changeset 480101 08d6d034d45b7b0bbf2e3a6a8e429eb0d3c5e5bc
parent 480100 2084264fac1f40bb25c6ed8065f89585465aa290
child 480102 d9fc649ed2007ad35f103dacd7b3b73562c937eb
push id36201
push usercsabou@mozilla.com
push dateWed, 26 Jun 2019 03:57:29 +0000
treeherdermozilla-central@a3cad1d7836c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnika
bugs1500829
milestone69.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1500829 - Remove nsIDocShell::shouldSaveLayoutState. r=nika It's unused. Differential Revision: https://phabricator.services.mozilla.com/D34949
docshell/base/nsDocShell.cpp
docshell/base/nsIDocShell.idl
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -11798,28 +11798,16 @@ nsresult nsDocShell::LoadHistoryEntry(ns
   loadState->SetCsp(csp);
 
   rv = InternalLoad(loadState,
                     nullptr,   // No nsIDocShell
                     nullptr);  // No nsIRequest
   return rv;
 }
 
-NS_IMETHODIMP
-nsDocShell::GetShouldSaveLayoutState(bool* aShould) {
-  *aShould = false;
-  if (mOSHE) {
-    // Don't capture historystate and save it in history
-    // if the page asked not to do so.
-    *aShould = mOSHE->GetSaveLayoutStateFlag();
-  }
-
-  return NS_OK;
-}
-
 nsresult nsDocShell::PersistLayoutHistoryState() {
   nsresult rv = NS_OK;
 
   if (mOSHE) {
     bool scrollRestorationIsManual = mOSHE->GetScrollRestorationIsManual();
     nsCOMPtr<nsILayoutHistoryState> layoutState;
     if (RefPtr<PresShell> presShell = GetPresShell()) {
       rv = presShell->CaptureHistoryState(getter_AddRefs(layoutState));
--- a/docshell/base/nsIDocShell.idl
+++ b/docshell/base/nsIDocShell.idl
@@ -372,18 +372,16 @@ interface nsIDocShell : nsIDocShellTreeI
 
   /*
    * Returns true if the docshell is currently executing the onLoad Handler
    */
   readonly attribute boolean isExecutingOnLoadHandler;
 
   attribute nsILayoutHistoryState layoutHistoryState;
 
-  readonly attribute boolean shouldSaveLayoutState;
-
   /**
    * The SecureBrowserUI object for this docshell.  This is set by XUL
    * <browser> or nsWebBrowser for their root docshell.
    */
   attribute nsISecureBrowserUI securityUI;
 
   /**
    * Object used to delegate URI loading to an upper context.