mirror of
https://github.com/servo/servo.git
synced 2025-07-04 22:13: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
|
||||
}
|
||||
|
|
|
@ -3202,7 +3202,7 @@ pub extern "C" fn Servo_DeclarationBlock_SetNumberValue(
|
|||
let prop = match_wrap_declared! { long,
|
||||
MozScriptSizeMultiplier => value,
|
||||
// Gecko uses Number values to signal that it is absolute
|
||||
MozScriptLevel => MozScriptLevel::Absolute(value as i32),
|
||||
MozScriptLevel => MozScriptLevel::MozAbsolute(value as i32),
|
||||
};
|
||||
write_locked_arc(declarations, |decls: &mut PropertyDeclarationBlock| {
|
||||
decls.push(prop, Importance::Normal, DeclarationSource::CssOm);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue