formaction must return document's address when formaction is missing
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Jan 2016 00:04:56 +0000 (00:04 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Jan 2016 00:04:56 +0000 (00:04 +0000)
commitaf26caaf6b3aefa4358d8225422f8cd0d10b726d
tree4fbbc4c11c2860d4f72a061cd58caa96239f77bc
parent8478d55e38a40fb02ef83888b87e467aef805bad
formaction must return document's address when formaction is missing
https://bugs.webkit.org/show_bug.cgi?id=148874

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Rebaselined the tests now that more test cases are passing.

* web-platform-tests/html/semantics/forms/attributes-common-to-form-controls/formAction_document_address-expected.txt:
* web-platform-tests/html/semantics/forms/attributes-common-to-form-controls/formaction-expected.txt:

Source/WebCore:

Fixed the bug by falling back to document.url() when the attribute is not set or is empty in formAction getter.

Test: fast/forms/formaction-attribute-with-empty-value.html

* html/HTMLButtonElement.idl:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::formAction): Added.
(WebCore::HTMLFormControlElement::setFormAction): Added.
* html/HTMLFormControlElement.h:
* html/HTMLInputElement.idl:

LayoutTests:

Added a regression test and rebaselined imported W3C tests.

* fast/forms/formaction-attribute-with-empty-value-expected.txt: Added.
* fast/forms/formaction-attribute-with-empty-value.html: Added.
* fast/forms/submit-form-attributes-expected.txt:
* fast/forms/submit-form-attributes.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@194999 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/forms/formaction-attribute-with-empty-value-expected.txt [new file with mode: 0644]
LayoutTests/fast/forms/formaction-attribute-with-empty-value.html [new file with mode: 0644]
LayoutTests/fast/forms/submit-form-attributes-expected.txt
LayoutTests/fast/forms/submit-form-attributes.html
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/attributes-common-to-form-controls/formAction_document_address-expected.txt
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/attributes-common-to-form-controls/formaction-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLButtonElement.idl
Source/WebCore/html/HTMLFormControlElement.cpp
Source/WebCore/html/HTMLFormControlElement.h
Source/WebCore/html/HTMLInputElement.idl