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:
Emilio Cobos Álvarez 2017-11-11 14:57:12 +01:00
parent 1b533f9bdc
commit 4927786d90
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
10 changed files with 98 additions and 153 deletions

View file

@ -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);
}
}
}
}
}