Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1392)

Unified Diff: Source/core/loader/FrameLoader.cpp

Issue 17463006: Fix a history bug where a reload is given a standard load's history entry. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/loader/FrameLoader.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/FrameLoader.cpp
diff --git a/Source/core/loader/FrameLoader.cpp b/Source/core/loader/FrameLoader.cpp
index c9942906518cccc10722129d6c1da5312246f8bc..32ba4148764454793cce47fb3f5a3d5fdb465fad 100644
--- a/Source/core/loader/FrameLoader.cpp
+++ b/Source/core/loader/FrameLoader.cpp
@@ -1125,14 +1125,13 @@ void FrameLoader::loadWithNavigationAction(const ResourceRequest& request, const
if (type == FrameLoadTypeRedirectWithLockedBackForwardList)
loader->setIsClientRedirect(true);
- m_loadType = type;
bool isFormSubmission = formState;
if (shouldPerformFragmentNavigation(isFormSubmission, request.httpMethod(), type, request.url()))
- checkNavigationPolicyAndContinueFragmentScroll(action);
+ checkNavigationPolicyAndContinueFragmentScroll(action, type != FrameLoadTypeRedirectWithLockedBackForwardList);
else {
setPolicyDocumentLoader(loader.get());
- checkNavigationPolicyAndContinueLoad(formState);
+ checkNavigationPolicyAndContinueLoad(formState, type);
}
}
@@ -1927,7 +1926,7 @@ void FrameLoader::receivedMainResourceError(const ResourceError& error)
checkLoadComplete();
}
-void FrameLoader::checkNavigationPolicyAndContinueFragmentScroll(const NavigationAction& action)
+void FrameLoader::checkNavigationPolicyAndContinueFragmentScroll(const NavigationAction& action, bool isNewNavigation)
{
m_documentLoader->setTriggeringAction(action);
@@ -1940,7 +1939,7 @@ void FrameLoader::checkNavigationPolicyAndContinueFragmentScroll(const Navigatio
m_provisionalDocumentLoader->stopLoading();
setProvisionalDocumentLoader(0);
}
- loadInSameDocument(request.url(), 0, m_loadType != FrameLoadTypeRedirectWithLockedBackForwardList);
+ loadInSameDocument(request.url(), 0, isNewNavigation);
}
bool FrameLoader::shouldPerformFragmentNavigation(bool isFormSubmission, const String& httpMethod, FrameLoadType loadType, const KURL& url)
@@ -2037,7 +2036,7 @@ bool FrameLoader::fireBeforeUnloadEvent(Chrome& chrome)
return chrome.runBeforeUnloadConfirmPanel(text, m_frame);
}
-void FrameLoader::checkNavigationPolicyAndContinueLoad(PassRefPtr<FormState> formState)
+void FrameLoader::checkNavigationPolicyAndContinueLoad(PassRefPtr<FormState> formState, FrameLoadType type)
{
// If we loaded an alternate page to replace an unreachableURL, we'll get in here with a
// nil policyDataSource because loading the alternate page will have passed
@@ -2101,6 +2100,7 @@ void FrameLoader::checkNavigationPolicyAndContinueLoad(PassRefPtr<FormState> for
}
setProvisionalDocumentLoader(m_policyDocumentLoader.get());
+ m_loadType = type;
setState(FrameStateProvisional);
setPolicyDocumentLoader(0);
« no previous file with comments | « Source/core/loader/FrameLoader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698