mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Implement css(dimension) and derive ToCss for a bunch of stuff.
For css(dimension), it'd be nice to derive(Parse) too, I think...
This commit is contained in:
parent
1b533f9bdc
commit
4927786d90
10 changed files with 98 additions and 153 deletions
|
@ -400,7 +400,13 @@ impl CalcNode {
|
|||
NoCalcLength::ServoCharacterWidth(..) => unreachable!(),
|
||||
#[cfg(feature = "gecko")]
|
||||
NoCalcLength::Physical(physical) => {
|
||||
ret.mozmm = Some(ret.mozmm.unwrap_or(0.) + physical.0 * factor);
|
||||
use values::specified::length::PhysicalLength;
|
||||
|
||||
match physical {
|
||||
PhysicalLength::Mozmm(mozmm) => {
|
||||
ret.mozmm = Some(ret.mozmm.unwrap_or(0.) + mozmm * factor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue