Make style system support mozmm unit and compute it correctly.

MozReview-Commit-ID: hCUs8xuNd1
This commit is contained in:
KuoE0 2017-04-25 16:41:35 +08:00
parent fc1e4e95ed
commit 507c90d40b
3 changed files with 63 additions and 3 deletions

View file

@ -29,7 +29,10 @@ impl ToComputedValue for specified::NoCalcLength {
specified::NoCalcLength::ViewportPercentage(length) =>
length.to_computed_value(context.viewport_size()),
specified::NoCalcLength::ServoCharacterWidth(length) =>
length.to_computed_value(context.style().get_font().clone_font_size())
length.to_computed_value(context.style().get_font().clone_font_size()),
#[cfg(feature = "gecko")]
specified::NoCalcLength::Physical(length) =>
length.to_computed_value(context),
}
}