mirror of
https://github.com/servo/servo.git
synced 2025-08-17 11:25:35 +01:00
Various fixes in style
This commit is contained in:
parent
840e4c90d5
commit
97422ad252
3 changed files with 20 additions and 20 deletions
|
@ -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!()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue