mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
style: 0% values are not skipped when parsing CSS transform
Adds trait ZeroNoPercent to check for values that are 0 (such as 0px) but not 0% Updated test css/css-transforms/animation/translate-interpolation.html and removed unnecessary formatting changes Differential Revision: https://phabricator.services.mozilla.com/D154930
This commit is contained in:
parent
aefbae5f96
commit
12a2c88605
4 changed files with 33 additions and 11 deletions
|
@ -244,6 +244,12 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
/// A trait implementing a function to tell if the number is zero without a percent
|
||||
pub trait ZeroNoPercent {
|
||||
/// So, `0px` should return `true`, but `0%` or `1px` should return `false`
|
||||
fn is_zero_no_percent(&self) -> bool;
|
||||
}
|
||||
|
||||
/// A trait pretty much similar to num_traits::One, but without the need of
|
||||
/// implementing `Mul`.
|
||||
pub trait One {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue