[webkit-changes] [WebKit/WebKit] b148a4: Fix :user-invalid/:user-valid interactions with fo...
Tim Nguyen
noreply at github.com
Tue Aug 8 15:15:28 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b148a49fc1bd68975a06d799062e7c36a12026eb
https://github.com/WebKit/WebKit/commit/b148a49fc1bd68975a06d799062e7c36a12026eb
Author: Tim Nguyen <ntim at apple.com>
Date: 2023-08-08 (Tue, 08 Aug 2023)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/css/selectors/user-invalid-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/selectors/user-invalid.html
M LayoutTests/imported/w3c/web-platform-tests/css/selectors/user-valid-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/selectors/user-valid.html
M LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/css/selectors/user-invalid-expected.txt
M LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/css/selectors/user-valid-expected.txt
M Source/WebCore/html/FormAssociatedCustomElement.cpp
M Source/WebCore/html/HTMLFormElement.cpp
M Source/WebCore/html/HTMLInputElement.cpp
M Source/WebCore/html/HTMLOutputElement.cpp
M Source/WebCore/html/HTMLSelectElement.cpp
M Source/WebCore/html/HTMLTextAreaElement.cpp
Log Message:
-----------
Fix :user-invalid/:user-valid interactions with form reset & submission
https://bugs.webkit.org/show_bug.cgi?id=257988
rdar://110677832
Reviewed by Aditya Keerthi.
Form submission should trigger user-validation styles, to do this, we set the user-interacted flag to true on form submission (but only initiated from user input).
Form reset should reset form control user-interacted flags.
This matches the WIP spec PR at: https://github.com/whatwg/html/pull/9047
* LayoutTests/imported/w3c/web-platform-tests/css/selectors/user-invalid-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/selectors/user-invalid.html:
* LayoutTests/imported/w3c/web-platform-tests/css/selectors/user-valid-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/selectors/user-valid.html:
* LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/css/selectors/user-invalid-expected.txt:
* LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/css/selectors/user-valid-expected.txt:
* Source/WebCore/html/FormAssociatedCustomElement.cpp:
(WebCore::FormAssociatedCustomElement::reset):
* Source/WebCore/html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::submitIfPossible):
* Source/WebCore/html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::reset):
* Source/WebCore/html/HTMLOutputElement.cpp:
(WebCore::HTMLOutputElement::reset):
* Source/WebCore/html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::reset):
* Source/WebCore/html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::reset):
Canonical link: https://commits.webkit.org/266702@main
More information about the webkit-changes
mailing list