Bug 1556363 - Part 1: Check disabled state for submission in a common place; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D129048
This commit is contained in:
@@ -1021,10 +1021,13 @@ nsresult HTMLFormElement::ConstructEntryList(FormData* aFormData) {
|
||||
// Walk the list of nodes and call SubmitNamesValues() on the controls
|
||||
//
|
||||
for (uint32_t i = 0; i < len; ++i) {
|
||||
nsCOMPtr<nsIFormControl> fc = do_QueryInterface(sortedControls[i]);
|
||||
MOZ_ASSERT(fc);
|
||||
// Tell the control to submit its name/value pairs to the submission
|
||||
fc->SubmitNamesValues(aFormData);
|
||||
// Disabled elements don't submit
|
||||
if (!sortedControls[i]->IsDisabled()) {
|
||||
nsCOMPtr<nsIFormControl> fc = do_QueryInterface(sortedControls[i]);
|
||||
MOZ_ASSERT(fc);
|
||||
// Tell the control to submit its name/value pairs to the submission
|
||||
fc->SubmitNamesValues(aFormData);
|
||||
}
|
||||
}
|
||||
|
||||
FormDataEventInit init;
|
||||
|
||||
Reference in New Issue
Block a user