WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
210613
Date and Time form controls not showing correct initial values on immediate second invocation.
https://bugs.webkit.org/show_bug.cgi?id=210613
Summary
Date and Time form controls not showing correct initial values on immediate s...
Megan Gardner
Reported
2020-04-16 11:09:34 PDT
Date and Time form controls not showing correct initial values on immediate second invocation.
Attachments
Patch
(22.16 KB, patch)
2020-04-17 17:00 PDT
,
Megan Gardner
no flags
Details
Formatted Diff
Diff
Patch for landing
(22.10 KB, patch)
2020-04-20 14:17 PDT
,
Megan Gardner
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Megan Gardner
Comment 1
2020-04-17 17:00:13 PDT
Created
attachment 396817
[details]
Patch
Wenson Hsieh
Comment 2
2020-04-17 17:26:20 PDT
Comment on
attachment 396817
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=396817&action=review
> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:4325 > +- (void)updateValueAsNumberForViewController:(double)value
Nit - the “ForViewController:" suffix makes it sound like the argument should be a `UIViewController *`, but instead it’s a value. What about naming these -updateFocusedElementValueAsNumber: and -updateFocusedElementValue: instead?
> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:8488 > +#elif PLATFORM(IOS)
This excludes Mac Catalyst — is that intentional?
> Source/WebKit/UIProcess/ios/forms/WKFormInputControl.mm:153 > + NSDateComponents *components = [calendar components:(NSCalendarUnitHour) fromDate:[_datePicker date]];
Nit - don’t need () around NSCalendarUnitMinute.
> Source/WebKit/UIProcess/ios/forms/WKFormInputControl.mm:161 > + NSDateComponents *components = [calendar components:(NSCalendarUnitMinute) fromDate:[_datePicker date]];
Nit - ditto regarding the ().
> Source/WebKit/UIProcess/ios/forms/WKFormInputControl.mm:280 > + date = [[self dateFormatterForPicker] dateFromString:timeString];
Nit - I don’t think the date local variable adds much value here, but if you prefer to include it, I’d move this down so that it’s just: NSDate *date = [[self dateFormatterForPicker] dateFromString:timeString];
> Source/WebKit/UIProcess/ios/forms/WKFormInputControl.mm:328 > + if ([self.control isKindOfClass:WKDateTimePopover.class])
Nit - WKDateTimePopover and WKDateTimePicker are not subclasses of each other, so you don’t need the return statements here.
Megan Gardner
Comment 3
2020-04-20 14:17:35 PDT
Created
attachment 397014
[details]
Patch for landing
EWS
Comment 4
2020-04-20 14:45:07 PDT
Committed
r260402
: <
https://trac.webkit.org/changeset/260402
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 397014
[details]
.
Radar WebKit Bug Importer
Comment 5
2020-04-20 14:46:19 PDT
<
rdar://problem/62076826
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug