Bug 249027

Summary: [@property] Add more syntax types
Product: WebKit Reporter: Antti Koivisto <koivisto>
Component: CSSAssignee: Antti Koivisto <koivisto>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, macpherson, menard, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 189692    
Attachments:
Description Flags
Patch
none
Patch
ews-feeder: commit-queue-
Patch none

Description Antti Koivisto 2022-12-09 10:06:55 PST
Add Percentage, Integer, Number and Angle types.
Comment 1 Radar WebKit Bug Importer 2022-12-09 10:07:16 PST
<rdar://problem/103184764>
Comment 2 Antti Koivisto 2022-12-09 10:09:10 PST
Created attachment 463963 [details]
Patch
Comment 3 Antti Koivisto 2022-12-09 10:10:55 PST
Created attachment 463964 [details]
Patch
Comment 4 Antti Koivisto 2022-12-09 11:50:07 PST
Created attachment 463967 [details]
Patch
Comment 5 Darin Adler 2022-12-09 12:06:34 PST
Comment on attachment 463967 [details]
Patch

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

> Source/WebCore/css/CSSCustomPropertyValue.h:46
> +    struct NumericSyntaxValue {
> +        double value;
> +        CSSUnitType unitType;
> +
> +        bool operator==(const NumericSyntaxValue&) const = default;
> +    };
> +    using VariantValue = std::variant<std::monostate, Ref<CSSVariableReferenceValue>, CSSValueID, Ref<CSSVariableData>, Length, NumericSyntaxValue>;

I want to use this kind of type for some other purposes too. Like when CSSProperties.json writes out "initial values", I want a constexpr value that can be a CSSValueID or numeric syntax.
Comment 6 EWS 2022-12-10 00:28:57 PST
Committed 257678@main (fba580ad5100): <https://commits.webkit.org/257678@main>

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