| Summary: | Change CSSValue types to have immutable value semantics | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Sam Weinig <sam> |
| Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW --- | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Local Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=106175 | ||
| Bug Depends on: | 246315, 246594 | ||
| Bug Blocks: | |||
To create a clear boundary and allow for more caching opportunities, we should convert the CSSValue types to have immutable value semantics, moving whatever remains to the style / style building system. In the end, I would like to have a type for each possible top level css value, and make CSSValue itself a type-erasing wrapper of sorts: struct CSSValue { std::variant< // Each css value type here. > value; }; We can use this opportunity to create more strongly typed results coming out of the parser, so style building does not have to do quite as much type checking or assuming.