Bug 45929

Summary: Support generating a FormData object based on the data in an existing <form>
Product: WebKit Reporter: Jian Li <jianli>
Component: WebCore JavaScriptAssignee: Jian Li <jianli>
Status: RESOLVED FIXED    
Severity: Normal CC: dimich, fishd, levin
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Proposed Patch
jianli: commit-queue-
Proposed Patch abarth: review+, jianli: commit-queue-

Jian Li
Reported 2010-09-16 15:52:06 PDT
Support generating a FormData object based on the data in an existing <form>, like: new FormData(formDataElement)
Attachments
Proposed Patch (9.58 KB, patch)
2010-09-16 16:04 PDT, Jian Li
jianli: commit-queue-
Proposed Patch (9.25 KB, patch)
2010-09-20 10:49 PDT, Jian Li
abarth: review+
jianli: commit-queue-
Jian Li
Comment 1 2010-09-16 16:04:49 PDT
Created attachment 67855 [details] Proposed Patch
Darin Fisher (:fishd, Google)
Comment 2 2010-09-19 22:13:48 PDT
Comment on attachment 67855 [details] Proposed Patch View in context: https://bugs.webkit.org/attachment.cgi?id=67855&action=prettypatch > WebCore/html/DOMFormData.cpp:45 > + appendForm(form); wouldn't having two separate constructors be cleaner? then you wouldn't need the form null check inside of appendForm.
Jian Li
Comment 3 2010-09-20 10:49:11 PDT
Created attachment 68110 [details] Proposed Patch Changed to have a separate constructor.
Adam Barth
Comment 4 2010-09-26 22:27:25 PDT
Comment on attachment 68110 [details] Proposed Patch View in context: https://bugs.webkit.org/attachment.cgi?id=68110&action=review Is this from some spec? > WebCore/html/DOMFormData.cpp:50 > + if (form) Prefer early return. > WebCore/html/DOMFormData.h:55 > DOMFormData(const TextEncoding&); > + DOMFormData(HTMLFormElement*); These need to be marked "explicit".
Jian Li
Comment 5 2010-10-06 17:19:34 PDT
(In reply to comment #4) > (From update of attachment 68110 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=68110&action=review > > Is this from some spec? > Not yet. But it will be added to the XHR Level 2 spec soon since everyone seems to agree on this. FF is also adding this support.
Jian Li
Comment 6 2010-10-07 15:58:58 PDT
Note You need to log in before you can comment on or make changes to this bug.