Bug 214423 - Make AnyStepHandling an enum class
Summary: Make AnyStepHandling an enum class
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Rob Buis
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-07-16 14:24 PDT by Rob Buis
Modified: 2020-07-21 09:07 PDT (History)
9 users (show)

See Also:


Attachments
Patch (18.32 KB, patch)
2020-07-16 14:26 PDT, Rob Buis
no flags Details | Formatted Diff | Diff
Patch (18.28 KB, patch)
2020-07-20 06:42 PDT, Rob Buis
no flags Details | Formatted Diff | Diff
Patch (1.18 KB, patch)
2020-07-20 10:46 PDT, Rob Buis
no flags Details | Formatted Diff | Diff
Patch (2.33 KB, patch)
2020-07-20 10:59 PDT, Rob Buis
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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].