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

Unified 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, 1 month 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: third_party/WebKit/Source/core/loader/FrameLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/FrameLoader.cpp b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
index fde5f299ac1e539ba4f62f6f845d6b91866f77a7..163731d513ee6f3d309887370cf157b4efa6c00d 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -939,7 +939,12 @@ FrameLoadType FrameLoader::determineFrameLoadType(
equalIgnoringCase(m_frame->document()->url(), blankURL())))
return FrameLoadTypeReplaceCurrentItem;
- if (request.resourceRequest().url() == m_documentLoader->urlForHistory()) {
+ // 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
+ // ResourceRequest's URL, but we need to compare Data URL encoded contents
+ // to determine the same page navigation for Data URLs.
+ 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
+ if (!isDataUrlWithEmulatedBaseUrl &&
+ request.resourceRequest().url() == m_documentLoader->urlForHistory()) {
if (!request.originDocument())
return FrameLoadTypeReloadMainResource;
return request.resourceRequest().httpMethod() == HTTPNames::POST

Powered by Google App Engine
This is Rietveld 408576698