LibWeb: Implement faster equals() for UnresolvedStyleValue

Compare `Vector<Parser::ComponentValue>` directly instead of
serializing them into strings first.

This is required for the upcoming changes where we would compare
previous and new sets of custom properties to figure out whether we need
to invalidate descendant elements. Without this change `equals()` would
show up being hot in profiles.
This commit is contained in:
Aliaksandr Kalenik
2025-07-27 23:28:34 +02:00
committed by Andreas Kling
parent b1efd62ce6
commit cbe4ba60c3
Notes: github-actions[bot] 2025-07-30 09:07:30 +00:00
4 changed files with 14 additions and 2 deletions

View File

@@ -48,6 +48,8 @@ public:
String to_debug_string() const;
String original_source_text() const;
bool operator==(ComponentValue const&) const = default;
private:
Variant<Token, Function, SimpleBlock, GuaranteedInvalidValue> m_value;
};