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

Unified Diff: third_party/WebKit/Source/core/loader/FormSubmission.cpp

Issue 1999573003: OOPIFs: Fixing submitting forms targeting a remote frame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@form-target-is-cross-site-frame
Patch Set: Created 4 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
« no previous file with comments | « third_party/WebKit/Source/core/loader/FormSubmission.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/loader/FormSubmission.cpp
diff --git a/third_party/WebKit/Source/core/loader/FormSubmission.cpp b/third_party/WebKit/Source/core/loader/FormSubmission.cpp
index e66fa9eba1a541a5b91e5a9ac14bb03b67eecd9a..741a01f522c2edc651abb77192955ae87a5f6176 100644
--- a/third_party/WebKit/Source/core/loader/FormSubmission.cpp
+++ b/third_party/WebKit/Source/core/loader/FormSubmission.cpp
@@ -275,18 +275,23 @@ void FormSubmission::populateFrameLoadRequest(FrameLoadRequest& frameRequest)
if (!m_target.isEmpty())
frameRequest.setFrameName(m_target);
+ populateResourceRequest(frameRequest.resourceRequest());
+}
+
+void FormSubmission::populateResourceRequest(ResourceRequest& resourceRequest)
Nate Chapin 2016/06/07 21:35:51 Maybe have this return a ResourceRequest instead o
Łukasz Anforowicz 2016/06/08 20:32:43 Good idea. Let me change void FormSubmission:
+{
if (m_method == FormSubmission::PostMethod) {
- frameRequest.resourceRequest().setHTTPMethod("POST");
- frameRequest.resourceRequest().setHTTPBody(m_formData);
+ resourceRequest.setHTTPMethod("POST");
+ resourceRequest.setHTTPBody(m_formData);
// construct some user headers if necessary
if (m_boundary.isEmpty())
- frameRequest.resourceRequest().setHTTPContentType(m_contentType);
+ resourceRequest.setHTTPContentType(m_contentType);
else
- frameRequest.resourceRequest().setHTTPContentType(m_contentType + "; boundary=" + m_boundary);
+ resourceRequest.setHTTPContentType(m_contentType + "; boundary=" + m_boundary);
}
- frameRequest.resourceRequest().setURL(requestURL());
+ resourceRequest.setURL(requestURL());
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/loader/FormSubmission.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698