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

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

Issue 1173513002: Fix Blink commit type for subframes after initial about:blank load. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix broken layout test Created 5 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
Index: Source/core/loader/FrameLoader.cpp
diff --git a/Source/core/loader/FrameLoader.cpp b/Source/core/loader/FrameLoader.cpp
index e63eca19569d0a418ff100f0d677b7740187d16d..6c75488235f85100a16a8b2314d583b8d89ac980 100644
--- a/Source/core/loader/FrameLoader.cpp
+++ b/Source/core/loader/FrameLoader.cpp
@@ -675,6 +675,15 @@ FrameLoadType FrameLoader::determineFrameLoadType(const FrameLoadRequest& reques
bool FrameLoader::prepareRequestForThisFrame(FrameLoadRequest& request)
{
+ // From the HTML5 spec for location.assign():
Charlie Reis 2015/06/09 07:14:18 I'm moving this rule from NavigationScheduler::mus
+ // "If the browsing context's session history contains only one Document,
+ // and that was the about:blank Document created when the browsing context
+ // was created, then the navigation must be done with replacement enabled."
+ if (!m_stateMachine.committedMultipleRealLoads()
Nate Chapin 2015/06/09 18:25:33 Should this be a case in determineFrameLoadType()?
Charlie Reis 2015/06/11 16:43:48 Yes, that seems reasonable. Done.
+ && equalIgnoringCase(m_frame->document()->url(), blankURL())) {
+ request.setLockBackForwardList(true);
+ }
+
// If no origin Document* was specified, skip remaining security checks and assume the caller has fully initialized the FrameLoadRequest.
if (!request.originDocument())
return true;

Powered by Google App Engine
This is Rietveld 408576698