Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f8ae15fa4a05a33a73204aa3c7719055f30ab5c8
      
https://github.com/WebKit/WebKit/commit/f8ae15fa4a05a33a73204aa3c7719055f30ab5c8
  Author: Chris Dumez <[email protected]>
  Date:   2026-04-15 (Wed, 15 Apr 2026)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/html/semantics/selectors/pseudo-classes/inrange-outofrange-expected.txt
    M Source/WebCore/html/DateInputType.cpp
    M Source/WebCore/html/DateTimeLocalInputType.cpp
    M Source/WebCore/html/InputType.cpp
    M Source/WebCore/html/InputType.h
    M Source/WebCore/html/MonthInputType.cpp
    M Source/WebCore/html/NumberInputType.cpp
    M Source/WebCore/html/TimeInputType.cpp
    M Source/WebCore/html/WeekInputType.cpp

  Log Message:
  -----------
  Date/time input types without min/max should not match :in-range pseudo-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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to