servo: Merge #19332 - moving :dir() param serialization FIXME (from wilsoniya:moving-fixme); r=emilio
authorMichael Wilson <wilsoniya@gmail.com>
Wed, 22 Nov 2017 04:04:39 -0600
changeset 393061 84b90d871c2c14c24356f2840b5bbe9413a5e729
parent 393060 af8727e2028e660aa0f7525c0e1c784d8edafff7
child 393062 dd5e0428476bb0dca53741e305db1c515513257b
push id55824
push userservo-vcs-sync@mozilla.com
push dateWed, 22 Nov 2017 11:28:11 +0000
treeherderautoland@84b90d871c2c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemilio
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
servo: Merge #19332 - moving :dir() param serialization FIXME (from wilsoniya:moving-fixme); r=emilio <!-- Please describe your changes on the following line: --> Per emilio's comment, https://github.com/servo/servo/pull/19195#discussion_r152205644, a `FIXME` regarding `:dir()` parameter serialization has been moved. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes do not require tests because they only modify comment lines <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: 3ecd0174cc7817cdd2007850c29b8b069a845b46
servo/components/style/gecko/selector_parser.rs
servo/components/style/selector_parser.rs
--- a/servo/components/style/gecko/selector_parser.rs
+++ b/servo/components/style/gecko/selector_parser.rs
@@ -91,17 +91,16 @@ impl ToCss for NonTSPseudoClass {
                         // Don't include the terminating nul.
                         let value = String::from_utf16(&s[..s.len() - 1]).unwrap();
                         dest.write_str(concat!(":", $k_css, "("))?;
                         dest.write_str(&value)?;
                         return dest.write_char(')')
                     }, )*
                     NonTSPseudoClass::Dir(ref dir) => {
                         dest.write_str(":dir(")?;
-                        // FIXME: This should be escaped as an identifier; see #19231
                         (**dir).to_css(dest)?;
                         return dest.write_char(')')
                     },
                     NonTSPseudoClass::MozAny(ref selectors) => {
                         dest.write_str(":-moz-any(")?;
                         let mut iter = selectors.iter();
                         let first = iter.next().expect(":-moz-any must have at least 1 selector");
                         first.to_css(dest)?;
--- a/servo/components/style/selector_parser.rs
+++ b/servo/components/style/selector_parser.rs
@@ -186,13 +186,14 @@ pub enum Direction {
     Other(Box<str>),
 }
 
 impl ToCss for Direction {
     fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: Write {
         let dir_str = match *self {
             Direction::Rtl => "rtl",
             Direction::Ltr => "ltr",
+            // FIXME: This should be escaped as an identifier; see #19231
             Direction::Other(ref other) => other,
         };
         dest.write_str(dir_str)
     }
 }