style: Add parsing for cross-fade from CSS Image Values and Replaced Content Module Level 4.

This is the first of what will likely be a couple patches for
cross-fade's implementation. Bug 546052 tracks it's complete
implementation.

Differential Revision: https://phabricator.services.mozilla.com/D81889
This commit is contained in:
Zeke Medley 2020-07-31 16:11:38 +00:00 committed by Emilio Cobos Álvarez
parent 7c3d815f78
commit 8f89ebffec
4 changed files with 204 additions and 5 deletions

View file

@ -207,6 +207,18 @@ where
}
}
impl<T> Parse for Box<T>
where
T: Parse
{
fn parse<'i, 't>(
context: &ParserContext,
input: &mut Parser<'i, 't>,
) -> Result<Self, ParseError<'i>> {
T::parse(context, input).map(Box::new)
}
}
impl Parse for crate::OwnedStr {
fn parse<'i, 't>(
_: &ParserContext,