Bug 224794 - [iOS][FCR] Update date/time picker appearance
Summary: [iOS][FCR] Update date/time picker appearance
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: Other
Hardware: iPhone / iPad Unspecified
: P2 Normal
Assignee: Aditya Keerthi
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-04-19 18:44 PDT by Aditya Keerthi
Modified: 2021-04-20 15:45 PDT (History)
4 users (show)

See Also:


Attachments
Patch (42.24 KB, patch)
2021-04-19 18:53 PDT, Aditya Keerthi
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (42.54 KB, patch)
2021-04-19 19:14 PDT, Aditya Keerthi
wenson_hsieh: review+
Details | Formatted Diff | Diff
Patch for landing (42.46 KB, patch)
2021-04-20 14:52 PDT, Aditya Keerthi
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aditya Keerthi 2021-04-19 18:44:30 PDT
...
Comment 1 Aditya Keerthi 2021-04-19 18:44:48 PDT
<rdar://problem/76785859>
Comment 2 Aditya Keerthi 2021-04-19 18:53:39 PDT
Created attachment 426505 [details]
Patch
Comment 3 Aditya Keerthi 2021-04-19 19:14:13 PDT
Created attachment 426508 [details]
Patch
Comment 4 Wenson Hsieh 2021-04-20 14:25:59 PDT
Comment on attachment 426508 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=426508&action=review

> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:8382
> +    RetainPtr<UITargetedPreview> targetedPreview = createFallbackTargetedPreview(self, self.containerForContextMenuHintPreviews, _focusedElementInformation.interactionRect, backgroundColor);

Nit - `auto`.

> Source/WebKit/UIProcess/ios/forms/WKDateTimeInputControl.mm:71
> +- (instancetype)initWithDelegate:(id<WKDateTimePickerViewControllerDelegate>)delegate

Nit - space between `id` and `<`.

(AFAIK, the rule we typically follow is space before protocols, but no space before concrete types like in `NSArray<Foo *> *`).

> Source/WebKit/UIProcess/ios/forms/WKDateTimeInputControl.mm:94
> +    RetainPtr<UIVisualEffectView> backgroundView = adoptNS([[UIVisualEffectView alloc] initWithEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleSystemMaterial]]);

Nit - `auto`

> Source/WebKit/UIProcess/ios/forms/WKDateTimeInputControl.mm:110
> +    RetainPtr<UIView> toolbarView = adoptNS([[UIView alloc] init]);

Nit - `auto`

> Source/WebKit/UIProcess/ios/forms/WKDateTimeInputControl.mm:121
> +    RetainPtr<UIView> separatorView = adoptNS([[UIView alloc] init]);

(Ditto)

> Source/WebKit/UIProcess/ios/forms/WKDateTimeInputControl.mm:524
> +    [_view updateFocusedElementValueAsNumber:([date timeIntervalSince1970] + [self _timeZoneOffsetFromGMT:date]) * kMillisecondsPerSecond];

Nit - `date.timeIntervalSince1970`
Comment 5 Aditya Keerthi 2021-04-20 14:52:08 PDT
Created attachment 426597 [details]
Patch for landing
Comment 6 EWS 2021-04-20 15:45:22 PDT
Committed r276325 (236805@main): <https://commits.webkit.org/236805@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 426597 [details].