Bug 249027 - [@property] Add more syntax types
Summary: [@property] Add more syntax types
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Antti Koivisto
URL:
Keywords: InRadar
Depends on:
Blocks: 189692
  Show dependency treegraph
 
Reported: 2022-12-09 10:06 PST by Antti Koivisto
Modified: 2022-12-11 02:52 PST (History)
9 users (show)

See Also:


Attachments
Patch (60.66 KB, patch)
2022-12-09 10:09 PST, Antti Koivisto
no flags Details | Formatted Diff | Diff
Patch (61.03 KB, patch)
2022-12-09 10:10 PST, Antti Koivisto
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (60.87 KB, patch)
2022-12-09 11:50 PST, Antti Koivisto
no flags Details | Formatted Diff | Diff

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