mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
style: Add the size-adjust descriptor to the style system
Differential Revision: https://phabricator.services.mozilla.com/D110022
This commit is contained in:
parent
3024516019
commit
4b973885a3
2 changed files with 15 additions and 1 deletions
|
@ -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())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue