aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/stylepropertymapreadonly.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/stylepropertymapreadonly.rs')
-rw-r--r--components/script/dom/stylepropertymapreadonly.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/components/script/dom/stylepropertymapreadonly.rs b/components/script/dom/stylepropertymapreadonly.rs
index 3881bfcdd87..f64c9cfc54a 100644
--- a/components/script/dom/stylepropertymapreadonly.rs
+++ b/components/script/dom/stylepropertymapreadonly.rs
@@ -12,14 +12,15 @@ use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
use servo_atoms::Atom;
use std::cmp::Ordering;
-use std::collections::HashMap;
use std::iter::Iterator;
use style::custom_properties;
+use super::bindings::trace::HashMapTracedValues;
+
#[dom_struct]
pub struct StylePropertyMapReadOnly {
reflector: Reflector,
- entries: HashMap<Atom, Dom<CSSStyleValue>>,
+ entries: HashMapTracedValues<Atom, Dom<CSSStyleValue>>,
}
impl StylePropertyMapReadOnly {
@@ -29,7 +30,7 @@ impl StylePropertyMapReadOnly {
{
StylePropertyMapReadOnly {
reflector: Reflector::new(),
- entries: entries.into_iter().collect(),
+ entries: HashMapTracedValues(entries.into_iter().collect()),
}
}
@@ -78,6 +79,7 @@ impl StylePropertyMapReadOnlyMethods for StylePropertyMapReadOnly {
fn GetProperties(&self) -> Vec<DOMString> {
let mut result: Vec<DOMString> = self
.entries
+ .0
.keys()
.map(|key| DOMString::from(&**key))
.collect();