Explorar o código

LibWeb: Ignore vendor-prefixed at-rules

I don't know if I have ever seen one, but they are mentioned in the
spec, so we might as well do this.
https://wiki.csswg.org/spec/vendor-prefixes#css-vendor-prefixes
Sam Atkins %!s(int64=3) %!d(string=hai) anos
pai
achega
6c27e2938a
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp

+ 3 - 1
Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp

@@ -1197,7 +1197,9 @@ Optional<URL> Parser::parse_url_function(ParsingContext const& context, StyleCom
 RefPtr<CSSRule> Parser::convert_to_rule(NonnullRefPtr<StyleRule> rule)
 {
     if (rule->m_type == StyleRule::Type::At) {
-        if (rule->m_name.equals_ignoring_case("import"sv) && !rule->prelude().is_empty()) {
+        if (has_ignored_vendor_prefix(rule->m_name)) {
+            return {};
+        } else if (rule->m_name.equals_ignoring_case("import"sv) && !rule->prelude().is_empty()) {
 
             Optional<URL> url;
             for (auto& token : rule->prelude()) {