mirror of
https://github.com/servo/servo.git
synced 2025-10-04 02:29:12 +01:00
parent
f159b5cb10
commit
5821ff77db
8 changed files with 38 additions and 97 deletions
|
@ -14,7 +14,7 @@ use std::ops::Mul;
|
|||
use style_traits::ToCss;
|
||||
use style_traits::values::specified::AllowedNumericType;
|
||||
use super::{Angle, Number, SimplifiedValueNode, SimplifiedSumNode, Time};
|
||||
use values::{CSSFloat, Either, FONT_MEDIUM_PX, HasViewportPercentage, None_};
|
||||
use values::{Auto, CSSFloat, Either, FONT_MEDIUM_PX, HasViewportPercentage, None_};
|
||||
use values::computed::Context;
|
||||
|
||||
pub use super::image::{AngleOrCorner, ColorStop, EndingShape as GradientEndingShape, Gradient};
|
||||
|
@ -345,7 +345,7 @@ impl Parse for Length {
|
|||
|
||||
impl<T> Either<Length, T> {
|
||||
#[inline]
|
||||
pub fn parse_non_negative_length(input: &mut Parser) -> Result<Either<Length, T>, ()> {
|
||||
pub fn parse_non_negative_length(_context: &ParserContext, input: &mut Parser) -> Result<Self, ()> {
|
||||
Length::parse_internal(input, AllowedNumericType::NonNegative).map(Either::First)
|
||||
}
|
||||
}
|
||||
|
@ -953,6 +953,8 @@ impl Parse for LengthOrPercentageOrNone {
|
|||
|
||||
pub type LengthOrNone = Either<Length, None_>;
|
||||
|
||||
pub type LengthOrAuto = Either<Length, Auto>;
|
||||
|
||||
#[derive(Clone, PartialEq, Copy, Debug)]
|
||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
||||
pub enum LengthOrPercentageOrAutoOrContent {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue