aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/gecko/selector_parser.rs
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2023-05-26 21:49:57 +0200
committerOriol Brufau <obrufau@igalia.com>2023-05-26 21:49:57 +0200
commit017036dba854d35b1db6dbd2fdf04c8e53f9a3e8 (patch)
tree7befe3c8865b56703352d58162221a1dd3ad992c /components/style/gecko/selector_parser.rs
parent44e71dee2e7eecf69cdc550fd263d712a86ce1ab (diff)
downloadservo-017036dba854d35b1db6dbd2fdf04c8e53f9a3e8.tar.gz
servo-017036dba854d35b1db6dbd2fdf04c8e53f9a3e8.zip
style: Add attributes to the rule hash
See the discussion here: https://twitter.com/Rich_Harris/status/1433153204678799365 This should make attribute selectors roughly as fast as class selectors. I think it's worth trying and see if perf bots complain on micro-benchmarks and stylebench and such. I made attributes more specific than local names, but less specific than classes, which I think makes sense. When doing something like foo[data-bar], filtering by data-bar seems likely to yield less elements than filtering by foo. While at it, remove the bloom filter pref since we shipped it in bug 1704551 for 87 and we haven't heard complaints. Differential Revision: https://phabricator.services.mozilla.com/D124383
Diffstat (limited to 'components/style/gecko/selector_parser.rs')
-rw-r--r--components/style/gecko/selector_parser.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/components/style/gecko/selector_parser.rs b/components/style/gecko/selector_parser.rs
index 5379454daa0..7028d554aa2 100644
--- a/components/style/gecko/selector_parser.rs
+++ b/components/style/gecko/selector_parser.rs
@@ -249,8 +249,7 @@ impl ::selectors::SelectorImpl for SelectorImpl {
type NonTSPseudoClass = NonTSPseudoClass;
fn should_collect_attr_hash(name: &AtomIdent) -> bool {
- static_prefs::pref!("layout.css.bloom-filter-attribute-names.enabled") &&
- !crate::bloom::is_attr_name_excluded_from_filter(name)
+ !crate::bloom::is_attr_name_excluded_from_filter(name)
}
}