Bug 36024

Summary: Add DOMFormData.idl to expose FormData interface
Product: WebKit Reporter: Jian Li <jianli>
Component: WebCore JavaScriptAssignee: Jian Li <jianli>
Severity: Normal CC: dimich, ossy, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 26979, 36026    
Description Flags
Proposed Patch sam: review+, jianli: commit-queue-

Description Jian Li 2010-03-11 11:39:18 PST
Need to add DOMFormData.idl to expose FormData interface.
Comment 1 Jian Li 2010-03-11 11:49:43 PST
Created attachment 50521 [details]
Proposed Patch
Comment 2 Sam Weinig 2010-03-11 13:28:12 PST
Comment on attachment 50521 [details]
Proposed Patch

> +
> +JSValue JSDOMFormData::append(ExecState* exec, const ArgList& args)
> +{
> +    if (args.size() < 2)
> +        return throwError(exec, SyntaxError, "Not enough arguments");

We don't generally throw on too few arguments, but rather let the undefined value get toStringed.

Otherwise, this looks good. r=me if you make that change.
Comment 3 Csaba Osztrogon√°c 2010-03-12 12:41:47 PST
Landed in http://trac.webkit.org/changeset/55921, but reverted by http://trac.webkit.org/changeset/55926.

If you apply this patch, Qt build will work. 

diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index 7d1a56a..80f2e39 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -289,6 +289,7 @@ SOURCES += \
     bindings/js/JSDebugWrapperSet.cpp \
     bindings/js/JSDocumentCustom.cpp \
     bindings/js/JSDocumentFragmentCustom.cpp \
+    bindings/js/JSDOMFormDataCustom.cpp \
     bindings/js/JSDOMGlobalObject.cpp \
     bindings/js/JSDOMWindowBase.cpp \
     bindings/js/JSDOMWindowCustom.cpp \


And please update Qt specific expected file to make buildbot happy:

-window.FormData [object DOMFormDataConstructor]
-window.FormData.prototype [object DOMFormDataPrototype]
+window.FormData [object FormDataConstructor]
+window.FormData.prototype [object FormDataPrototype]
Comment 4 Sam Weinig 2010-03-12 17:14:56 PST
Any reason you did not make the change I asked you to make?
Comment 5 Jian Li 2010-03-12 17:21:19 PST
(In reply to comment #4)
> Any reason you did not make the change I asked you to make?

Sorry, forgot this one. I will make sure this will be applied in next landing.
Comment 6 Jian Li 2010-03-15 10:37:24 PDT
Changed and committed as http://trac.webkit.org/changeset/56003.