mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 07:15:46 +00:00
Bug 1279860
- part 3 - HTMLFormSubmission::GetFromForm, r=smaug
This commit is contained in:
parent
aa5c829338
commit
6f89091771
@ -709,7 +709,8 @@ HTMLFormElement::BuildSubmission(HTMLFormSubmission** aFormSubmission,
|
||||
//
|
||||
// Get the submission object
|
||||
//
|
||||
rv = GetSubmissionFromForm(this, originatingElement, aFormSubmission);
|
||||
rv = HTMLFormSubmission::GetFromForm(this, originatingElement,
|
||||
aFormSubmission);
|
||||
NS_ENSURE_SUBMIT_SUCCESS(rv);
|
||||
|
||||
//
|
||||
|
@ -812,10 +812,10 @@ GetEnumAttr(nsGenericHTMLElement* aContent,
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
nsresult
|
||||
GetSubmissionFromForm(nsGenericHTMLElement* aForm,
|
||||
nsGenericHTMLElement* aOriginatingElement,
|
||||
HTMLFormSubmission** aFormSubmission)
|
||||
/* static */ nsresult
|
||||
HTMLFormSubmission::GetFromForm(nsGenericHTMLElement* aForm,
|
||||
nsGenericHTMLElement* aOriginatingElement,
|
||||
HTMLFormSubmission** aFormSubmission)
|
||||
{
|
||||
// Get all the information necessary to encode the form data
|
||||
NS_ASSERTION(aForm->GetComposedDoc(),
|
||||
|
@ -30,6 +30,19 @@ class Blob;
|
||||
class HTMLFormSubmission
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* Get a submission object based on attributes in the form (ENCTYPE and
|
||||
* METHOD)
|
||||
*
|
||||
* @param aForm the form to get a submission object based on
|
||||
* @param aOriginatingElement the originating element (can be null)
|
||||
* @param aFormSubmission the form submission object (out param)
|
||||
*/
|
||||
static nsresult
|
||||
GetFromForm(nsGenericHTMLElement* aForm,
|
||||
nsGenericHTMLElement* aOriginatingElement,
|
||||
HTMLFormSubmission** aFormSubmission);
|
||||
|
||||
virtual ~HTMLFormSubmission()
|
||||
{
|
||||
MOZ_COUNT_DTOR(HTMLFormSubmission);
|
||||
@ -212,17 +225,6 @@ private:
|
||||
uint64_t mTotalLength;
|
||||
};
|
||||
|
||||
/**
|
||||
* Get a submission object based on attributes in the form (ENCTYPE and METHOD)
|
||||
*
|
||||
* @param aForm the form to get a submission object based on
|
||||
* @param aOriginatingElement the originating element (can be null)
|
||||
* @param aFormSubmission the form submission object (out param)
|
||||
*/
|
||||
nsresult GetSubmissionFromForm(nsGenericHTMLElement* aForm,
|
||||
nsGenericHTMLElement* aOriginatingElement,
|
||||
HTMLFormSubmission** aFormSubmission);
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user