mirror of
https://github.com/servo/servo.git
synced 2025-08-08 15:05:35 +01:00
Fix servo build and rustfmt recent changes.
We need to introduce another Cursor enum that is specific to embedder_traits and that layout converts to to avoid dependency hell.
This commit is contained in:
parent
05881b5ab4
commit
90c0ec0cf7
19 changed files with 243 additions and 111 deletions
|
@ -32,16 +32,14 @@ fn to_number_or_percentage(
|
|||
value: &SvgLengthPercentageOrNumber<LengthPercentage, Number>,
|
||||
) -> Result<NumberOrPercentage, ()> {
|
||||
Ok(match *value {
|
||||
SvgLengthPercentageOrNumber::LengthPercentage(ref l) => {
|
||||
match l.specified_percentage() {
|
||||
Some(p) => {
|
||||
if l.unclamped_length().px() != 0. {
|
||||
return Err(());
|
||||
}
|
||||
NumberOrPercentage::Percentage(p)
|
||||
},
|
||||
None => NumberOrPercentage::Number(l.length().px()),
|
||||
}
|
||||
SvgLengthPercentageOrNumber::LengthPercentage(ref l) => match l.specified_percentage() {
|
||||
Some(p) => {
|
||||
if l.unclamped_length().px() != 0. {
|
||||
return Err(());
|
||||
}
|
||||
NumberOrPercentage::Percentage(p)
|
||||
},
|
||||
None => NumberOrPercentage::Number(l.length().px()),
|
||||
},
|
||||
SvgLengthPercentageOrNumber::Number(ref n) => NumberOrPercentage::Number(*n),
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue