mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-22 09:12:13 -05:00
LibWeb: Delete "names used in attribute selectors" from SelectorInsights
These are no longer needed because it's possible to tell if attribute name is used in any selector by using invalidation sets.
This commit is contained in:
parent
e0051db62e
commit
3b81d9d91d
Notes:
github-actions[bot]
2025-01-20 17:24:31 +00:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/LadybirdBrowser/ladybird/commit/3b81d9d91d8 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3310
2 changed files with 0 additions and 14 deletions
|
@ -2578,9 +2578,6 @@ void StyleComputer::collect_selector_insights(Selector const& selector, Selector
|
|||
{
|
||||
for (auto const& compound_selector : selector.compound_selectors()) {
|
||||
for (auto const& simple_selector : compound_selector.simple_selectors) {
|
||||
if (simple_selector.type == Selector::SimpleSelector::Type::Attribute) {
|
||||
insights.all_names_used_in_attribute_selectors.set(simple_selector.attribute().qualified_name.name.lowercase_name);
|
||||
}
|
||||
if (simple_selector.type == Selector::SimpleSelector::Type::PseudoClass) {
|
||||
if (simple_selector.pseudo_class().type == PseudoClass::Has) {
|
||||
insights.has_has_selectors = true;
|
||||
|
@ -3105,13 +3102,4 @@ bool StyleComputer::has_defined_selectors() const
|
|||
return m_selector_insights->has_defined_selectors;
|
||||
}
|
||||
|
||||
bool StyleComputer::has_attribute_selector(FlyString const& attribute_name) const
|
||||
{
|
||||
if (!document().is_active())
|
||||
return false;
|
||||
|
||||
build_rule_cache_if_needed();
|
||||
return m_selector_insights->all_names_used_in_attribute_selectors.contains(attribute_name);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -178,7 +178,6 @@ public:
|
|||
|
||||
[[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;
|
||||
|
||||
|
@ -259,7 +258,6 @@ private:
|
|||
struct SelectorInsights {
|
||||
bool has_has_selectors { false };
|
||||
bool has_defined_selectors { false };
|
||||
HashTable<FlyString> all_names_used_in_attribute_selectors;
|
||||
};
|
||||
|
||||
struct RuleCache {
|
||||
|
|
Loading…
Reference in a new issue