style: Add resolution support to calc()

Differential Revision: https://phabricator.services.mozilla.com/D172338
This commit is contained in:
Emilio Cobos Álvarez 2023-03-13 11:33:22 +00:00 committed by Martin Robinson
parent 76e8eeda72
commit 2c986f0005
6 changed files with 171 additions and 47 deletions

View file

@ -36,12 +36,12 @@ impl ToComputedValue for specified::Resolution {
#[inline]
fn to_computed_value(&self, _: &Context) -> Self::ComputedValue {
Resolution(self.to_dppx())
Resolution(self.dppx())
}
#[inline]
fn from_computed_value(computed: &Self::ComputedValue) -> Self {
specified::Resolution::Dppx(computed.dppx())
specified::Resolution::from_dppx(computed.dppx())
}
}