Setting form.enctype reflected attribute behaves strangely.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 22 Oct 2011 00:04:18 +0000 (00:04 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 22 Oct 2011 00:04:18 +0000 (00:04 +0000)
commit418cb2c924b6a18b59152b0f022e1df936d8a9bf
treeb14e279dd58b34030f5c135ae8a2c1b5fed40079
parentda7442a277bac1f2ffab0470791ba425b37b4403
Setting form.enctype reflected attribute behaves strangely.
https://bugs.webkit.org/show_bug.cgi?id=44879

Patch by Vineet Chaudhary <vineet.chaudhary@motorola.com> on 2011-10-21
Reviewed by Darin Adler.

Source/WebCore:

The spec says form.enctype should be application/x-www-form-urlencoded,
So as "text", "plain", "multipart" or "form-data" these are not a valid value so must be ignored.

* loader/FormSubmission.cpp:
(WebCore::FormSubmission::Attributes::parseEncodingType):

LayoutTests:

Leading/trailing white-spaces should not be allowed while specifying attribute value.
Added more test coverage for form.enctype attribute.

* fast/forms/encoding-test.html:
* fast/forms/enctype-attribute-expected.txt:
* fast/forms/enctype-attribute.html: Corrected test case as per new behavior.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@98172 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/forms/encoding-test.html
LayoutTests/fast/forms/enctype-attribute-expected.txt
LayoutTests/fast/forms/enctype-attribute.html
Source/WebCore/ChangeLog
Source/WebCore/loader/FormSubmission.cpp