Bug 216004 - [macOS] Update date picker when the inner control is edited
Summary: [macOS] Update date picker when the inner control is edited
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: Safari Technology Preview
Hardware: Mac Unspecified
: P2 Normal
Assignee: Aditya Keerthi
URL:
Keywords: InRadar
Depends on: 215938
Blocks:
  Show dependency treegraph
 
Reported: 2020-08-31 08:29 PDT by Aditya Keerthi
Modified: 2020-09-02 08:37 PDT (History)
11 users (show)

See Also:


Attachments
Patch (4.44 KB, patch)
2020-09-01 09:35 PDT, Aditya Keerthi
no flags Details | Formatted Diff | Diff
Patch (16.47 KB, patch)
2020-09-01 15:45 PDT, Aditya Keerthi
no flags Details | Formatted Diff | Diff
Patch for landing (16.46 KB, patch)
2020-09-01 16:00 PDT, Aditya Keerthi
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch for landing (16.46 KB, patch)
2020-09-02 07:50 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 2020-08-31 08:29:40 PDT
The value of the attached date picker and the value of the inner control should match.
Comment 1 Aditya Keerthi 2020-09-01 09:35:40 PDT
Created attachment 407687 [details]
Patch
Comment 2 Wenson Hsieh 2020-09-01 09:39:53 PDT
Comment on attachment 407687 [details]
Patch

It would be nice to have a test for this that sets the value in script and verifies that the UI updates to reflect the new value. Perhaps as a followup, though.
Comment 3 Aditya Keerthi 2020-09-01 15:45:39 PDT
Created attachment 407714 [details]
Patch
Comment 4 Wenson Hsieh 2020-09-01 15:55:38 PDT
Comment on attachment 407714 [details]
Patch

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

r=mews

> Tools/TestRunnerShared/UIScriptContext/UIScriptController.h:220
> +    virtual double dateTimePickerValue() const { notImplemented(); return false; }

Perhaps return 0; instead of false?

> Tools/WebKitTestRunner/mac/UIScriptControllerMac.mm:115
> +                    return [[(NSDatePicker*)subview dateValue] timeIntervalSince1970] * 1000;

Nit - space before the * in NSDatePicker*

> LayoutTests/fast/forms/date/date-editable-components/date-picker-update-on-edit.html:35
> +    UIHelper.keyDown("3");

It seems like this test may need to be skipped on iOS, where we don’t use editable date fields.
Comment 5 Wenson Hsieh 2020-09-01 15:57:07 PDT
Comment on attachment 407714 [details]
Patch

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

>> LayoutTests/fast/forms/date/date-editable-components/date-picker-update-on-edit.html:35
>> +    UIHelper.keyDown("3");
> 
> It seems like this test may need to be skipped on iOS, where we don’t use editable date fields.

(Ah, never mind — this directory is skipped on iOS)
Comment 6 Aditya Keerthi 2020-09-01 16:00:28 PDT
Created attachment 407716 [details]
Patch for landing
Comment 7 EWS 2020-09-02 07:47:05 PDT
ChangeLog entry in LayoutTests/ChangeLog contains OOPS!.
Comment 8 Aditya Keerthi 2020-09-02 07:50:34 PDT
Created attachment 407766 [details]
Patch for landing
Comment 9 EWS 2020-09-02 08:36:02 PDT
Committed r266461: <https://trac.webkit.org/changeset/266461>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 407766 [details].
Comment 10 Radar WebKit Bug Importer 2020-09-02 08:37:24 PDT
<rdar://problem/68211887>