mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Replace percent_resolved_*
functions with methods
This commit is contained in:
parent
a2c2b294d5
commit
ce7e84be72
3 changed files with 61 additions and 44 deletions
|
@ -207,6 +207,15 @@ impl<LengthPercentage> MaxSize<LengthPercentage> {
|
|||
pub fn none() -> Self {
|
||||
MaxSize::None
|
||||
}
|
||||
|
||||
/// Convert
|
||||
#[cfg(not(feature = "gecko"))]
|
||||
pub fn to_option(self) -> Option<LengthPercentage> {
|
||||
match self {
|
||||
Self::LengthPercentage(lp) => Some(lp),
|
||||
Self::None => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// A generic `<length>` | `<number>` value for the `-moz-tab-size` property.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue