mirror of
https://github.com/servo/servo.git
synced 2025-08-13 01:15:34 +01:00
Bug 1374233 - Part 12: Implement ToAnimatedValue for LineHeight.
Besides, we replace its type with GenericLineHeight<NonNegativeNumber, NonNegativeAu>. MozReview-Commit-ID: GGOGXyUFJsJ
This commit is contained in:
parent
ebedea5860
commit
6dd8b159d7
7 changed files with 42 additions and 37 deletions
|
@ -4645,8 +4645,8 @@ fn static_assert() {
|
|||
// FIXME: Align binary representations and ditch |match| for cast + static_asserts
|
||||
let en = match v {
|
||||
LineHeight::Normal => CoordDataValue::Normal,
|
||||
LineHeight::Length(val) => CoordDataValue::Coord(val.0),
|
||||
LineHeight::Number(val) => CoordDataValue::Factor(val),
|
||||
LineHeight::Length(val) => CoordDataValue::Coord(val.value()),
|
||||
LineHeight::Number(val) => CoordDataValue::Factor(val.0),
|
||||
LineHeight::MozBlockHeight =>
|
||||
CoordDataValue::Enumerated(structs::NS_STYLE_LINE_HEIGHT_BLOCK_HEIGHT),
|
||||
};
|
||||
|
@ -4657,8 +4657,8 @@ fn static_assert() {
|
|||
use values::generics::text::LineHeight;
|
||||
return match self.gecko.mLineHeight.as_value() {
|
||||
CoordDataValue::Normal => LineHeight::Normal,
|
||||
CoordDataValue::Coord(coord) => LineHeight::Length(Au(coord)),
|
||||
CoordDataValue::Factor(n) => LineHeight::Number(n),
|
||||
CoordDataValue::Coord(coord) => LineHeight::Length(Au(coord).into()),
|
||||
CoordDataValue::Factor(n) => LineHeight::Number(n.into()),
|
||||
CoordDataValue::Enumerated(val) if val == structs::NS_STYLE_LINE_HEIGHT_BLOCK_HEIGHT =>
|
||||
LineHeight::MozBlockHeight,
|
||||
_ => panic!("this should not happen"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue