mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Move Position::parse_legacy logic to LegacyPosition type
This commit is contained in:
parent
d589645ee9
commit
b33545ca3b
4 changed files with 220 additions and 82 deletions
|
@ -124,6 +124,13 @@ impl<S> ToComputedValue for OriginComponent<S>
|
|||
}
|
||||
}
|
||||
|
||||
impl<S> OriginComponent<S> {
|
||||
/// `0%`
|
||||
pub fn zero() -> Self {
|
||||
OriginComponent::Length(LengthOrPercentage::Percentage(Percentage(0.)))
|
||||
}
|
||||
}
|
||||
|
||||
impl Parse for TimingFunction {
|
||||
fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> {
|
||||
if let Ok(keyword) = input.try(TimingKeyword::parse) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue