diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp index 11d59cbb44..7dda1f779b 100644 --- a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp +++ b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp @@ -2756,6 +2756,7 @@ RefPtr Parser::parse_as_css_value(PropertyID property_id) RefPtr Parser::parse_css_value(PropertyID property_id, TokenStream& tokens) { + m_context.set_current_property_id(property_id); Vector component_values; while (tokens.has_next_token()) { diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Parser.h b/Userland/Libraries/LibWeb/CSS/Parser/Parser.h index be1b5bb52b..4962735fd6 100644 --- a/Userland/Libraries/LibWeb/CSS/Parser/Parser.h +++ b/Userland/Libraries/LibWeb/CSS/Parser/Parser.h @@ -40,8 +40,12 @@ public: DOM::Document* document() const { return m_document; } URL complete_url(String const&) const; + PropertyID current_property_id() const { return m_current_property_id; } + void set_current_property_id(PropertyID property_id) { m_current_property_id = property_id; } + private: DOM::Document* m_document { nullptr }; + PropertyID m_current_property_id { PropertyID::Invalid }; }; template