Bug 1457744: Fix serialization order of list-style. r?xidorn draft
authorEmilio Cobos Álvarez <emilio@crisal.io>
Sun, 29 Apr 2018 02:04:25 +0200
changeset 789493 3a4570bd617d065174081b6ba3a702072fcbfa65
parent 789492 fb87372128d5fcd92e5ddc0e7d55211c0f4035d7
push id108268
push userbmo:emilio@crisal.io
push dateSun, 29 Apr 2018 00:05:47 +0000
reviewersxidorn
bugs1457744
milestone61.0a1
Bug 1457744: Fix serialization order of list-style. r?xidorn MozReview-Commit-ID: K5QtaNk4YJQ
servo/components/style/properties/shorthand/list.mako.rs
testing/web-platform/meta/css/cssom/shorthand-values.html.ini
--- a/servo/components/style/properties/shorthand/list.mako.rs
+++ b/servo/components/style/properties/shorthand/list.mako.rs
@@ -1,32 +1,32 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 <%namespace name="helpers" file="/helpers.mako.rs" />
 
 <%helpers:shorthand name="list-style"
-                    sub_properties="list-style-position list-style-image list-style-type"
+                    sub_properties="list-style-type list-style-position list-style-image"
                     derive_serialize="True"
                     spec="https://drafts.csswg.org/css-lists/#propdef-list-style">
     use properties::longhands::{list_style_image, list_style_position, list_style_type};
     use values::specified::url::ImageUrlOrNone;
 
     pub fn parse_value<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Longhands, ParseError<'i>> {
         // `none` is ambiguous until we've finished parsing the shorthands, so we count the number
         // of times we see it.
         let mut nones = 0u8;
         let (mut image, mut position, mut list_style_type, mut any) = (None, None, None, false);
         loop {
             if input.try(|input| input.expect_ident_matching("none")).is_ok() {
-                nones = nones + 1;
+                nones += 1;
                 if nones > 2 {
                     return Err(input.new_custom_error(SelectorParseErrorKind::UnexpectedIdent("none".into())))
                 }
                 any = true;
                 continue
             }
 
             if image.is_none() {
--- a/testing/web-platform/meta/css/cssom/shorthand-values.html.ini
+++ b/testing/web-platform/meta/css/cssom/shorthand-values.html.ini
@@ -21,14 +21,11 @@
     expected: FAIL
 
   [The serialization of border: 1px; border-top-color: red; should be canonical.]
     expected: FAIL
 
   [The serialization of border: solid; border-style: dotted should be canonical.]
     expected: FAIL
 
-  [The serialization of list-style-type: circle; list-style-position: inside; list-style-image: initial; should be canonical.]
-    expected: FAIL
-
   [The serialization of overflow-x: scroll; overflow-y: hidden; should be canonical.]
     expected: FAIL