style: Convert FnvHash{Set,Map} instances to FxHash{Set,Map}.

Bug: 1477628
Reviewed-by: heycam
This commit is contained in:
Nicholas Nethercote 2018-07-27 16:49:04 +10:00 committed by Emilio Cobos Álvarez
parent 0cab212052
commit fc9df0bcf3
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
18 changed files with 49 additions and 44 deletions

View file

@ -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(),
}
}

View file

@ -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,
}
}