Parse background: <color>

This commit is contained in:
Simon Sapin 2019-12-13 00:42:18 +01:00
parent 53a8a609d2
commit 6fce97c65c
13 changed files with 25 additions and 22 deletions

View file

@ -193,6 +193,29 @@
} }
</%helpers:shorthand> </%helpers:shorthand>
<%helpers:shorthand name="background"
engines="servo-2020"
sub_properties="background-color"
spec="https://drafts.csswg.org/css-backgrounds/#the-background">
use crate::values::specified::Color;
use crate::parser::Parse;
pub fn parse_value<'i, 't>(
context: &ParserContext,
input: &mut Parser<'i, 't>,
) -> Result<Longhands, ParseError<'i>> {
Ok(expanded! {
background_color: Color::parse(context, input)?
})
}
impl<'a> ToCss for LonghandsToSerialize<'a> {
fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
self.background_color.to_css(dest)
}
}
</%helpers:shorthand>
<%helpers:shorthand name="background-position" <%helpers:shorthand name="background-position"
engines="gecko servo-2013" engines="gecko servo-2013"
flags="SHORTHAND_IN_GETCS" flags="SHORTHAND_IN_GETCS"

View file

@ -1,2 +0,0 @@
[block-in-inline-008.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[containing-block-001.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[containing-block-002.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[containing-block-003.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[containing-block-004.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[containing-block-005.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[containing-block-006.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[containing-block-007.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[containing-block-008.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[containing-block-010.xht]
expected: FAIL

View file

@ -0,0 +1,2 @@
[containing-block-023.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[containing-block-026.xht]
expected: FAIL