зеркало из https://github.com/mozilla/gecko-dev.git
Use predefined load types instead of rolling our own. b=385663 r+sr=bzbarsky
This commit is contained in:
Родитель
1cbc7c38ef
Коммит
b125d74ea1
|
@ -72,6 +72,7 @@
|
||||||
#include "nsIMarkupDocumentViewer.h"
|
#include "nsIMarkupDocumentViewer.h"
|
||||||
#include "nsIDocShell.h"
|
#include "nsIDocShell.h"
|
||||||
#include "nsIDocShellTreeItem.h"
|
#include "nsIDocShellTreeItem.h"
|
||||||
|
#include "nsDocShellLoadTypes.h"
|
||||||
#include "nsIWebNavigation.h"
|
#include "nsIWebNavigation.h"
|
||||||
#include "nsIBaseWindow.h"
|
#include "nsIBaseWindow.h"
|
||||||
#include "nsIWebShellServices.h"
|
#include "nsIWebShellServices.h"
|
||||||
|
@ -2263,20 +2264,9 @@ nsHTMLDocument::OpenCommon(const nsACString& aContentType, PRBool aReplace)
|
||||||
|
|
||||||
// Now check whether we were opened with a "replace" argument. If
|
// Now check whether we were opened with a "replace" argument. If
|
||||||
// so, we need to tell the docshell to not create a new history
|
// so, we need to tell the docshell to not create a new history
|
||||||
// entry for this load.
|
// entry for this load. Otherwise, make sure that we're doing a normal load,
|
||||||
// XXXbz we're basically duplicating the MAKE_LOAD_TYPE macro from
|
// not whatever type of load was previously done on this docshell.
|
||||||
// nsDocShell.h. All this stuff needs better apis.
|
docshell->SetLoadType(aReplace ? LOAD_NORMAL_REPLACE : LOAD_NORMAL);
|
||||||
PRUint32 loadType;
|
|
||||||
if (aReplace) {
|
|
||||||
loadType = nsIDocShell::LOAD_CMD_NORMAL |
|
|
||||||
(nsIWebNavigation::LOAD_FLAGS_REPLACE_HISTORY << 16);
|
|
||||||
} else {
|
|
||||||
// Make sure that we're doing a normal load, not whatever type
|
|
||||||
// of load was previously done on this docshell.
|
|
||||||
loadType = nsIDocShell::LOAD_CMD_NORMAL |
|
|
||||||
(nsIWebNavigation::LOAD_FLAGS_NONE << 16);
|
|
||||||
}
|
|
||||||
docshell->SetLoadType(loadType);
|
|
||||||
|
|
||||||
nsCOMPtr<nsIContentViewer> cv;
|
nsCOMPtr<nsIContentViewer> cv;
|
||||||
docshell->GetContentViewer(getter_AddRefs(cv));
|
docshell->GetContentViewer(getter_AddRefs(cv));
|
||||||
|
|
Загрузка…
Ссылка в новой задаче