Add from_computed_value() function for converting computed values to specified

This commit is contained in:
Manish Goregaokar 2016-09-11 22:24:28 +05:30
parent 153ec64c15
commit d81c6af59c
17 changed files with 555 additions and 1 deletions

View file

@ -65,6 +65,11 @@
fn to_computed_value(&self, context: &Context) -> computed_value::T {
self.0.to_computed_value(context)
}
#[inline]
fn from_computed_value(computed: &computed_value::T) -> Self {
SpecifiedValue(ToComputedValue::from_computed_value(computed))
}
}
</%helpers:longhand>
% endfor