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
This commit is contained in:
Sam Atkins 2021-09-12 19:22:25 +01:00 committed by Andreas Kling
parent 13c67f9920
commit 6c27e2938a
Notes: sideshowbarker 2024-07-18 04:05:34 +09:00

View file

@ -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()) {