WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
148874
formaction must return document's address when formaction is missing
https://bugs.webkit.org/show_bug.cgi?id=148874
Summary
formaction must return document's address when formaction is missing
Ryosuke Niwa
Reported
2015-09-04 19:48:15 PDT
See
https://html.spec.whatwg.org/multipage/forms.html#dom-fs-formaction
"The formAction IDL attribute must reflect the formaction content attribute, except that on getting, when the content attribute is missing or its value is the empty string, the document's address must be returned instead. The formEnctype IDL attribute must reflect the formenctype content attribute, limited to only known values." This bug was found by the newly added test: LayoutTests/http/tests/w3c/html/semantics/forms/attributes-common-to-form-controls/formaction.html Chrome passes this test whereas Firefox fail.
Attachments
Fixes the bug
(11.28 KB, patch)
2016-01-12 18:25 PST
,
Ryosuke Niwa
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews103 for mac-yosemite
(846.57 KB, application/zip)
2016-01-12 19:20 PST
,
Build Bot
no flags
Details
Archive of layout-test-results from ews113 for mac-yosemite
(755.21 KB, application/zip)
2016-01-12 19:22 PST
,
Build Bot
no flags
Details
Archive of layout-test-results from ews105 for mac-yosemite-wk2
(733.47 KB, application/zip)
2016-01-12 19:23 PST
,
Build Bot
no flags
Details
Rebaselined a test
(13.05 KB, patch)
2016-01-12 19:26 PST
,
Ryosuke Niwa
cdumez
: review+
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2015-09-04 19:48:35 PDT
<
rdar://problem/22590190
>
Ryosuke Niwa
Comment 2
2015-09-04 19:49:07 PDT
html/semantics/forms/attributes-common-to-form-controls/formAction_document_address.html also fails for the same reason.
Ryosuke Niwa
Comment 3
2016-01-12 18:25:34 PST
Created
attachment 268833
[details]
Fixes the bug
Build Bot
Comment 4
2016-01-12 19:20:29 PST
Comment on
attachment 268833
[details]
Fixes the bug
Attachment 268833
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/684670
New failing tests: imported/w3c/web-platform-tests/html/semantics/forms/attributes-common-to-form-controls/formAction_document_address.html
Build Bot
Comment 5
2016-01-12 19:20:31 PST
Created
attachment 268838
[details]
Archive of layout-test-results from ews103 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-yosemite Platform: Mac OS X 10.10.5
Build Bot
Comment 6
2016-01-12 19:22:30 PST
Comment on
attachment 268833
[details]
Fixes the bug
Attachment 268833
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/684663
New failing tests: imported/w3c/web-platform-tests/html/semantics/forms/attributes-common-to-form-controls/formAction_document_address.html
Build Bot
Comment 7
2016-01-12 19:22:33 PST
Created
attachment 268839
[details]
Archive of layout-test-results from ews113 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews113 Port: mac-yosemite Platform: Mac OS X 10.10.5
Build Bot
Comment 8
2016-01-12 19:23:18 PST
Comment on
attachment 268833
[details]
Fixes the bug
Attachment 268833
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/684671
New failing tests: imported/w3c/web-platform-tests/html/semantics/forms/attributes-common-to-form-controls/formAction_document_address.html
Build Bot
Comment 9
2016-01-12 19:23:20 PST
Created
attachment 268840
[details]
Archive of layout-test-results from ews105 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
Ryosuke Niwa
Comment 10
2016-01-12 19:26:53 PST
Created
attachment 268842
[details]
Rebaselined a test
Chris Dumez
Comment 11
2016-01-13 14:17:05 PST
Comment on
attachment 268842
[details]
Rebaselined a test View in context:
https://bugs.webkit.org/attachment.cgi?id=268842&action=review
r=me with nits.
> Source/WebCore/html/HTMLFormControlElement.cpp:110 > + if (value.isNull() || value.isEmpty())
The second check is sufficient as isEmpty() will return true if null.
> Source/WebCore/html/HTMLFormControlElement.cpp:112 > + return getURLAttribute(formactionAttr);
return document().completeURL(stripLeadingAndTrailingHTMLSpaces(value)); ? to avoid looking up the attribute again.
> Source/WebCore/html/HTMLFormControlElement.h:57 > + void setFormAction(const String&);
Could take a const AtomicString& in parameter.
> LayoutTests/fast/forms/formaction-attribute-with-empty-value.html:6 > +
No description() ?
> LayoutTests/fast/forms/formaction-attribute-with-empty-value.html:25 > +var successfullyParsed = true;
Why this?
Ryosuke Niwa
Comment 12
2016-01-13 14:23:43 PST
Comment on
attachment 268842
[details]
Rebaselined a test View in context:
https://bugs.webkit.org/attachment.cgi?id=268842&action=review
>> Source/WebCore/html/HTMLFormControlElement.cpp:110 >> + if (value.isNull() || value.isEmpty()) > > The second check is sufficient as isEmpty() will return true if null.
Fixed.
>> Source/WebCore/html/HTMLFormControlElement.cpp:112 >> + return getURLAttribute(formactionAttr); > > return document().completeURL(stripLeadingAndTrailingHTMLSpaces(value)); ? to avoid looking up the attribute again.
I didn't want to duplicate the code here so I'd keep it as is since I don't think this property is performance critical.
>> Source/WebCore/html/HTMLFormControlElement.h:57 >> + void setFormAction(const String&); > > Could take a const AtomicString& in parameter.
Fixed.
>> LayoutTests/fast/forms/formaction-attribute-with-empty-value.html:6 >> + > > No description() ?
Added.
>> LayoutTests/fast/forms/formaction-attribute-with-empty-value.html:25 >> +var successfullyParsed = true; > > Why this?
Removed.
Ryosuke Niwa
Comment 13
2016-01-13 16:05:08 PST
Committed
r194999
: <
http://trac.webkit.org/changeset/194999
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug