Index: Source/core/loader/FormSubmission.cpp |
diff --git a/Source/core/loader/FormSubmission.cpp b/Source/core/loader/FormSubmission.cpp |
index 03601a4e67dde9fc0543183701854b0f311d1de2..0803be17ad9a8a4c317df62b7528d5ce1235843c 100644 |
--- a/Source/core/loader/FormSubmission.cpp |
+++ b/Source/core/loader/FormSubmission.cpp |
@@ -215,14 +215,15 @@ PassRefPtr<FormSubmission> FormSubmission::create(HTMLFormElement* form, const A |
bool containsPasswordData = false; |
for (unsigned i = 0; i < form->associatedElements().size(); ++i) { |
FormAssociatedElement* control = form->associatedElements()[i]; |
- HTMLElement* element = toHTMLElement(control); |
- if (!element->isDisabledFormControl()) |
+ ASSERT(control); |
+ HTMLElement& element = toHTMLElement(*control); |
+ if (!element.isDisabledFormControl()) |
control->appendFormData(*domFormData, isMultiPartForm); |
- if (element->hasTagName(inputTag)) { |
- HTMLInputElement* input = toHTMLInputElement(element); |
- if (input->isTextField()) |
- formValues.append(pair<String, String>(input->name().string(), input->value())); |
- if (input->isPasswordField() && !input->value().isEmpty()) |
+ if (isHTMLInputElement(element)) { |
+ HTMLInputElement& input = toHTMLInputElement(element); |
+ if (input.isTextField()) |
+ formValues.append(pair<String, String>(input.name().string(), input.value())); |
+ if (input.isPasswordField() && !input.value().isEmpty()) |
containsPasswordData = true; |
} |
} |