-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add test case for ElementInternals validation customError #51039
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`customError` in ValidityState should only be true, if explicitly set. This is currently correct in Chromium and Firefox, but not WebKit.
keithamus
reviewed
Mar 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a correct change and worthwhile writing a test for, but I think it should be inside a separate, new, test()
function. Having tests with lots of asserts is difficult to implement against, vs smaller individual tests.
keithamus
approved these changes
Mar 2, 2025
This was referenced Mar 4, 2025
kyubisation
added a commit
to kyubisation/WebKit
that referenced
this pull request
Mar 8, 2025
…g setValidity https://bugs.webkit.org/show_bug.cgi?id=261432 Reviewed by NOBODY (OOPS!). The current implementation toggles customError when any validationMessage is set, which works for native form elements, but breaks with ElementInternals. This PR fixes this by overriding the customError check in FormAssociatedCustomElement. (Test was added in web-platform-tests/wpt#51039) * LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/ElementInternals-validation.html: * Source/WebCore/html/FormAssociatedCustomElement.h: * Source/WebCore/html/FormListedElement.h: * WebKit.xcworkspace/xcshareddata/xcschemes/Everything up to WebKit + Tools.xcscheme:
kyubisation
added a commit
to kyubisation/WebKit
that referenced
this pull request
Mar 8, 2025
…g setValidity https://bugs.webkit.org/show_bug.cgi?id=261432 Reviewed by NOBODY (OOPS!). The current implementation toggles customError when any validationMessage is set, which works for native form elements, but breaks with ElementInternals. This PR fixes this by overriding the customError check in FormAssociatedCustomElement. (Test was added in web-platform-tests/wpt#51039) * LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/ElementInternals-validation-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/ElementInternals-validation.html: * Source/WebCore/html/FormAssociatedCustomElement.h: * Source/WebCore/html/FormListedElement.h:
kyubisation
added a commit
to kyubisation/WebKit
that referenced
this pull request
Mar 8, 2025
…g setValidity https://bugs.webkit.org/show_bug.cgi?id=261432 Reviewed by NOBODY (OOPS!). The current implementation toggles customError when any validationMessage is set, which works for native form elements, but breaks with ElementInternals. This PR fixes this by overriding the customError check in FormAssociatedCustomElement. (Test was added in web-platform-tests/wpt#51039) * LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/ElementInternals-validation-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/ElementInternals-validation.html: * Source/WebCore/html/FormAssociatedCustomElement.h: * Source/WebCore/html/FormListedElement.h:
kyubisation
added a commit
to kyubisation/WebKit
that referenced
this pull request
Mar 8, 2025
…g setValidity https://bugs.webkit.org/show_bug.cgi?id=261432 Reviewed by NOBODY (OOPS!). The current implementation toggles customError when any validationMessage is set, which works for native form elements, but breaks with ElementInternals. This PR fixes this by overriding the customError check in FormAssociatedCustomElement. (Test was added in web-platform-tests/wpt#51039) * LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/ElementInternals-validation-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/ElementInternals-validation.html: * Source/WebCore/html/FormAssociatedCustomElement.h: * Source/WebCore/html/FormListedElement.h:
kyubisation
added a commit
to kyubisation/WebKit
that referenced
this pull request
Mar 9, 2025
…g setValidity https://bugs.webkit.org/show_bug.cgi?id=261432 Reviewed by NOBODY (OOPS!). The current implementation toggles customError when any validationMessage is set, which works for native form elements, but breaks with ElementInternals. This PR fixes this by overriding the customError check in FormAssociatedCustomElement. (Test was added in web-platform-tests/wpt#51039) * LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/ElementInternals-validation-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/ElementInternals-validation.html: * LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/custom-elements/form-associated/ElementInternals-validation-expected.txt * Source/WebCore/html/FormAssociatedCustomElement.h: * Source/WebCore/html/FormListedElement.h:
kyubisation
added a commit
to kyubisation/WebKit
that referenced
this pull request
Mar 9, 2025
…g setValidity https://bugs.webkit.org/show_bug.cgi?id=261432 Reviewed by NOBODY (OOPS!). The current implementation toggles customError when any validationMessage is set, which works for native form elements, but breaks with ElementInternals. This PR fixes this by overriding the customError check in FormAssociatedCustomElement. (Test was added in web-platform-tests/wpt#51039) * LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/ElementInternals-validation-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/ElementInternals-validation.html: * LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/custom-elements/form-associated/ElementInternals-validation-expected.txt * Source/WebCore/html/FormAssociatedCustomElement.h: * Source/WebCore/html/FormListedElement.h:
webkit-commit-queue
pushed a commit
to kyubisation/WebKit
that referenced
this pull request
Mar 10, 2025
…g setValidity https://bugs.webkit.org/show_bug.cgi?id=261432 Reviewed by Ryosuke Niwa. The current implementation toggles customError when any validationMessage is set, which works for native form elements, but breaks with ElementInternals. This PR fixes this by overriding the customError check in FormAssociatedCustomElement. (Test was added in web-platform-tests/wpt#51039) * LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/ElementInternals-validation-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/ElementInternals-validation.html: * LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/custom-elements/form-associated/ElementInternals-validation-expected.txt * Source/WebCore/html/FormAssociatedCustomElement.h: * Source/WebCore/html/FormListedElement.h: Canonical link: https://commits.webkit.org/291878@main
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
customError
in ValidityState should only be true, if explicitly set. This is currently correct in Chromium and Firefox, but not WebKit.