mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Use SmallBitVec to replace BitVec
This commit is contained in:
parent
4721ef81fd
commit
21006fb752
5 changed files with 17 additions and 11 deletions
|
@ -6,7 +6,6 @@
|
|||
|
||||
use {Atom, LocalName, Namespace};
|
||||
use applicable_declarations::{ApplicableDeclarationBlock, ApplicableDeclarationList};
|
||||
use bit_vec::BitVec;
|
||||
use context::{CascadeInputs, QuirksMode};
|
||||
use dom::TElement;
|
||||
use element_state::ElementState;
|
||||
|
@ -34,6 +33,7 @@ use selectors::sink::Push;
|
|||
use selectors::visitor::SelectorVisitor;
|
||||
use servo_arc::{Arc, ArcBorrow};
|
||||
use shared_lock::{Locked, SharedRwLockReadGuard, StylesheetGuards};
|
||||
use smallbitvec::SmallBitVec;
|
||||
use smallvec::VecLike;
|
||||
use std::fmt::Debug;
|
||||
use std::ops;
|
||||
|
@ -1493,7 +1493,7 @@ impl Stylist {
|
|||
element: &E,
|
||||
bloom: Option<&BloomFilter>,
|
||||
flags_setter: &mut F
|
||||
) -> BitVec
|
||||
) -> SmallBitVec
|
||||
where
|
||||
E: TElement,
|
||||
F: FnMut(&E, ElementSelectorFlags),
|
||||
|
@ -1508,7 +1508,7 @@ impl Stylist {
|
|||
// This means we're guaranteed to get the same rulehash buckets for all
|
||||
// the lookups, which means that the bitvecs are comparable. We verify
|
||||
// this in the caller by asserting that the bitvecs are same-length.
|
||||
let mut results = BitVec::new();
|
||||
let mut results = SmallBitVec::new();
|
||||
for (data, _) in self.cascade_data.iter_origins() {
|
||||
data.selectors_for_cache_revalidation.lookup(
|
||||
*element,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue