diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2021-09-12 19:22:25 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-12 21:34:57 +0200 |
commit | 6c27e2938a1e0d13481c313dd2ae2fe7b0b51cf6 (patch) | |
tree | 6dedcd769ef972305d5882f539ba23f45bc145c3 | |
parent | 13c67f99206f818c364207f9ff3c7b9a06032ae3 (diff) | |
download | serenity-6c27e2938a1e0d13481c313dd2ae2fe7b0b51cf6.zip |
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
-rw-r--r-- | Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp index a8c6ff4d39..0f3e40349a 100644 --- a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp +++ b/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()) { |