Bug 36024 - Add DOMFormData.idl to expose FormData interface
Summary: Add DOMFormData.idl to expose FormData interface
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Jian Li
URL:
Keywords:
Depends on:
Blocks: 26979 36026
  Show dependency treegraph
 
Reported: 2010-03-11 11:39 PST by Jian Li
Modified: 2010-03-15 10:37 PDT (History)
3 users (show)

See Also:


Attachments
Proposed Patch (38.09 KB, patch)
2010-03-11 11:49 PST, Jian Li
sam: review+
jianli: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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:
LayoutTests/platform/qt/fast/dom/Window/window-properties-expected.txt

-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.