mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
style: Remove redundant QuirksMode argument to SelectorMap
This commit is contained in:
parent
c384c21cb6
commit
d8455a772f
2 changed files with 6 additions and 9 deletions
|
@ -159,7 +159,6 @@ impl SelectorMap<Rule> {
|
|||
rule_hash_target: E,
|
||||
matching_rules_list: &mut ApplicableDeclarationList,
|
||||
context: &mut MatchingContext<E::Impl>,
|
||||
quirks_mode: QuirksMode,
|
||||
flags_setter: &mut F,
|
||||
cascade_level: CascadeLevel,
|
||||
)
|
||||
|
@ -171,7 +170,10 @@ impl SelectorMap<Rule> {
|
|||
return
|
||||
}
|
||||
|
||||
// At the end, we're going to sort the rules that we added, so remember where we began.
|
||||
let quirks_mode = context.quirks_mode();
|
||||
|
||||
// At the end, we're going to sort the rules that we added, so remember
|
||||
// where we began.
|
||||
let init_len = matching_rules_list.len();
|
||||
if let Some(id) = rule_hash_target.get_id() {
|
||||
if let Some(rules) = self.id_hash.get(&id, quirks_mode) {
|
||||
|
@ -247,7 +249,7 @@ impl<T: SelectorMapEntry> SelectorMap<T> {
|
|||
pub fn insert(
|
||||
&mut self,
|
||||
entry: T,
|
||||
quirks_mode: QuirksMode
|
||||
quirks_mode: QuirksMode,
|
||||
) -> Result<(), FailedAllocationError> {
|
||||
self.count += 1;
|
||||
|
||||
|
|
|
@ -1236,7 +1236,6 @@ impl Stylist {
|
|||
rule_hash_target,
|
||||
applicable_declarations,
|
||||
context,
|
||||
self.quirks_mode,
|
||||
flags_setter,
|
||||
CascadeLevel::UANormal
|
||||
);
|
||||
|
@ -1274,7 +1273,6 @@ impl Stylist {
|
|||
rule_hash_target,
|
||||
applicable_declarations,
|
||||
context,
|
||||
self.quirks_mode,
|
||||
flags_setter,
|
||||
CascadeLevel::UserNormal,
|
||||
);
|
||||
|
@ -1305,7 +1303,6 @@ impl Stylist {
|
|||
rule_hash_target,
|
||||
applicable_declarations,
|
||||
context,
|
||||
self.quirks_mode,
|
||||
flags_setter,
|
||||
CascadeLevel::AuthorNormal
|
||||
);
|
||||
|
@ -1327,7 +1324,7 @@ impl Stylist {
|
|||
// as `context`, write a test-case of :visited not working on
|
||||
// Shadow DOM and fix it!
|
||||
let mut matching_context = MatchingContext::new(
|
||||
context.matching_mode,
|
||||
context.matching_mode(),
|
||||
context.bloom_filter,
|
||||
context.nth_index_cache.as_mut().map(|s| &mut **s),
|
||||
stylist.quirks_mode,
|
||||
|
@ -1339,7 +1336,6 @@ impl Stylist {
|
|||
rule_hash_target,
|
||||
applicable_declarations,
|
||||
&mut matching_context,
|
||||
stylist.quirks_mode,
|
||||
flags_setter,
|
||||
CascadeLevel::AuthorNormal,
|
||||
);
|
||||
|
@ -1356,7 +1352,6 @@ impl Stylist {
|
|||
rule_hash_target,
|
||||
applicable_declarations,
|
||||
context,
|
||||
self.quirks_mode,
|
||||
flags_setter,
|
||||
CascadeLevel::AuthorNormal
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue