aboutsummaryrefslogtreecommitdiff
path: root/www/waterfox/files/patch-bug1418152
blob: d7634229aa8e6209aa638b4885f54960ac2bd4fb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
commit d7441ef15616
Author: Cameron McCormack <cam@mcc.id.au>
Date:   Sat Nov 18 00:47:57 2017 -0600

    Bug 1418152 - servo: Merge #19263 - selectors: Allow white space in the brackets of an attribute selector (from heycam:attr-ws); r=SimonSapin a=sylvestre
    
    Source-Repo: https://github.com/servo/servo
    Source-Revision: 7b886b4479763018ecad62aa6db96049732ca9ed
    
    --HG--
    extra : amend_source : 67e691f8caf4bc07a9ea0e33bd31286ae123f5ff
    extra : transplant_source : %C6%FF%3A%13I%5E%B7%14%3C%F2%F7%CE%80%DB%08%16bh%60s
---
 servo/components/selectors/parser.rs | 3 +++
 1 file changed, 3 insertions(+)

diff --git servo/components/selectors/parser.rs servo/components/selectors/parser.rs
index b020a04fd032..b7c421998530 100644
--- servo/components/selectors/parser.rs
+++ servo/components/selectors/parser.rs
@@ -1306,6 +1306,15 @@ fn parse_attribute_selector<'i, 't, P, E, Impl>(parser: &P, input: &mut CssParse
 {
     let namespace;
     let local_name;
+
+    loop {
+        let position = input.position();
+        if !matches!(input.next_including_whitespace(), Ok(&Token::WhiteSpace(_))) {
+            input.reset(position);
+            break
+        }
+    }
+
     match parse_qualified_name(parser, input, /* in_attr_selector = */ true)? {
         None => return Err(ParseError::Custom(SelectorParseError::NoQualifiedNameInAttributeSelector)),
         Some((_, None)) => unreachable!(),