From 0c4f29f71f43e6eb6689f55aaba69688bce3d643 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 28 Nov 2019 07:45:58 +0100 Subject: LibHTML: Just swallow :not selectors for now --- Libraries/LibHTML/Parser/CSSParser.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'Libraries/LibHTML/Parser') diff --git a/Libraries/LibHTML/Parser/CSSParser.cpp b/Libraries/LibHTML/Parser/CSSParser.cpp index de20713ca7..ad865ecfbc 100644 --- a/Libraries/LibHTML/Parser/CSSParser.cpp +++ b/Libraries/LibHTML/Parser/CSSParser.cpp @@ -301,8 +301,18 @@ public: is_pseudo_element = true; consume_one(); } - while (is_valid_selector_char(peek())) + if (next_is("not")) { + buffer.append(consume_one()); buffer.append(consume_one()); + buffer.append(consume_one()); + buffer.append(consume_specific('(')); + while (peek() != ')') + buffer.append(consume_one()); + buffer.append(consume_specific(')')); + } else { + while (is_valid_selector_char(peek())) + buffer.append(consume_one()); + } auto pseudo_name = String::copy(buffer); buffer.clear(); -- cgit v1.2.3