1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:57:45 +00:00

LibWeb: Use free functions for parsing in @Supports

This commit is contained in:
Sam Atkins 2023-03-06 14:46:21 +00:00 committed by Andreas Kling
parent 84af8dd9ed
commit 235018046e
3 changed files with 11 additions and 2 deletions

View file

@ -7455,4 +7455,12 @@ RefPtr<CSS::Supports> parse_css_supports(CSS::Parser::ParsingContext const& cont
return parser.parse_as_supports();
}
Optional<CSS::StyleProperty> parse_css_supports_condition(CSS::Parser::ParsingContext const& context, StringView string)
{
if (string.is_empty())
return {};
CSS::Parser::Parser parser(context, string);
return parser.parse_as_supports_condition();
}
}