Bug 250325

Summary: Determine when calc() should be preserved for specified value serialization
Product: WebKit Reporter: Sam Weinig <sam>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Test none

Description Sam Weinig 2023-01-09 09:21:11 PST
Currently there is a lack of clarity on when we should be preserving calc() for specified values. For instance, we preserve it for `width` but not for `color`. This tracks getting an answer from the CSS WG on the issue and can be used to host test cases.
Comment 1 Sam Weinig 2023-01-09 09:22:29 PST
Created attachment 464424 [details]
Test
Comment 2 Sam Weinig 2023-01-09 09:23:29 PST
Filed https://github.com/w3c/csswg-drafts/issues/8290 to track the issue with the WG.
Comment 3 Sam Weinig 2023-01-09 12:47:33 PST
So the answer is we should always be preserving calc() in the specified values, and our behavior for colors in the test case is wrong.

In practice this means we should be really remove all of the "Raw" helpers in the CSS property parser and ensure we have mechanisms to preserve calc in the respective CSSValue types.
Comment 4 Radar WebKit Bug Importer 2023-01-16 09:22:15 PST
<rdar://problem/104301484>