mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:38:11 +00:00
LibWeb: Add current_property_id to CSS ParsingContext
After `parse_css_value(PropertyID, TokenStream)`, we only need to know the current PropertyID when checking for property-specific quirks, which will take place in only 2 places, which happen deep down. Making the current PropertyID part of the context means that those places can check it easily, without us having to pass it to every one of the parsing functions, which otherwise do not care.
This commit is contained in:
parent
af58bddfc8
commit
3fa4f55f86
2 changed files with 5 additions and 0 deletions
|
@ -2756,6 +2756,7 @@ RefPtr<StyleValue> Parser::parse_as_css_value(PropertyID property_id)
|
|||
|
||||
RefPtr<StyleValue> Parser::parse_css_value(PropertyID property_id, TokenStream<StyleComponentValueRule>& tokens)
|
||||
{
|
||||
m_context.set_current_property_id(property_id);
|
||||
Vector<StyleComponentValueRule> component_values;
|
||||
|
||||
while (tokens.has_next_token()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue