[WPT] form.action does not return document.url when unset (part of https://wpt.live...
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 Jun 2020 21:03:50 +0000 (21:03 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 Jun 2020 21:03:50 +0000 (21:03 +0000)
commitca31f9742aeb19d4b8ac10160948d7e658fcacdf
tree74220c1f9de871a30160421917b22c6e8a358abd
parent5a2a914061c5becf65cb4ded9f25e03a9362ce2a
[WPT] form.action does not return document.url when unset (part of https://wpt.live/html/dom/reflection-forms.html)
https://bugs.webkit.org/show_bug.cgi?id=213205

Reviewed by David Kilzer.

LayoutTests/imported/w3c:

* web-platform-tests/html/dom/reflection-forms-expected.txt:
* web-platform-tests/html/semantics/forms/the-form-element/form-action-reflection-expected.txt:
* web-platform-tests/html/semantics/forms/the-form-element/form-action-reflection-with-base-url-expected.txt:
Update test results.

Source/WebCore:

Update existing test results that now pass.

* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::formAction const):
Call document.completeURL() directly rather than getURLAttribute() as that
will cause the attribute to have to be looked up again.

* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::action const):
Match HTMLFormControlElement::formAction (and the spec) and return the document's
url if the attribute value is missing.

* html/HTMLFormElement.idl:
Remove Reflect/URL extended attributes, as we need custom handling for the empty
case.

LayoutTests:

* platform/gtk/imported/w3c/web-platform-tests/html/dom/reflection-forms-expected.txt:
* platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/reflection-forms-expected.txt:
* platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/reflection-forms-expected.txt:
* platform/mac/imported/w3c/web-platform-tests/html/dom/reflection-forms-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/html/dom/reflection-forms-expected.txt:
Update test results.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263113 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
LayoutTests/ChangeLog
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-forms-expected.txt
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-form-element/form-action-reflection-expected.txt
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-form-element/form-action-reflection-with-base-url-expected.txt
LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/dom/reflection-forms-expected.txt
LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/reflection-forms-expected.txt
LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/reflection-forms-expected.txt
LayoutTests/platform/mac/imported/w3c/web-platform-tests/html/dom/reflection-forms-expected.txt
LayoutTests/platform/wpe/imported/w3c/web-platform-tests/html/dom/reflection-forms-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLFormControlElement.cpp
Source/WebCore/html/HTMLFormElement.cpp
Source/WebCore/html/HTMLFormElement.idl