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

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

Issue 1213913003: Don't revalidate all resources for FrameLoadTypeSame (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix oilpan + assert failures Created 5 years, 5 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/FrameFetchContextTest.cpp ('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 3d8ab8b84bc46b42a5857b61572df491501f33b4..63529e849151f92ba0ea25957766ca8adca51e5e 100644
--- a/Source/core/loader/FrameLoader.cpp
+++ b/Source/core/loader/FrameLoader.cpp
@@ -739,8 +739,13 @@ FrameLoadType FrameLoader::determineFrameLoadType(const FrameLoadRequest& reques
|| (!m_stateMachine.committedMultipleRealLoads()
&& equalIgnoringCase(m_frame->document()->url(), blankURL())))
return FrameLoadTypeReplaceCurrentItem;
- if (!request.originDocument() && request.resourceRequest().url() == m_documentLoader->urlForHistory())
- return FrameLoadTypeSame;
+
+ if (request.resourceRequest().url() == m_documentLoader->urlForHistory()) {
+ if (!request.originDocument())
+ return FrameLoadTypeSame;
+ return request.resourceRequest().httpMethod() == "POST" ? FrameLoadTypeStandard : FrameLoadTypeReplaceCurrentItem;
+ }
+
if (request.substituteData().failingURL() == m_documentLoader->urlForHistory() && m_loadType == FrameLoadTypeReload)
return FrameLoadTypeReload;
return FrameLoadTypeStandard;
@@ -917,20 +922,7 @@ void FrameLoader::load(const FrameLoadRequest& passedRequest, FrameLoadType fram
return;
}
- // Perform navigation to a different document.
- bool sameURL = url == m_documentLoader->urlForHistory();
startLoad(request, newLoadType, policy);
-
- // Example of this case are sites that reload the same URL with a different cookie
- // driving the generated content, or a master frame with links that drive a target
- // frame, where the user has clicked on the same link repeatedly.
- if (sameURL
- && !isBackForwardLoadType(frameLoadType)
- && newLoadType != FrameLoadTypeReload
- && newLoadType != FrameLoadTypeReloadFromOrigin
- && request.resourceRequest().httpMethod() != "POST") {
- m_loadType = FrameLoadTypeSame;
- }
}
SubstituteData FrameLoader::defaultSubstituteDataForURL(const KURL& url)
« no previous file with comments | « Source/core/loader/FrameFetchContextTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698