diff --git a/components/style/properties/shorthands/list.mako.rs b/components/style/properties/shorthands/list.mako.rs index 10a43f83f4c..183c5ab5daa 100644 --- a/components/style/properties/shorthands/list.mako.rs +++ b/components/style/properties/shorthands/list.mako.rs @@ -113,14 +113,14 @@ #[cfg(feature = "gecko")] let position_is_initial = self.list_style_position == &ListStylePosition::Outside; #[cfg(feature = "servo")] - let position_is_initial = self.list_style_position == Some(&ListStylePosition::Outside); + let position_is_initial = matches!(self.list_style_position, None | Some(&ListStylePosition::Outside)); if !position_is_initial { self.list_style_position.to_css(dest)?; have_one_non_initial_value = true; } if self.list_style_image != &ListStyleImage::None { if have_one_non_initial_value { - dest.write_char(' ')?; + dest.write_char(' ')?; } self.list_style_image.to_css(dest)?; have_one_non_initial_value = true; @@ -137,7 +137,14 @@ have_one_non_initial_value = true; } if !have_one_non_initial_value { + #[cfg(feature = "gecko")] self.list_style_position.to_css(dest)?; + #[cfg(feature = "servo")] + if let Some(position) = self.list_style_position { + position.to_css(dest)?; + } else { + self.list_style_type.to_css(dest)?; + } } Ok(()) } diff --git a/tests/wpt/meta/css/cssom/cssom-getPropertyValue-common-checks.html.ini b/tests/wpt/meta/css/cssom/cssom-getPropertyValue-common-checks.html.ini deleted file mode 100644 index 50c8b190095..00000000000 --- a/tests/wpt/meta/css/cssom/cssom-getPropertyValue-common-checks.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[cssom-getPropertyValue-common-checks.html] - [All properties (except 'all') can serialize their initial value (computed)] - expected: FAIL - - [All shorthands (except 'all') can serialize their longhands set to their initial value] - expected: FAIL