Various fixes in style

This commit is contained in:
Manish Goregaokar 2015-09-03 03:16:00 +05:30
parent 840e4c90d5
commit 97422ad252
3 changed files with 20 additions and 20 deletions

View file

@ -25,16 +25,16 @@ pub enum Range<T> {
impl Range<specified::Length> {
fn to_computed_range(&self, viewport_size: Size2D<Au>) -> Range<Au> {
let compute_width = |width| {
let compute_width = |&width| {
match width {
&specified::Length::Absolute(value) => value,
&specified::Length::FontRelative(value) => {
specified::Length::Absolute(value) => value,
specified::Length::FontRelative(value) => {
// http://dev.w3.org/csswg/mediaqueries3/#units
// em units are relative to the initial font-size.
let initial_font_size = longhands::font_size::get_initial_value();
value.to_computed_value(initial_font_size, initial_font_size)
}
&specified::Length::ViewportPercentage(value) =>
specified::Length::ViewportPercentage(value) =>
value.to_computed_value(viewport_size),
_ => unreachable!()
}