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

Unified Diff: Source/web/WebLocalFrameImpl.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: Try removing Nasko's original fix 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/web/WebLocalFrameImpl.cpp
diff --git a/Source/web/WebLocalFrameImpl.cpp b/Source/web/WebLocalFrameImpl.cpp
index ab13d530431e1dd3f53ade03028c7b33ef594a4f..b331d646191b25c87551737f749177fef9c86d54 100644
--- a/Source/web/WebLocalFrameImpl.cpp
+++ b/Source/web/WebLocalFrameImpl.cpp
@@ -1948,10 +1948,12 @@ void WebLocalFrameImpl::loadJavaScriptURL(const KURL& url)
static void ensureFrameLoaderHasCommitted(FrameLoader& frameLoader)
{
- if (frameLoader.stateMachine()->committedFirstRealDocumentLoad())
+ // Internally, Blink uses CommittedMultipleRealLoads to track whether the
+ // next commit should create a new history item or not. Ensure we have
+ // reached that state.
+ if (frameLoader.stateMachine()->committedMultipleRealLoads())
return;
- frameLoader.stateMachine()->advanceTo(frameLoader.client()->backForwardLength() > 1 ?
- FrameLoaderStateMachine::CommittedMultipleRealLoads : FrameLoaderStateMachine::CommittedFirstRealLoad);
+ frameLoader.stateMachine()->advanceTo(FrameLoaderStateMachine::CommittedMultipleRealLoads);
}
void WebLocalFrameImpl::initializeToReplaceRemoteFrame(WebRemoteFrame* oldWebFrame, const WebString& name, WebSandboxFlags flags)

Powered by Google App Engine
This is Rietveld 408576698