[webkit-changes] [WebKit/WebKit] d3e21f: <textarea> element's validity state checks shouldn...
EWS
noreply at github.com
Sun Jan 15 07:31:22 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d3e21f7e246becf92fa8087859f304a1653e8d5a
https://github.com/WebKit/WebKit/commit/d3e21f7e246becf92fa8087859f304a1653e8d5a
Author: Alexey Shvayka <ashvayka at apple.com>
Date: 2023-01-15 (Sun, 15 Jan 2023)
Changed paths:
M LayoutTests/fast/forms/ValidityState-tooLong-textarea-expected.txt
M LayoutTests/fast/forms/ValidityState-tooLong-textarea.html
A LayoutTests/fast/forms/ValidityState-tooShort-textarea-expected.txt
A LayoutTests/fast/forms/ValidityState-tooShort-textarea.html
A LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-textarea-element/textarea-validity-valueMissing-inside-datalist-expected.txt
A LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-textarea-element/textarea-validity-valueMissing-inside-datalist.html
M Source/WebCore/html/HTMLTextAreaElement.cpp
Log Message:
-----------
<textarea> element's validity state checks shouldn't be dependent on willValidate()
https://bugs.webkit.org/show_bug.cgi?id=250453
Reviewed by Darin Adler.
This change aligns <textarea> element's validity checks with the spec, Blink / Gecko,
and <input> element's counterparts:
* valueMissing() [1] depends on mutability concept rather than "barred from constaint validation",
which are observably different only if the <textarea> is a descendant of a <datalist> element;
* tooShort() [2] / tooLong() [3] prose doesn't mention any requirement for willValidate().
Also this patch enables a follow-up revamp of updateWillValidateAndValidity() by untangling
computeValidity() and computeWillValidate() (currently the former implicitly depends on the latter).
Tests: fast/forms/ValidityState-tooShort-textarea.html
fast/forms/ValidityState-tooLong-textarea.html
imported/w3c/web-platform-tests/html/semantics/forms/the-textarea-element/textarea-validity-valueMissing-inside-datalist.html
[1] https://html.spec.whatwg.org/multipage/form-elements.html#the-textarea-element:suffering-from-being-missing
[2] https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#setting-minimum-input-length-requirements:-the-minlength-attribute:suffering-from-being-too-short
[3] https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#limiting-user-input-length:-the-maxlength-attribute:suffering-from-being-too-long
* LayoutTests/fast/forms/ValidityState-tooLong-textarea-expected.txt:
* LayoutTests/fast/forms/ValidityState-tooLong-textarea.html:
* LayoutTests/fast/forms/ValidityState-tooShort-textarea-expected.txt: Added.
* LayoutTests/fast/forms/ValidityState-tooShort-textarea.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-textarea-element/textarea-validity-valueMissing-inside-datalist-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-textarea-element/textarea-validity-valueMissing-inside-datalist.html: Added.
* Source/WebCore/html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::valueMissing const):
(WebCore::HTMLTextAreaElement::tooShort const):
(WebCore::HTMLTextAreaElement::tooLong const):
Canonical link: https://commits.webkit.org/258928@main
More information about the webkit-changes
mailing list