LibWeb: Skip tree traversal if invalidation set doesn't have properties

This allows us to skip unnecessary tree traversal to mark style for
recalculation when invalidation set only has `InvalidateSelf`.
This commit is contained in:
Aliaksandr Kalenik 2025-07-13 19:32:57 +02:00 committed by Jelle Raaijmakers
commit 9bb5e70f5a
Notes: github-actions[bot] 2025-07-14 07:33:15 +00:00
2 changed files with 7 additions and 2 deletions

View file

@ -51,6 +51,7 @@ public:
void set_needs_invalidate_pseudo_class(PseudoClass pseudo_class) { m_properties.set({ Property::Type::PseudoClass, pseudo_class }); }
bool is_empty() const;
bool has_properties() const { return !m_properties.is_empty(); }
void for_each_property(Function<IterationDecision(Property const&)> const& callback) const;
private: