[css-properties-values-api] properties_and_values::Value should implement ToShmem
Categories
(Core :: CSS Parsing and Computation, enhancement)
Tracking
()
People
(Reporter: zrhoffman, Unassigned)
References
Details
In order to make ComputedPropertyValue
<https://searchfox.org/mozilla-central/rev/9982a76fe95c70f7c2dca2d60bd78e015313924d/servo/components/style/properties_and_values/value.rs#15> an enum with a variant Parsed(properties_and_values::Value)
, properties_and_values::Value
<https://searchfox.org/mozilla-central/rev/9982a76fe95c70f7c2dca2d60bd78e015313924d/servo/components/style/properties_and_values/value.rs#195> will need to implement ToShmem
since VariableValue
<https://searchfox.org/mozilla-central/rev/9982a76fe95c70f7c2dca2d60bd78e015313924d/servo/components/style/custom_properties.rs#195> already does.
Comment 1•1 year ago
|
||
Why? ToShmem should only be needed for specified values, right?
Reporter | ||
Comment 2•1 year ago
|
||
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?
Comment 3•1 year ago
|
||
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.
Reporter | ||
Comment 4•1 year ago
|
||
That makes sense, let's keep the specified type the same.
Closing bug 1881119, as it is not necessary to complete bug 1864736.
Description
•