mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Auto merge of #14605 - emilio:crashtest-bug-1323717, r=SimonSapin
style: Avoid ending up with an invalid keyframe when inf or NaN are a… <!-- Please describe your changes on the following line: --> Fixes: https://bugzilla.mozilla.org/show_bug.cgi?id=1323717 r? @SimonSapin <!-- 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/14605) <!-- Reviewable:end -->
This commit is contained in:
commit
da42fea6b2
3 changed files with 24 additions and 2 deletions
|
@ -50,10 +50,11 @@ impl KeyframePercentage {
|
|||
KeyframePercentage::new(1.)
|
||||
} else {
|
||||
let percentage = try!(input.expect_percentage());
|
||||
if percentage > 1. || percentage < 0. {
|
||||
if percentage >= 0. && percentage <= 1. {
|
||||
KeyframePercentage::new(percentage)
|
||||
} else {
|
||||
return Err(());
|
||||
}
|
||||
KeyframePercentage::new(percentage)
|
||||
};
|
||||
|
||||
Ok(percentage)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue