style: Add the size-adjust descriptor to the style system

Differential Revision: https://phabricator.services.mozilla.com/D110022
This commit is contained in:
Oriol Brufau 2023-05-16 22:56:28 +02:00
parent 3024516019
commit 4b973885a3
2 changed files with 15 additions and 1 deletions

View file

@ -186,3 +186,11 @@ impl Parse for NonNegativePercentage {
Ok(NonNegative(Percentage::parse_non_negative(context, input)?))
}
}
impl NonNegativePercentage {
/// Convert to ComputedPercentage, for FontFaceRule size-adjust getter.
#[inline]
pub fn compute(&self) -> ComputedPercentage {
ComputedPercentage(self.0.get())
}
}