Closed Bug 1881119 Opened 1 year ago Closed 1 year ago

[css-properties-values-api] properties_and_values::Value should implement ToShmem

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement

Tracking

()

RESOLVED INVALID

People

(Reporter: zrhoffman, Unassigned)

References

Details

Why? ToShmem should only be needed for specified values, right?

The current VariableValue struct is used at parsed-value time, at computed-value time, when animating, etc. Bug 1864736 is about replacing that struct with something like

pub enum VariableValue {
    Unparsed(Universal),
    Parsed(properties_and_values::Value),
}

(where Universal is the current VariableValue struct), right? If so, then in order to not need to implement ToShmem for properties_and_values::Value, this new enum would only replace VariableValue at computed-value time and onwards.

Or maybe I'm misunderstanding bug 1864736?

Well I was expecting the specified type to remain the same, and the computed value to be the enum. Not sure how easy to do that would be in practice but that's more in line with how all other properties work generally.

That makes sense, let's keep the specified type the same.

Closing bug 1881119, as it is not necessary to complete bug 1864736.

Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → INVALID
Blocks: 1877383
No longer blocks: 1877383
You need to log in before you can comment on or make changes to this bug.