mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-18 00:02:01 +00:00
LibWeb/CSS: Evaluate Supports query components during parsing
Instead of parsing the parts of a `@supports` query, then only evaluating them when constructing the Supports itself, we can instead evaluate them as we parse them. This simplifies things as we no longer need to pass a Realm around, and don't have to re-parse the conditions again with a new Parser instance.
This commit is contained in:
parent
95730c66aa
commit
84a695c958
Notes:
github-actions[bot]
2025-03-17 10:01:49 +00:00
Author: https://github.com/AtkinsSJ
Commit: 84a695c958
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3941
5 changed files with 32 additions and 48 deletions
|
@ -87,11 +87,4 @@ RefPtr<CSS::Supports> parse_css_supports(CSS::Parser::ParsingParams const& conte
|
|||
return CSS::Parser::Parser::create(context, string).parse_as_supports();
|
||||
}
|
||||
|
||||
Optional<CSS::StyleProperty> parse_css_supports_condition(CSS::Parser::ParsingParams const& context, StringView string)
|
||||
{
|
||||
if (string.is_empty())
|
||||
return {};
|
||||
return CSS::Parser::Parser::create(context, string).parse_as_supports_condition();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue