[webkit-changes] [WebKit/WebKit] 6a08e9: Input[type=date] with invalid date should return e...

Ahmad Saleem noreply at github.com
Mon May 8 00:33:50 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6a08e90633f7219e33c16a58f294c5a5a7f32d4a
      https://github.com/WebKit/WebKit/commit/6a08e90633f7219e33c16a58f294c5a5a7f32d4a
  Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
  Date:   2023-05-08 (Mon, 08 May 2023)

  Changed paths:
    M LayoutTests/fast/forms/date/date-editable-components/date-editable-components-keyboard-events-expected.txt
    M LayoutTests/fast/forms/date/date-editable-components/date-editable-components-keyboard-events.html
    M Source/WebCore/html/BaseDateAndTimeInputType.cpp

  Log Message:
  -----------
  Input[type=date] with invalid date should return empty string for value IDL attribute instead of the default value

https://bugs.webkit.org/show_bug.cgi?id=120038

Reviewed by Ryosuke Niwa.

This patch aligns WebKit with Chromium / Blink and Firefox / Gecko.

Merge - https://chromium.googlesource.com/chromium/blink/+/cb52052e3522824fa9ffc73cb34667492d47d976

BaseDateAndTimeInputType::sanitizeValue should return an empty string if the
input string is invalid.

* Source/WebCore/html/BaseDateAndTimeInputType.cpp
(BaseDateAndTimeInputType::sanitizeValue): Return 'emptyString'
* LayoutTests/fast/forms/date/date-editable-components/date-editable-components-keyboard-events.html: Add 'emptyString' test
* LayoutTests/fast/forms/date/date-editable-components/date-editable-components-keyboard-events-expected.txt: Update Expectations for new sub-test

Canonical link: https://commits.webkit.org/263784@main




More information about the webkit-changes mailing list