mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
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:
committed by
Andreas Kling
parent
b1efd62ce6
commit
cbe4ba60c3
Notes:
github-actions[bot]
2025-07-30 09:07:30 +00:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/LadybirdBrowser/ladybird/commit/cbe4ba60c3c Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5618 Reviewed-by: https://github.com/awesomekling Reviewed-by: https://github.com/tcl3
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user