Index: Source/core/loader/FormSubmission.cpp |
diff --git a/Source/core/loader/FormSubmission.cpp b/Source/core/loader/FormSubmission.cpp |
index 13fb0e9f93e2d3c3bb62b4335e1178bfe7c624e5..9b2b86681aa7d3073e7093b50f5fa836e7e14e73 100644 |
--- a/Source/core/loader/FormSubmission.cpp |
+++ b/Source/core/loader/FormSubmission.cpp |
@@ -162,8 +162,8 @@ PassRefPtr<FormSubmission> FormSubmission::create(HTMLFormElement* form, const A |
copiedAttributes.setTarget(attributeValue); |
} |
- Document* document = form->document(); |
- KURL actionURL = document->completeURL(copiedAttributes.action().isEmpty() ? document->url().string() : copiedAttributes.action()); |
+ Document& document = form->document(); |
+ KURL actionURL = document.completeURL(copiedAttributes.action().isEmpty() ? document.url().string() : copiedAttributes.action()); |
bool isMailtoForm = actionURL.protocolIs("mailto"); |
bool isMultiPartForm = false; |
String encodingType = copiedAttributes.encodingType(); |
@@ -176,7 +176,7 @@ PassRefPtr<FormSubmission> FormSubmission::create(HTMLFormElement* form, const A |
} |
} |
- WTF::TextEncoding dataEncoding = isMailtoForm ? UTF8Encoding() : FormDataBuilder::encodingFromAcceptCharset(copiedAttributes.acceptCharset(), document); |
+ WTF::TextEncoding dataEncoding = isMailtoForm ? UTF8Encoding() : FormDataBuilder::encodingFromAcceptCharset(copiedAttributes.acceptCharset(), &document); |
RefPtr<DOMFormData> domFormData = DOMFormData::create(dataEncoding.encodingForFormSubmission()); |
Vector<pair<String, String> > formValues; |
@@ -199,7 +199,7 @@ PassRefPtr<FormSubmission> FormSubmission::create(HTMLFormElement* form, const A |
String boundary; |
if (isMultiPartForm) { |
- formData = FormData::createMultiPart(*(static_cast<FormDataList*>(domFormData.get())), domFormData->encoding(), document); |
+ formData = FormData::createMultiPart(*(static_cast<FormDataList*>(domFormData.get())), domFormData->encoding(), &document); |
boundary = formData->boundary().data(); |
} else { |
formData = FormData::create(*(static_cast<FormDataList*>(domFormData.get())), domFormData->encoding(), attributes.method() == GetMethod ? FormData::FormURLEncoded : FormData::parseEncodingType(encodingType)); |
@@ -212,8 +212,8 @@ PassRefPtr<FormSubmission> FormSubmission::create(HTMLFormElement* form, const A |
formData->setIdentifier(generateFormDataIdentifier()); |
formData->setContainsPasswordData(containsPasswordData); |
- String targetOrBaseTarget = copiedAttributes.target().isEmpty() ? document->baseTarget() : copiedAttributes.target(); |
- RefPtr<FormState> formState = FormState::create(form, formValues, document, trigger); |
+ String targetOrBaseTarget = copiedAttributes.target().isEmpty() ? document.baseTarget() : copiedAttributes.target(); |
+ RefPtr<FormState> formState = FormState::create(form, formValues, &document, trigger); |
return adoptRef(new FormSubmission(copiedAttributes.method(), actionURL, targetOrBaseTarget, encodingType, formState.release(), formData.release(), boundary, event)); |
} |