mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Thread ParseError return values through CSS parsing.
This commit is contained in:
parent
58e39bfffa
commit
27ae1ef2e7
121 changed files with 2133 additions and 1505 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
use cssparser::Parser;
|
||||
use parser::{Parse, ParserContext};
|
||||
use style_traits::ParseError;
|
||||
use values::generics::gecko::ScrollSnapPoint as GenericScrollSnapPoint;
|
||||
use values::specified::length::LengthOrPercentage;
|
||||
|
||||
|
@ -13,7 +14,7 @@ use values::specified::length::LengthOrPercentage;
|
|||
pub type ScrollSnapPoint = GenericScrollSnapPoint<LengthOrPercentage>;
|
||||
|
||||
impl Parse for ScrollSnapPoint {
|
||||
fn parse(context: &ParserContext, input: &mut Parser) -> Result<Self, ()> {
|
||||
fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> {
|
||||
if input.try(|i| i.expect_ident_matching("none")).is_ok() {
|
||||
return Ok(GenericScrollSnapPoint::None);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue