Rename AllowedNumericType to AllowedLengthType

This commit is contained in:
Anthony Ramine 2017-04-12 11:39:19 +02:00
parent 5f6c27bb94
commit 12d46e7d01
3 changed files with 36 additions and 36 deletions

View file

@ -9,7 +9,7 @@ use cssparser::{Parser, ToCss};
use euclid::size::TypedSize2D;
use std::ascii::AsciiExt;
use std::fmt;
use values::specified::AllowedNumericType;
use values::specified::AllowedLengthType;
define_css_keyword_enum!(UserZoom:
"zoom" => Zoom,
@ -95,9 +95,9 @@ impl Zoom {
use cssparser::Token;
match try!(input.next()) {
Token::Percentage(ref value) if AllowedNumericType::NonNegative.is_ok(value.unit_value) =>
Token::Percentage(ref value) if AllowedLengthType::NonNegative.is_ok(value.unit_value) =>
Ok(Zoom::Percentage(value.unit_value)),
Token::Number(ref value) if AllowedNumericType::NonNegative.is_ok(value.value) =>
Token::Number(ref value) if AllowedLengthType::NonNegative.is_ok(value.value) =>
Ok(Zoom::Number(value.value)),
Token::Ident(ref value) if value.eq_ignore_ascii_case("auto") =>
Ok(Zoom::Auto),