Bug 237982 - Calc() cleanup
Summary: Calc() cleanup
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nikos Mouchtaris
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-03-16 14:39 PDT by Nikos Mouchtaris
Modified: 2022-03-18 18:01 PDT (History)
8 users (show)

See Also:


Attachments
Patch (8.02 KB, patch)
2022-03-16 14:46 PDT, Nikos Mouchtaris
no flags Details | Formatted Diff | Diff
Patch (6.32 KB, patch)
2022-03-17 16:37 PDT, Nikos Mouchtaris
no flags Details | Formatted Diff | Diff
Patch (7.78 KB, patch)
2022-03-17 17:04 PDT, Nikos Mouchtaris
no flags Details | Formatted Diff | Diff
Patch (8.01 KB, patch)
2022-03-17 17:31 PDT, Nikos Mouchtaris
no flags Details | Formatted Diff | Diff
Patch (7.04 KB, patch)
2022-03-18 12:26 PDT, Nikos Mouchtaris
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikos Mouchtaris 2022-03-16 14:39:33 PDT
Cleanup due to addition of several math functions.
Comment 1 Nikos Mouchtaris 2022-03-16 14:46:04 PDT
Created attachment 454896 [details]
Patch
Comment 2 Nikos Mouchtaris 2022-03-17 16:37:20 PDT
Created attachment 455043 [details]
Patch
Comment 3 Nikos Mouchtaris 2022-03-17 17:04:41 PDT
Created attachment 455047 [details]
Patch
Comment 4 Nikos Mouchtaris 2022-03-17 17:31:24 PDT
Created attachment 455053 [details]
Patch
Comment 5 Simon Fraser (smfr) 2022-03-18 10:18:56 PDT
Comment on attachment 455053 [details]
Patch

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

> Source/WebCore/css/calc/CSSCalcOperationNode.cpp:76
> +    default:

The reason to not use `default` is that the compiler will warn you if you add a new enum value, but forget to add it to all the switch statements.

> Source/WebCore/css/calc/CSSCalcOperationNode.cpp:146
> +        default:

Ditto.
Comment 6 Nikos Mouchtaris 2022-03-18 12:26:00 PDT
Created attachment 455125 [details]
Patch
Comment 7 Nikos Mouchtaris 2022-03-18 12:31:39 PDT
(In reply to Simon Fraser (smfr) from comment #5)
> Comment on attachment 455053 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=455053&action=review
> 
> > Source/WebCore/css/calc/CSSCalcOperationNode.cpp:76
> > +    default:
> 
> The reason to not use `default` is that the compiler will warn you if you
> add a new enum value, but forget to add it to all the switch statements.
> 
> > Source/WebCore/css/calc/CSSCalcOperationNode.cpp:146
> > +        default:
> 
> Ditto.

Yeah I didn't think that was necessary for these functions as they are only really used for the operators.
Comment 8 EWS 2022-03-18 18:00:20 PDT
Committed r291516 (248622@main): <https://commits.webkit.org/248622@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 455125 [details].
Comment 9 Radar WebKit Bug Importer 2022-03-18 18:01:17 PDT
<rdar://problem/90513089>