mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 14:58:46 +00: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: 3b81d9d91d
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue