Bug 1721349 - Move mSubmitter from HTMLFormSubmission to FormData and make it participate in cycle collection; r=mccr8

Differential Revision: https://phabricator.services.mozilla.com/D120334
This commit is contained in:
Edgar Chen
2021-07-21 09:52:20 +00:00
parent ad9339a492
commit 2a45c41a27
20 changed files with 66 additions and 76 deletions

View File

@@ -12,7 +12,7 @@
#include "mozilla/EventDispatcher.h"
#include "mozilla/EventStates.h"
#include "mozilla/dom/Element.h"
#include "mozilla/dom/HTMLFormSubmission.h"
#include "mozilla/dom/FormData.h"
#include "mozilla/dom/HTMLOptGroupElement.h"
#include "mozilla/dom/HTMLOptionElement.h"
#include "mozilla/dom/HTMLSelectElementBinding.h"
@@ -1388,7 +1388,7 @@ HTMLSelectElement::Reset() {
}
NS_IMETHODIMP
HTMLSelectElement::SubmitNamesValues(HTMLFormSubmission* aFormSubmission) {
HTMLSelectElement::SubmitNamesValues(FormData* aFormData) {
// Disabled elements don't submit
if (IsDisabled()) {
return NS_OK;
@@ -1423,7 +1423,7 @@ HTMLSelectElement::SubmitNamesValues(HTMLFormSubmission* aFormSubmission) {
nsString value;
option->GetValue(value);
aFormSubmission->AddNameValuePair(name, value);
aFormData->AddNameValuePair(name, value);
}
return NS_OK;