mirror of
https://github.com/servo/servo.git
synced 2025-08-08 06:55:31 +01:00
parent
473934c989
commit
36ff89bd28
61 changed files with 73 additions and 437 deletions
|
@ -10,7 +10,7 @@
|
|||
use cssparser::Parser;
|
||||
use parser::{Parse, ParserContext};
|
||||
use std::fmt;
|
||||
use style_traits::{HasViewportPercentage, ToCss, ParseError};
|
||||
use style_traits::{ToCss, ParseError};
|
||||
use values::computed::{CalcLengthOrPercentage, LengthOrPercentage as ComputedLengthOrPercentage};
|
||||
use values::computed::{Context, Percentage, ToComputedValue};
|
||||
use values::generics::position::Position as GenericPosition;
|
||||
|
@ -156,18 +156,6 @@ impl ToCss for Position {
|
|||
}
|
||||
}
|
||||
|
||||
impl<S> HasViewportPercentage for PositionComponent<S> {
|
||||
fn has_viewport_percentage(&self) -> bool {
|
||||
match *self {
|
||||
PositionComponent::Length(ref lop) |
|
||||
PositionComponent::Side(_, Some(ref lop)) => {
|
||||
lop.has_viewport_percentage()
|
||||
},
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<S: Parse> Parse for PositionComponent<S> {
|
||||
fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> {
|
||||
Self::parse_quirky(context, input, AllowQuirks::No)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue