Bug 216414 - Consolidate BaseDateAndTimeInputType and BaseChooserOnlyDateAndTimeInputType
Summary: Consolidate BaseDateAndTimeInputType and BaseChooserOnlyDateAndTimeInputType
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Aditya Keerthi
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-09-11 11:33 PDT by Aditya Keerthi
Modified: 2020-09-13 13:33 PDT (History)
9 users (show)

See Also:


Attachments
Patch (48.52 KB, patch)
2020-09-11 11:44 PDT, Aditya Keerthi
hi: review+
Details | Formatted Diff | Diff
Patch for landing (48.82 KB, patch)
2020-09-11 17:49 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-09-11 11:33:13 PDT
BaseChooserOnlyDateAndTimeInputType is the only derived class of BaseDateAndTimeInputType.
Comment 1 Aditya Keerthi 2020-09-11 11:44:37 PDT
Created attachment 408551 [details]
Patch
Comment 2 Devin Rousso 2020-09-11 14:25:00 PDT
Comment on attachment 408551 [details]
Patch

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

r=me

> Source/WebCore/html/BaseDateAndTimeInputType.cpp:312
> +        return;
> +    DateTimeChooserParameters parameters;

NIT: I'd add a newline here

> Source/WebCore/html/BaseDateAndTimeInputType.h:46
> +enum class DateTimeFormatValidationResults : uint8_t {

NIT: should this be inside `BaseDateAndTimeInputType` instead of in the `WebCore` namespace?

> Source/WebCore/html/DateTimeLocalInputType.h:42
> +        : BaseDateAndTimeInputType(element) { }

Style: the `{ }` should probably be on separate lines too if the constructor is more than one line

> Source/WebCore/html/MonthInputType.h:42
> +        : BaseDateAndTimeInputType(element) { }

ditto (DateTimeLocalInputType.h:42)

> Source/WebCore/html/WeekInputType.h:42
> +        : BaseDateAndTimeInputType(element) { }

ditto (DateTimeLocalInputType.h:42)
Comment 3 Aditya Keerthi 2020-09-11 17:49:36 PDT
Created attachment 408575 [details]
Patch for landing
Comment 4 Aditya Keerthi 2020-09-11 17:50:51 PDT
(In reply to Devin Rousso from comment #2)
> Comment on attachment 408551 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=408551&action=review
> 
> r=me

Thanks for the review!

> > Source/WebCore/html/BaseDateAndTimeInputType.cpp:312
> > +        return;
> > +    DateTimeChooserParameters parameters;
> 
> NIT: I'd add a newline here

Added.

> > Source/WebCore/html/BaseDateAndTimeInputType.h:46
> > +enum class DateTimeFormatValidationResults : uint8_t {
> 
> NIT: should this be inside `BaseDateAndTimeInputType` instead of in the
> `WebCore` namespace?

Good idea! I also moved `DateTimeFormatValidator` inside `BaseDateAndTimeInputType`.
 
> > Source/WebCore/html/DateTimeLocalInputType.h:42
> > +        : BaseDateAndTimeInputType(element) { }
> 
> Style: the `{ }` should probably be on separate lines too if the constructor
> is more than one line

Done.
Comment 5 EWS 2020-09-13 13:32:28 PDT
Committed r267003: <https://trac.webkit.org/changeset/267003>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 408575 [details].
Comment 6 Radar WebKit Bug Importer 2020-09-13 13:33:21 PDT
<rdar://problem/68812903>