mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
style: Mark trivial CalcLengthOrPercentage
accessors as inline.
These were showing up all over profiles in layout.
This commit is contained in:
parent
d11f96e270
commit
eb3e93af0b
1 changed files with 2 additions and 0 deletions
|
@ -1518,10 +1518,12 @@ pub mod computed {
|
|||
}
|
||||
|
||||
impl CalcLengthOrPercentage {
|
||||
#[inline]
|
||||
pub fn length(&self) -> Au {
|
||||
self.length.unwrap_or(Au(0))
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn percentage(&self) -> CSSFloat {
|
||||
self.percentage.unwrap_or(0.)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue