diff options
Diffstat (limited to 'components/style/properties/helpers.mako.rs')
-rw-r--r-- | components/style/properties/helpers.mako.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/components/style/properties/helpers.mako.rs b/components/style/properties/helpers.mako.rs index 43b3d7bda17..4a49673dbc0 100644 --- a/components/style/properties/helpers.mako.rs +++ b/components/style/properties/helpers.mako.rs @@ -147,6 +147,12 @@ fn to_computed_value(&self, context: &Context) -> computed_value::T { computed_value::T(self.0.iter().map(|x| x.to_computed_value(context)).collect()) } + #[inline] + fn from_computed_value(computed: &computed_value::T) -> Self { + SpecifiedValue(computed.0.iter() + .map(|x| ToComputedValue::from_computed_value(x)) + .collect()) + } } % else: ${caller.body()} |