bug 755116 - Add a way to disable global history on a docshell (while leaving session history active). r=gavin

This commit is contained in:
Mark Hammond 2012-05-25 16:08:48 +10:00
parent c858eea237
commit 43457645b4

View File

@ -710,8 +710,8 @@
this.webNavigation.sessionHistory =
Components.classes["@mozilla.org/browser/shistory;1"]
.createInstance(Components.interfaces.nsISHistory);
// enable global history
if (this.docShell)
// enable global history if we weren't told otherwise
if (this.docShell && !this.hasAttribute("disableglobalhistory"))
this.docShell.QueryInterface(Components.interfaces.nsIDocShellHistory).useGlobalHistory = true;
}
}