[webkit-changes] [WebKit/WebKit] 8af24b: REGRESSION (286777 at main): [iOS] Crash when tapping...
Aditya Keerthi
noreply at github.com
Mon Dec 23 14:31:30 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8af24b25e9e2fec43f81fd4d5f9d3c0b275f5b04
https://github.com/WebKit/WebKit/commit/8af24b25e9e2fec43f81fd4d5f9d3c0b275f5b04
Author: Aditya Keerthi <akeerthi at apple.com>
Date: 2024-12-23 (Mon, 23 Dec 2024)
Changed paths:
M Source/WebKit/UIProcess/ios/forms/WKDateTimeInputControl.mm
Log Message:
-----------
REGRESSION (286777 at main): [iOS] Crash when tapping on date input on devices with 12-hour time
https://bugs.webkit.org/show_bug.cgi?id=285106
rdar://141879717
Reviewed by Richard Robinson.
286777 at main introduced a new use of `NSDateFormatter` in the date picker
initialization path. This formatter did not specify a locale, but used a
format string with 24-hour time.
When working with fixed format dates, the `locale` property should be a POSIX
locale, and the `timeZone` property should be UTC, as described in
https://developer.apple.com/documentation/foundation/nsdateformatter.
Without specifying the aforementioned properties, `dateFromString:` may return
`nil`. A crash would then be encountered when creating an `NSDateInterval` with
a `nil` end date.
No new tests. This issue is reproducible when setting `AppleICUForce12HourTime`
to `YES` in the global domain. However, the preference must be set prior to
process launch, which is not possible when writing an API test. Additionally,
it is not desirable to set this bit for all tests.
* Source/WebKit/UIProcess/ios/forms/WKDateTimeInputControl.mm:
(-[WKDateTimePicker initWithView:inputType:]):
Canonical link: https://commits.webkit.org/288258@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list