mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Make use of predefined_type for some aliased types
This commit is contained in:
parent
61a17993eb
commit
63965f55f5
8 changed files with 81 additions and 174 deletions
|
@ -59,7 +59,23 @@ pub type HorizontalPosition = GenericHorizontalPosition<LengthOrPercentage>;
|
|||
|
||||
impl Copy for HorizontalPosition {}
|
||||
|
||||
impl HorizontalPosition {
|
||||
#[inline]
|
||||
/// Create a zero position value.
|
||||
pub fn zero() -> HorizontalPosition {
|
||||
GenericHorizontalPosition(LengthOrPercentage::Percentage(0.0))
|
||||
}
|
||||
}
|
||||
|
||||
/// The computed value of a vertical `<position>`
|
||||
pub type VerticalPosition = GenericVerticalPosition<LengthOrPercentage>;
|
||||
|
||||
impl Copy for VerticalPosition {}
|
||||
|
||||
impl VerticalPosition {
|
||||
#[inline]
|
||||
/// Create a zero position value.
|
||||
pub fn zero() -> VerticalPosition {
|
||||
GenericVerticalPosition(LengthOrPercentage::Percentage(0.0))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue