style: Remove HasViewportPercentage.

It's not needed since #18268
This commit is contained in:
Emilio Cobos Álvarez 2017-08-29 23:45:45 +02:00
parent 473934c989
commit 36ff89bd28
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
61 changed files with 73 additions and 437 deletions

View file

@ -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)