mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Upgrade to uluru 2
This commit is contained in:
parent
c5ed0430bb
commit
ef7eb02b8d
4 changed files with 17 additions and 11 deletions
|
@ -42,7 +42,7 @@ use style_traits::DevicePixel;
|
|||
#[cfg(feature = "servo")]
|
||||
use style_traits::SpeculativePainter;
|
||||
use time;
|
||||
use uluru::{Entry, LRUCache};
|
||||
use uluru::LRUCache;
|
||||
|
||||
pub use selectors::matching::QuirksMode;
|
||||
|
||||
|
@ -542,7 +542,7 @@ pub struct SelectorFlagsMap<E: TElement> {
|
|||
map: FxHashMap<SendElement<E>, ElementSelectorFlags>,
|
||||
/// An LRU cache to avoid hashmap lookups, which can be slow if the map
|
||||
/// gets big.
|
||||
cache: LRUCache<[Entry<CacheItem<E>>; 4 + 1]>,
|
||||
cache: LRUCache<CacheItem<E>, { 4 + 1 }>,
|
||||
}
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
|
@ -583,7 +583,7 @@ impl<E: TElement> SelectorFlagsMap<E> {
|
|||
/// Applies the flags. Must be called on the main thread.
|
||||
fn apply_flags(&mut self) {
|
||||
debug_assert_eq!(thread_state::get(), ThreadState::LAYOUT);
|
||||
self.cache.evict_all();
|
||||
self.cache.clear();
|
||||
for (el, flags) in self.map.drain() {
|
||||
unsafe {
|
||||
el.set_selector_flags(flags);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue