Date/time input types without min/max should not match :in-range pseudo-class#62793
Merged
webkit-commit-queue merged 1 commit intoApr 15, 2026
Merged
Conversation
Collaborator
|
EWS run on previous version of this PR (hash 36ba74b) Details
|
36ba74b to
2c601d3
Compare
Collaborator
|
EWS run on current version of this PR (hash 2c601d3) Details
|
annevk
approved these changes
Apr 15, 2026
Contributor
annevk
left a comment
There was a problem hiding this comment.
I find ::Invalid a bit confusing given that these controls are valid, but I'm not sure if renaming that to ::NotApplicable would actually be good in the larger scheme of things and that's probably best done as a separate refactor anyway.
…do-class https://bugs.webkit.org/show_bug.cgi?id=312344 Reviewed by Anne van Kesteren. Date and time input types (date, time, week, month, datetime-local) unconditionally passed RangeLimitations::Valid when creating their StepRange, causing inputs without min/max attributes to incorrectly match :in-range. NumberInputType correctly only set Valid when a min or max attribute was actually present and parseable. Apply the same pattern from NumberInputType to all five date/time input types: start with RangeLimitations::Invalid and only promote to Valid when an attribute parses to a finite number. No new tests, rebaselined existing WPT test that was already passing in Chrome and Firefox. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/selectors/pseudo-classes/inrange-outofrange-expected.txt: * Source/WebCore/html/DateInputType.cpp: (WebCore::DateInputType::createStepRange const): * Source/WebCore/html/DateTimeLocalInputType.cpp: (WebCore::DateTimeLocalInputType::createStepRange const): * Source/WebCore/html/MonthInputType.cpp: (WebCore::MonthInputType::createStepRange const): * Source/WebCore/html/TimeInputType.cpp: (WebCore::TimeInputType::createStepRange const): * Source/WebCore/html/WeekInputType.cpp: (WebCore::WeekInputType::createStepRange const): Canonical link: https://commits.webkit.org/311279@main
2c601d3 to
f8ae15f
Compare
Collaborator
|
Committed 311279@main (f8ae15f): https://commits.webkit.org/311279@main Reviewed commits have been landed. Closing PR #62793 and removing active labels. |
This file contains hidden or 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
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.
f8ae15f
2c601d3
🧪 win-tests🧪 ios-wk2-wpt