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

Side by Side Diff: third_party/WebKit/Source/core/loader/FrameLoader.cpp

Issue 2531013002: WebView loadDataWithBaseURL() was determined as a same page navigation (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
5 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 5 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
6 * (http://www.torchmobile.com/) 6 * (http://www.torchmobile.com/)
7 * Copyright (C) 2008 Alp Toker <alp@atoker.com> 7 * Copyright (C) 2008 Alp Toker <alp@atoker.com>
8 * Copyright (C) Research In Motion Limited 2009. All rights reserved. 8 * Copyright (C) Research In Motion Limited 2009. All rights reserved.
9 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> 9 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com>
10 * Copyright (C) 2011 Google Inc. All rights reserved. 10 * Copyright (C) 2011 Google Inc. All rights reserved.
(...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after
932 return FrameLoadTypeReloadBypassingCache; 932 return FrameLoadTypeReloadBypassingCache;
933 // From the HTML5 spec for location.assign(): 933 // From the HTML5 spec for location.assign():
934 // "If the browsing context's session history contains only one Document, 934 // "If the browsing context's session history contains only one Document,
935 // and that was the about:blank Document created when the browsing context 935 // and that was the about:blank Document created when the browsing context
936 // was created, then the navigation must be done with replacement enabled." 936 // was created, then the navigation must be done with replacement enabled."
937 if (request.replacesCurrentItem() || 937 if (request.replacesCurrentItem() ||
938 (!m_stateMachine.committedMultipleRealLoads() && 938 (!m_stateMachine.committedMultipleRealLoads() &&
939 equalIgnoringCase(m_frame->document()->url(), blankURL()))) 939 equalIgnoringCase(m_frame->document()->url(), blankURL())))
940 return FrameLoadTypeReplaceCurrentItem; 940 return FrameLoadTypeReplaceCurrentItem;
941 941
942 if (request.resourceRequest().url() == m_documentLoader->urlForHistory()) { 942 // TODO(crbug.com/662823): WebFrameLoaderImpl::loadData() sets baseUrl for
Charlie Reis 2016/11/28 20:07:27 Can you clarify what still needs to be done here?
Takashi Toyoshima 2016/11/29 09:39:36 Filed a new bug, crbug.com/669408. Actually, this
943 // ResourceRequest's URL, but we need to compare Data URL encoded contents
944 // to determine the same page navigation for Data URLs.
945 bool isDataUrlWithEmulatedBaseUrl = request.substituteData().isValid();
Charlie Reis 2016/11/28 20:07:27 nit: isDataUrlWithBaseUrl seems like it would be m
dcheng 2016/11/28 20:12:55 I echo Charlie's concern here: is this actually se
Takashi Toyoshima 2016/11/29 09:39:36 Agreed. Probably, we should discuss what is the ri
946 if (!isDataUrlWithEmulatedBaseUrl &&
947 request.resourceRequest().url() == m_documentLoader->urlForHistory()) {
943 if (!request.originDocument()) 948 if (!request.originDocument())
944 return FrameLoadTypeReloadMainResource; 949 return FrameLoadTypeReloadMainResource;
945 return request.resourceRequest().httpMethod() == HTTPNames::POST 950 return request.resourceRequest().httpMethod() == HTTPNames::POST
946 ? FrameLoadTypeStandard 951 ? FrameLoadTypeStandard
947 : FrameLoadTypeReplaceCurrentItem; 952 : FrameLoadTypeReplaceCurrentItem;
948 } 953 }
949 954
950 if (request.substituteData().failingURL() == 955 if (request.substituteData().failingURL() ==
951 m_documentLoader->urlForHistory() && 956 m_documentLoader->urlForHistory() &&
952 m_loadType == FrameLoadTypeReload) 957 m_loadType == FrameLoadTypeReload)
(...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after
1952 m_documentLoader ? m_documentLoader->url() : String()); 1957 m_documentLoader ? m_documentLoader->url() : String());
1953 return tracedValue; 1958 return tracedValue;
1954 } 1959 }
1955 1960
1956 inline void FrameLoader::takeObjectSnapshot() const { 1961 inline void FrameLoader::takeObjectSnapshot() const {
1957 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, 1962 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this,
1958 toTracedValue()); 1963 toTracedValue());
1959 } 1964 }
1960 1965
1961 } // namespace blink 1966 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698