mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Refactor and modify stuff to make use of NoCalcLength
This commit is contained in:
parent
4035bbd738
commit
377a23df50
14 changed files with 83 additions and 67 deletions
|
@ -327,7 +327,7 @@ fn serialize_basicshape_position<W>(position: &Position, dest: &mut W)
|
|||
// 0 length should be replaced with 0%
|
||||
fn replace_with_percent(input: LengthOrPercentage) -> LengthOrPercentage {
|
||||
match input {
|
||||
LengthOrPercentage::Length(Length::Absolute(au)) if au.0 == 0 => {
|
||||
LengthOrPercentage::Length(ref l) if l == &Length::zero() => {
|
||||
LengthOrPercentage::Percentage(Percentage(0.0))
|
||||
}
|
||||
_ => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue