mirror of
https://github.com/servo/servo.git
synced 2025-07-05 22:43:40 +01:00
style: Make MozScriptLevel::Absolute serialize as -moz-absolute(foo).
This commit is contained in:
parent
92944cd5eb
commit
194c2712b5
3 changed files with 5 additions and 4 deletions
|
@ -326,12 +326,12 @@ impl ToComputedValue for specified::MozScriptLevel {
|
|||
let parent = cx.builder.get_parent_font().clone__moz_script_level();
|
||||
parent as i32 + rel
|
||||
}
|
||||
specified::MozScriptLevel::Absolute(abs) => abs,
|
||||
specified::MozScriptLevel::MozAbsolute(abs) => abs,
|
||||
};
|
||||
cmp::min(int, i8::MAX as i32) as i8
|
||||
}
|
||||
|
||||
fn from_computed_value(other: &i8) -> Self {
|
||||
specified::MozScriptLevel::Absolute(*other as i32)
|
||||
specified::MozScriptLevel::MozAbsolute(*other as i32)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -991,7 +991,8 @@ pub enum MozScriptLevel {
|
|||
/// Should only be serialized by presentation attributes, so even though
|
||||
/// serialization for this would look the same as for the `Relative`
|
||||
/// variant, it is unexposed, so no big deal.
|
||||
Absolute(i32),
|
||||
#[css(function)]
|
||||
MozAbsolute(i32),
|
||||
/// Change `font-size` automatically.
|
||||
Auto
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue