Bug 216414

Summary: Consolidate BaseDateAndTimeInputType and BaseChooserOnlyDateAndTimeInputType
Product: WebKit Reporter: Aditya Keerthi <akeerthi>
Component: FormsAssignee: Aditya Keerthi <akeerthi>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, changseok, esprehn+autocc, ews-watchlist, gyuyoung.kim, hi, mifenton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
hi: review+
Patch for landing none

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>