aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/raredata.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/raredata.rs')
-rw-r--r--components/script/dom/raredata.rs16
1 files changed, 7 insertions, 9 deletions
diff --git a/components/script/dom/raredata.rs b/components/script/dom/raredata.rs
index 9ebf8e7d787..874db7b48ad 100644
--- a/components/script/dom/raredata.rs
+++ b/components/script/dom/raredata.rs
@@ -2,14 +2,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
-use crate::dom::bindings::cell::DomRefCell;
-use crate::dom::bindings::root::MutNullableDom;
+use crate::dom::bindings::root::Dom;
use crate::dom::customelementregistry::{
CustomElementDefinition, CustomElementReaction, CustomElementState,
};
use crate::dom::mutationobserver::RegisteredObserver;
use crate::dom::shadowroot::ShadowRoot;
-use std::cell::Cell;
use std::rc::Rc;
#[derive(Default, JSTraceable, MallocSizeOf)]
@@ -18,9 +16,9 @@ pub struct NodeRareData {
/// The shadow root the node belongs to.
/// This is None if the node is not in a shadow tree or
/// if it is a ShadowRoot.
- pub owner_shadow_root: MutNullableDom<ShadowRoot>,
+ pub owner_shadow_root: Option<Dom<ShadowRoot>>,
/// Registered observers for this node.
- pub mutation_observers: DomRefCell<Vec<RegisteredObserver>>,
+ pub mutation_observers: Vec<RegisteredObserver>,
}
#[derive(Default, JSTraceable, MallocSizeOf)]
@@ -29,12 +27,12 @@ pub struct ElementRareData {
/// https://dom.spec.whatwg.org/#dom-element-shadowroot
/// XXX This is currently not exposed to web content. Only for
/// internal use.
- pub shadow_root: MutNullableDom<ShadowRoot>,
+ pub shadow_root: Option<Dom<ShadowRoot>>,
/// <https://html.spec.whatwg.org/multipage/#custom-element-reaction-queue>
- pub custom_element_reaction_queue: DomRefCell<Vec<CustomElementReaction>>,
+ pub custom_element_reaction_queue: Vec<CustomElementReaction>,
/// <https://dom.spec.whatwg.org/#concept-element-custom-element-definition>
#[ignore_malloc_size_of = "Rc"]
- pub custom_element_definition: DomRefCell<Option<Rc<CustomElementDefinition>>>,
+ pub custom_element_definition: Option<Rc<CustomElementDefinition>>,
/// <https://dom.spec.whatwg.org/#concept-element-custom-element-state>
- pub custom_element_state: Cell<CustomElementState>,
+ pub custom_element_state: CustomElementState,
}