mirror of
https://github.com/servo/servo.git
synced 2025-08-11 08:25:32 +01:00
stylo: use FnvHashMap everywhere, remove default HashMap construction methods
This commit is contained in:
parent
0b69887387
commit
8bce37e6ba
7 changed files with 12 additions and 98 deletions
|
@ -66,7 +66,7 @@ use gecko_bindings::structs::nsChangeHint;
|
|||
use gecko_bindings::structs::nsIDocument_DocumentTheme as DocumentTheme;
|
||||
use gecko_bindings::structs::nsRestyleHint;
|
||||
use gecko_bindings::sugar::ownership::{HasArcFFI, HasSimpleFFI};
|
||||
use hash::HashMap;
|
||||
use hash::FnvHashMap;
|
||||
use logical_geometry::WritingMode;
|
||||
use media_queries::Device;
|
||||
use properties::{ComputedValues, LonghandId, parse_style_attribute};
|
||||
|
@ -1303,14 +1303,14 @@ impl<'le> TElement for GeckoElement<'le> {
|
|||
|
||||
fn get_css_transitions_info(
|
||||
&self,
|
||||
) -> HashMap<TransitionProperty, Arc<AnimationValue>> {
|
||||
) -> FnvHashMap<TransitionProperty, Arc<AnimationValue>> {
|
||||
use gecko_bindings::bindings::Gecko_ElementTransitions_EndValueAt;
|
||||
use gecko_bindings::bindings::Gecko_ElementTransitions_Length;
|
||||
use gecko_bindings::bindings::Gecko_ElementTransitions_PropertyAt;
|
||||
|
||||
let collection_length =
|
||||
unsafe { Gecko_ElementTransitions_Length(self.0) };
|
||||
let mut map = HashMap::with_capacity(collection_length);
|
||||
let mut map = FnvHashMap::with_capacity_and_hasher(collection_length, Default::default());
|
||||
for i in 0..collection_length {
|
||||
let (property, raw_end_value) = unsafe {
|
||||
(Gecko_ElementTransitions_PropertyAt(self.0, i as usize).into(),
|
||||
|
@ -1447,7 +1447,7 @@ impl<'le> TElement for GeckoElement<'le> {
|
|||
combined_duration: f32,
|
||||
before_change_style: &ComputedValues,
|
||||
after_change_style: &ComputedValues,
|
||||
existing_transitions: &HashMap<TransitionProperty, Arc<AnimationValue>>,
|
||||
existing_transitions: &FnvHashMap<TransitionProperty, Arc<AnimationValue>>,
|
||||
) -> bool {
|
||||
use values::animated::{Animate, Procedure};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue