servo: Merge #19263 - selectors: Allow white space in the brackets of an attribute selector (from heycam:attr-ws); r=SimonSapin a=gchang
authorCameron McCormack <cam@mcc.id.au>
Sat, 18 Nov 2017 00:47:57 -0600
changeset 444851 65eaccbc3cdd8b2a3a8adda505bf998b1e659c6d
parent 444850 383831f52344c32148287fa28f41a0e573448504
child 444852 bfe05205f198cf7e4aac88e515725ee3fc394023
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersSimonSapin, gchang
milestone58.0
servo: Merge #19263 - selectors: Allow white space in the brackets of an attribute selector (from heycam:attr-ws); r=SimonSapin a=gchang Source-Repo: https://github.com/servo/servo Source-Revision: 7b886b4479763018ecad62aa6db96049732ca9ed
servo/components/selectors/parser.rs
--- a/servo/components/selectors/parser.rs
+++ b/servo/components/selectors/parser.rs
@@ -1347,16 +1347,19 @@ fn parse_attribute_selector<'i, 't, P, I
     input: &mut CssParser<'i, 't>,
 ) -> Result<Component<Impl>, ParseError<'i, P::Error>>
 where
     P: Parser<'i, Impl=Impl>,
     Impl: SelectorImpl,
 {
     let namespace;
     let local_name;
+
+    input.skip_whitespace();
+
     match parse_qualified_name(parser, input, /* in_attr_selector = */ true)? {
         OptionalQName::None(t) => {
             return Err(input.new_custom_error(
                 SelectorParseErrorKind::NoQualifiedNameInAttributeSelector(t)
             ))
         }
         OptionalQName::Some(_, None) => unreachable!(),
         OptionalQName::Some(ns, Some(ln)) => {