Bug 214423

Summary: Make AnyStepHandling an enum class
Product: WebKit Reporter: Rob Buis <rbuis>
Component: New BugsAssignee: Rob Buis <rbuis>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, changseok, darin, esprehn+autocc, ews-watchlist, gyuyoung.kim, mifenton, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

Description Rob Buis 2020-07-16 14:24:27 PDT
Make AnyStepHandling an enum class since this is more readable and allows
us to have less includes in header files.
Comment 1 Rob Buis 2020-07-16 14:26:29 PDT
Created attachment 404483 [details]
Patch
Comment 2 youenn fablet 2020-07-20 06:29:38 PDT
Comment on attachment 404483 [details]
Patch

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

> Source/WebCore/html/HTMLInputElement.cpp:2123
> +    StepRange stepRange = createStepRange(AnyStepHandling::Reject);

auto

> Source/WebCore/html/RangeInputType.cpp:208
> +    StepRange stepRange(createStepRange(AnyStepHandling::Reject));

auto stepRange = ...
Ditto below.
Comment 3 Rob Buis 2020-07-20 06:42:16 PDT
Created attachment 404713 [details]
Patch
Comment 4 EWS 2020-07-20 07:13:41 PDT
Committed r264600: <https://trac.webkit.org/changeset/264600>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 404713 [details].
Comment 5 Radar WebKit Bug Importer 2020-07-20 07:14:14 PDT
<rdar://problem/65823760>
Comment 6 Darin Adler 2020-07-20 10:33:36 PDT
Comment on attachment 404713 [details]
Patch

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

> Source/WebCore/html/StepRange.h:31
> -enum AnyStepHandling { RejectAny, AnyIsDefaultStep };
> +enum class AnyStepHandling {
> +    Reject,
> +    Default
> +};

Add a : bool here?

I think this was good on a single line, a little disappointed it’s now on multiple lines.

> Source/WebCore/html/StepRange.h:33
>  enum class RangeLimitations {

Ditto.
Comment 7 Rob Buis 2020-07-20 10:46:22 PDT
Reopening to attach new patch.
Comment 8 Rob Buis 2020-07-20 10:46:25 PDT
Created attachment 404727 [details]
Patch
Comment 9 Darin Adler 2020-07-20 10:54:30 PDT
Comment on attachment 404727 [details]
Patch

Also need to add the ": bool" anywhere these are forward declared.
Comment 10 Rob Buis 2020-07-20 10:59:13 PDT
Created attachment 404729 [details]
Patch
Comment 11 Rob Buis 2020-07-20 10:59:39 PDT
(In reply to Darin Adler from comment #9)
> Comment on attachment 404727 [details]
> Patch
> 
> Also need to add the ": bool" anywhere these are forward declared.

Yeah, I was a bit too quick, should be green this time.
Comment 12 EWS 2020-07-21 09:07:15 PDT
Committed r264656: <https://trac.webkit.org/changeset/264656>

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