mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Reject negative factors in filter functions (fixes #15494)
This commit is contained in:
parent
ee3af09a8c
commit
b7edf34c8c
2 changed files with 45 additions and 2 deletions
|
@ -367,8 +367,8 @@ ${helpers.predefined_type("clip",
|
|||
fn parse_factor(input: &mut Parser) -> Result<::values::CSSFloat, ()> {
|
||||
use cssparser::Token;
|
||||
match input.next() {
|
||||
Ok(Token::Number(value)) => Ok(value.value),
|
||||
Ok(Token::Percentage(value)) => Ok(value.unit_value),
|
||||
Ok(Token::Number(value)) if value.value.is_sign_positive() => Ok(value.value),
|
||||
Ok(Token::Percentage(value)) if value.unit_value.is_sign_positive() => Ok(value.unit_value),
|
||||
_ => Err(())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue