mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +00:00
LibWeb: Use a string instead of an internal Parser class in Supports
Now that we can serialize CSS tokens, we can just hold a string and then re-parse it when the Supports is evaluated. This feels a little weird, but it only happens once so it's not going to slow it down much, and it keep the API cleaner.
This commit is contained in:
committed by
Andreas Kling
parent
7d5c626276
commit
dea4f83037
@@ -1113,7 +1113,7 @@ Optional<Supports::Feature> Parser::parse_supports_feature(TokenStream<StyleComp
|
||||
TokenStream block_tokens { first_token.block().values() };
|
||||
if (auto declaration = consume_a_declaration(block_tokens); declaration.has_value()) {
|
||||
return Supports::Feature {
|
||||
.declaration = declaration.release_value()
|
||||
.declaration = declaration->to_string()
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user