mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 05:09:12 +00:00
LibWeb: Skip unneeded style invalidation on custom element state change
If there are no :defined pseudo-class selectors anywhere in the document, we don't have to invalidate style at all when an element's custom element state changes.
This commit is contained in:
parent
202bf901d7
commit
f45e24864b
Notes:
github-actions[bot]
2024-12-25 12:27:53 +00:00
Author: https://github.com/awesomekling
Commit: f45e24864b
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3037
3 changed files with 14 additions and 1 deletions
|
@ -170,6 +170,7 @@ public:
|
|||
void collect_animation_into(DOM::Element&, Optional<CSS::Selector::PseudoElement::Type>, GC::Ref<Animations::KeyframeEffect> animation, ComputedProperties&, AnimationRefresh = AnimationRefresh::No) const;
|
||||
|
||||
[[nodiscard]] bool has_has_selectors() const;
|
||||
[[nodiscard]] bool has_defined_selectors() const;
|
||||
[[nodiscard]] bool has_attribute_selector(FlyString const& attribute_name) const;
|
||||
|
||||
size_t number_of_css_font_faces_with_loading_in_progress() const;
|
||||
|
@ -250,6 +251,7 @@ private:
|
|||
|
||||
struct SelectorInsights {
|
||||
bool has_has_selectors { false };
|
||||
bool has_defined_selectors { false };
|
||||
HashTable<FlyString> all_names_used_in_attribute_selectors;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue