mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
style: Convert FnvHash{Set,Map} instances to FxHash{Set,Map}.
Bug: 1477628 Reviewed-by: heycam
This commit is contained in:
parent
0cab212052
commit
fc9df0bcf3
18 changed files with 49 additions and 44 deletions
|
@ -5,7 +5,7 @@
|
|||
//! Code related to the invalidation of media-query-affected rules.
|
||||
|
||||
use context::QuirksMode;
|
||||
use fnv::FnvHashSet;
|
||||
use fxhash::FxHashSet;
|
||||
use media_queries::Device;
|
||||
use shared_lock::SharedRwLockReadGuard;
|
||||
use stylesheets::{DocumentRule, ImportRule, MediaRule};
|
||||
|
@ -54,14 +54,14 @@ impl ToMediaListKey for MediaRule {}
|
|||
#[derive(Debug, MallocSizeOf, PartialEq)]
|
||||
pub struct EffectiveMediaQueryResults {
|
||||
/// The set of media lists that matched last time.
|
||||
set: FnvHashSet<MediaListKey>,
|
||||
set: FxHashSet<MediaListKey>,
|
||||
}
|
||||
|
||||
impl EffectiveMediaQueryResults {
|
||||
/// Trivially constructs an empty `EffectiveMediaQueryResults`.
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
set: FnvHashSet::default(),
|
||||
set: FxHashSet::default(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ use Atom;
|
|||
use CaseSensitivityExt;
|
||||
use LocalName as SelectorLocalName;
|
||||
use dom::{TDocument, TElement, TNode};
|
||||
use fnv::FnvHashSet;
|
||||
use fxhash::FxHashSet;
|
||||
use invalidation::element::element_wrapper::{ElementSnapshot, ElementWrapper};
|
||||
use invalidation::element::restyle_hints::RestyleHint;
|
||||
use media_queries::Device;
|
||||
|
@ -106,9 +106,9 @@ impl Invalidation {
|
|||
#[derive(MallocSizeOf)]
|
||||
pub struct StylesheetInvalidationSet {
|
||||
/// The subtrees we know we have to restyle so far.
|
||||
invalid_scopes: FnvHashSet<Invalidation>,
|
||||
invalid_scopes: FxHashSet<Invalidation>,
|
||||
/// The elements we know we have to restyle so far.
|
||||
invalid_elements: FnvHashSet<Invalidation>,
|
||||
invalid_elements: FxHashSet<Invalidation>,
|
||||
/// Whether the whole document should be restyled.
|
||||
fully_invalid: bool,
|
||||
}
|
||||
|
@ -117,8 +117,8 @@ impl StylesheetInvalidationSet {
|
|||
/// Create an empty `StylesheetInvalidationSet`.
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
invalid_scopes: FnvHashSet::default(),
|
||||
invalid_elements: FnvHashSet::default(),
|
||||
invalid_scopes: FxHashSet::default(),
|
||||
invalid_elements: FxHashSet::default(),
|
||||
fully_invalid: false,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue