mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Auto merge of #18265 - hiikezoe:dont-fallback-to-discrete-animation, r=birtles
Don't fallback to discrete animations within animate(). <!-- Please describe your changes on the following line: --> https://bugzilla.mozilla.org/show_bug.cgi?id=1394287 --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18265) <!-- Reviewable:end -->
This commit is contained in:
commit
478da86bb9
1 changed files with 3 additions and 18 deletions
|
@ -2623,13 +2623,7 @@ where
|
|||
(&SVGLength::Length(ref this), &SVGLength::Length(ref other)) => {
|
||||
Ok(SVGLength::Length(this.animate(other, procedure)?))
|
||||
},
|
||||
_ => {
|
||||
// FIXME(nox): Is this correct for addition and accumulation?
|
||||
// I think an error should be returned if it's not
|
||||
// an interpolation.
|
||||
let (this_weight, other_weight) = procedure.weights();
|
||||
Ok(if this_weight > other_weight { self.clone() } else { other.clone() })
|
||||
},
|
||||
_ => Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2649,10 +2643,7 @@ where
|
|||
(&SVGStrokeDashArray::Values(ref this), &SVGStrokeDashArray::Values(ref other)) => {
|
||||
Ok(SVGStrokeDashArray::Values(this.animate(other, procedure)?))
|
||||
},
|
||||
_ => {
|
||||
let (this_weight, other_weight) = procedure.weights();
|
||||
Ok(if this_weight > other_weight { self.clone() } else { other.clone() })
|
||||
},
|
||||
_ => Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2684,13 +2675,7 @@ where
|
|||
(&SVGOpacity::Opacity(ref this), &SVGOpacity::Opacity(ref other)) => {
|
||||
Ok(SVGOpacity::Opacity(this.animate(other, procedure)?))
|
||||
},
|
||||
_ => {
|
||||
// FIXME(nox): Is this correct for addition and accumulation?
|
||||
// I think an error should be returned if it's not
|
||||
// an interpolation.
|
||||
let (this_weight, other_weight) = procedure.weights();
|
||||
Ok(if this_weight > other_weight { self.clone() } else { other.clone() })
|
||||
},
|
||||
_ => Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue