aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2017-09-26 01:21:01 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2017-09-26 09:49:02 +0200
commitc52fd0a78041ec22db1c4b391556368cd8b87b02 (patch)
tree80e283b6af26f0fd7bd3d620d45be6a52d4854b4 /components/script/dom
parentd29335040d78a19f25830061484cf70dc03a9c21 (diff)
downloadservo-c52fd0a78041ec22db1c4b391556368cd8b87b02.tar.gz
servo-c52fd0a78041ec22db1c4b391556368cd8b87b02.zip
Rename MutNullableJS<T> to MutNullableDom<T>
Diffstat (limited to 'components/script/dom')
-rw-r--r--components/script/dom/attr.rs6
-rw-r--r--components/script/dom/bindings/root.rs24
-rw-r--r--components/script/dom/bluetoothdevice.rs4
-rw-r--r--components/script/dom/client.rs4
-rw-r--r--components/script/dom/cssgroupingrule.rs6
-rw-r--r--components/script/dom/csskeyframerule.rs4
-rw-r--r--components/script/dom/csskeyframesrule.rs6
-rw-r--r--components/script/dom/cssmediarule.rs6
-rw-r--r--components/script/dom/cssrulelist.rs12
-rw-r--r--components/script/dom/cssstylerule.rs4
-rw-r--r--components/script/dom/cssstylesheet.rs6
-rw-r--r--components/script/dom/dissimilaroriginwindow.rs4
-rw-r--r--components/script/dom/document.rs44
-rw-r--r--components/script/dom/element.rs6
-rw-r--r--components/script/dom/event.rs6
-rw-r--r--components/script/dom/filereader.rs6
-rw-r--r--components/script/dom/focusevent.rs4
-rw-r--r--components/script/dom/globalscope.rs4
-rw-r--r--components/script/dom/htmlanchorelement.rs4
-rw-r--r--components/script/dom/htmlareaelement.rs4
-rwxr-xr-xcomponents/script/dom/htmlbuttonelement.rs4
-rw-r--r--components/script/dom/htmlcollection.rs6
-rw-r--r--components/script/dom/htmlelement.rs6
-rw-r--r--components/script/dom/htmlfieldsetelement.rs4
-rw-r--r--components/script/dom/htmliframeelement.rs4
-rw-r--r--components/script/dom/htmlimageelement.rs4
-rwxr-xr-xcomponents/script/dom/htmlinputelement.rs8
-rw-r--r--components/script/dom/htmllegendelement.rs4
-rw-r--r--components/script/dom/htmllinkelement.rs8
-rw-r--r--components/script/dom/htmlmediaelement.rs4
-rw-r--r--components/script/dom/htmlmetaelement.rs6
-rwxr-xr-xcomponents/script/dom/htmlobjectelement.rs4
-rw-r--r--components/script/dom/htmloutputelement.rs4
-rwxr-xr-xcomponents/script/dom/htmlselectelement.rs6
-rw-r--r--components/script/dom/htmlstyleelement.rs6
-rw-r--r--components/script/dom/htmltableelement.rs4
-rw-r--r--components/script/dom/htmltablerowelement.rs4
-rw-r--r--components/script/dom/htmltemplateelement.rs6
-rwxr-xr-xcomponents/script/dom/htmltextareaelement.rs4
-rw-r--r--components/script/dom/mod.rs2
-rw-r--r--components/script/dom/mouseevent.rs4
-rw-r--r--components/script/dom/mutationrecord.rs10
-rw-r--r--components/script/dom/navigator.rs16
-rw-r--r--components/script/dom/node.rs18
-rw-r--r--components/script/dom/nodelist.rs6
-rw-r--r--components/script/dom/request.rs4
-rw-r--r--components/script/dom/response.rs4
-rw-r--r--components/script/dom/serviceworkercontainer.rs4
-rw-r--r--components/script/dom/servoparser/mod.rs4
-rw-r--r--components/script/dom/storageevent.rs6
-rw-r--r--components/script/dom/uievent.rs4
-rw-r--r--components/script/dom/url.rs4
-rw-r--r--components/script/dom/vrdisplay.rs10
-rw-r--r--components/script/dom/webgl_extensions/ext/oesvertexarrayobject.rs6
-rw-r--r--components/script/dom/webgl_extensions/ext/webglvertexarrayobjectoes.rs6
-rw-r--r--components/script/dom/webgl_extensions/wrapper.rs8
-rw-r--r--components/script/dom/webglprogram.rs6
-rw-r--r--components/script/dom/webglrenderingcontext.rs30
-rw-r--r--components/script/dom/window.rs28
-rw-r--r--components/script/dom/workerglobalscope.rs8
-rw-r--r--components/script/dom/workernavigator.rs4
-rw-r--r--components/script/dom/xmlhttprequest.rs6
62 files changed, 229 insertions, 229 deletions
diff --git a/components/script/dom/attr.rs b/components/script/dom/attr.rs
index ea97c1a294f..d18eed26f65 100644
--- a/components/script/dom/attr.rs
+++ b/components/script/dom/attr.rs
@@ -7,7 +7,7 @@ use dom::bindings::cell::DOMRefCell;
use dom::bindings::codegen::Bindings::AttrBinding::{self, AttrMethods};
use dom::bindings::inheritance::Castable;
use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::{LayoutJS, MutNullableJS, Root, RootedReference};
+use dom::bindings::root::{LayoutJS, MutNullableDom, Root, RootedReference};
use dom::bindings::str::DOMString;
use dom::customelementregistry::CallbackReaction;
use dom::element::{AttributeMutation, Element};
@@ -32,7 +32,7 @@ pub struct Attr {
value: DOMRefCell<AttrValue>,
/// the element that owns this attribute.
- owner: MutNullableJS<Element>,
+ owner: MutNullableDom<Element>,
}
impl Attr {
@@ -52,7 +52,7 @@ impl Attr {
prefix: prefix,
},
value: DOMRefCell::new(value),
- owner: MutNullableJS::new(owner),
+ owner: MutNullableDom::new(owner),
}
}
diff --git a/components/script/dom/bindings/root.rs b/components/script/dom/bindings/root.rs
index a7f4bb9e411..dbfe4023d63 100644
--- a/components/script/dom/bindings/root.rs
+++ b/components/script/dom/bindings/root.rs
@@ -298,15 +298,15 @@ impl<T: DomObject + PartialEq> PartialEq<T> for MutDom<T> {
/// on `Dom<T>`.
#[must_root]
#[derive(JSTraceable)]
-pub struct MutNullableJS<T: DomObject> {
+pub struct MutNullableDom<T: DomObject> {
ptr: UnsafeCell<Option<Dom<T>>>,
}
-impl<T: DomObject> MutNullableJS<T> {
- /// Create a new `MutNullableJS`.
- pub fn new(initial: Option<&T>) -> MutNullableJS<T> {
+impl<T: DomObject> MutNullableDom<T> {
+ /// Create a new `MutNullableDom`.
+ pub fn new(initial: Option<&T>) -> MutNullableDom<T> {
debug_assert!(thread_state::get().is_script());
- MutNullableJS {
+ MutNullableDom {
ptr: UnsafeCell::new(initial.map(Dom::from_ref)),
}
}
@@ -344,7 +344,7 @@ impl<T: DomObject> MutNullableJS<T> {
}
}
- /// Set this `MutNullableJS` to the given value.
+ /// Set this `MutNullableDom` to the given value.
pub fn set(&self, val: Option<&T>) {
debug_assert!(thread_state::get().is_script());
unsafe {
@@ -360,7 +360,7 @@ impl<T: DomObject> MutNullableJS<T> {
}
}
-impl<T: DomObject> PartialEq for MutNullableJS<T> {
+impl<T: DomObject> PartialEq for MutNullableDom<T> {
fn eq(&self, other: &Self) -> bool {
unsafe {
*self.ptr.get() == *other.ptr.get()
@@ -368,7 +368,7 @@ impl<T: DomObject> PartialEq for MutNullableJS<T> {
}
}
-impl<'a, T: DomObject> PartialEq<Option<&'a T>> for MutNullableJS<T> {
+impl<'a, T: DomObject> PartialEq<Option<&'a T>> for MutNullableDom<T> {
fn eq(&self, other: &Option<&T>) -> bool {
unsafe {
*self.ptr.get() == other.map(Dom::from_ref)
@@ -376,17 +376,17 @@ impl<'a, T: DomObject> PartialEq<Option<&'a T>> for MutNullableJS<T> {
}
}
-impl<T: DomObject> Default for MutNullableJS<T> {
+impl<T: DomObject> Default for MutNullableDom<T> {
#[allow(unrooted_must_root)]
- fn default() -> MutNullableJS<T> {
+ fn default() -> MutNullableDom<T> {
debug_assert!(thread_state::get().is_script());
- MutNullableJS {
+ MutNullableDom {
ptr: UnsafeCell::new(None),
}
}
}
-impl<T: DomObject> HeapSizeOf for MutNullableJS<T> {
+impl<T: DomObject> HeapSizeOf for MutNullableDom<T> {
fn heap_size_of_children(&self) -> usize {
// See comment on HeapSizeOf for Dom<T>.
0
diff --git a/components/script/dom/bluetoothdevice.rs b/components/script/dom/bluetoothdevice.rs
index c07852f7853..d98a1ed42f5 100644
--- a/components/script/dom/bluetoothdevice.rs
+++ b/components/script/dom/bluetoothdevice.rs
@@ -12,7 +12,7 @@ use dom::bindings::error::Error;
use dom::bindings::error::ErrorResult;
use dom::bindings::inheritance::Castable;
use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::{Dom, MutNullableJS, Root};
+use dom::bindings::root::{Dom, MutNullableDom, Root};
use dom::bindings::str::DOMString;
use dom::bluetooth::{AsyncBluetoothListener, Bluetooth, response_async};
use dom::bluetoothcharacteristicproperties::BluetoothCharacteristicProperties;
@@ -35,7 +35,7 @@ pub struct BluetoothDevice {
eventtarget: EventTarget,
id: DOMString,
name: Option<DOMString>,
- gatt: MutNullableJS<BluetoothRemoteGATTServer>,
+ gatt: MutNullableDom<BluetoothRemoteGATTServer>,
context: Dom<Bluetooth>,
attribute_instance_map: (DOMRefCell<HashMap<String, Dom<BluetoothRemoteGATTService>>>,
DOMRefCell<HashMap<String, Dom<BluetoothRemoteGATTCharacteristic>>>,
diff --git a/components/script/dom/client.rs b/components/script/dom/client.rs
index 872b23196e6..6ec88bd0cbd 100644
--- a/components/script/dom/client.rs
+++ b/components/script/dom/client.rs
@@ -5,7 +5,7 @@
use dom::bindings::codegen::Bindings::ClientBinding::{ClientMethods, Wrap};
use dom::bindings::codegen::Bindings::ClientBinding::FrameType;
use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::{Root, MutNullableJS};
+use dom::bindings::root::{Root, MutNullableDom};
use dom::bindings::str::{DOMString, USVString};
use dom::serviceworker::ServiceWorker;
use dom::window::Window;
@@ -17,7 +17,7 @@ use uuid::Uuid;
#[dom_struct]
pub struct Client {
reflector_: Reflector,
- active_worker: MutNullableJS<ServiceWorker>,
+ active_worker: MutNullableDom<ServiceWorker>,
url: ServoUrl,
frame_type: FrameType,
#[ignore_heap_size_of = "Defined in uuid"]
diff --git a/components/script/dom/cssgroupingrule.rs b/components/script/dom/cssgroupingrule.rs
index f3a46223752..de5e59f2784 100644
--- a/components/script/dom/cssgroupingrule.rs
+++ b/components/script/dom/cssgroupingrule.rs
@@ -6,7 +6,7 @@ use dom::bindings::codegen::Bindings::CSSGroupingRuleBinding::CSSGroupingRuleMet
use dom::bindings::error::{ErrorResult, Fallible};
use dom::bindings::inheritance::Castable;
use dom::bindings::reflector::DomObject;
-use dom::bindings::root::{MutNullableJS, Root};
+use dom::bindings::root::{MutNullableDom, Root};
use dom::bindings::str::DOMString;
use dom::cssrule::CSSRule;
use dom::cssrulelist::{CSSRuleList, RulesSource};
@@ -21,7 +21,7 @@ pub struct CSSGroupingRule {
cssrule: CSSRule,
#[ignore_heap_size_of = "Arc"]
rules: Arc<Locked<StyleCssRules>>,
- rulelist: MutNullableJS<CSSRuleList>,
+ rulelist: MutNullableDom<CSSRuleList>,
}
impl CSSGroupingRule {
@@ -30,7 +30,7 @@ impl CSSGroupingRule {
CSSGroupingRule {
cssrule: CSSRule::new_inherited(parent_stylesheet),
rules: rules,
- rulelist: MutNullableJS::new(None),
+ rulelist: MutNullableDom::new(None),
}
}
diff --git a/components/script/dom/csskeyframerule.rs b/components/script/dom/csskeyframerule.rs
index 0b8329ccf1b..17b5c7a63c4 100644
--- a/components/script/dom/csskeyframerule.rs
+++ b/components/script/dom/csskeyframerule.rs
@@ -5,7 +5,7 @@
use dom::bindings::codegen::Bindings::CSSKeyframeRuleBinding::{self, CSSKeyframeRuleMethods};
use dom::bindings::inheritance::Castable;
use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::{Dom, MutNullableJS, Root};
+use dom::bindings::root::{Dom, MutNullableDom, Root};
use dom::bindings::str::DOMString;
use dom::cssrule::{CSSRule, SpecificCSSRule};
use dom::cssstyledeclaration::{CSSModificationAccess, CSSStyleDeclaration, CSSStyleOwner};
@@ -21,7 +21,7 @@ pub struct CSSKeyframeRule {
cssrule: CSSRule,
#[ignore_heap_size_of = "Arc"]
keyframerule: Arc<Locked<Keyframe>>,
- style_decl: MutNullableJS<CSSStyleDeclaration>,
+ style_decl: MutNullableDom<CSSStyleDeclaration>,
}
impl CSSKeyframeRule {
diff --git a/components/script/dom/csskeyframesrule.rs b/components/script/dom/csskeyframesrule.rs
index d699f15c0a0..280cd53fcf6 100644
--- a/components/script/dom/csskeyframesrule.rs
+++ b/components/script/dom/csskeyframesrule.rs
@@ -8,7 +8,7 @@ use dom::bindings::codegen::Bindings::CSSKeyframesRuleBinding::CSSKeyframesRuleM
use dom::bindings::error::ErrorResult;
use dom::bindings::inheritance::Castable;
use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::{MutNullableJS, Root};
+use dom::bindings::root::{MutNullableDom, Root};
use dom::bindings::str::DOMString;
use dom::csskeyframerule::CSSKeyframeRule;
use dom::cssrule::{CSSRule, SpecificCSSRule};
@@ -26,7 +26,7 @@ pub struct CSSKeyframesRule {
cssrule: CSSRule,
#[ignore_heap_size_of = "Arc"]
keyframesrule: Arc<Locked<KeyframesRule>>,
- rulelist: MutNullableJS<CSSRuleList>,
+ rulelist: MutNullableDom<CSSRuleList>,
}
impl CSSKeyframesRule {
@@ -35,7 +35,7 @@ impl CSSKeyframesRule {
CSSKeyframesRule {
cssrule: CSSRule::new_inherited(parent_stylesheet),
keyframesrule: keyframesrule,
- rulelist: MutNullableJS::new(None),
+ rulelist: MutNullableDom::new(None),
}
}
diff --git a/components/script/dom/cssmediarule.rs b/components/script/dom/cssmediarule.rs
index 1dc4ce69a11..c77ed0b7563 100644
--- a/components/script/dom/cssmediarule.rs
+++ b/components/script/dom/cssmediarule.rs
@@ -7,7 +7,7 @@ use dom::bindings::codegen::Bindings::CSSMediaRuleBinding;
use dom::bindings::codegen::Bindings::CSSMediaRuleBinding::CSSMediaRuleMethods;
use dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::{MutNullableJS, Root};
+use dom::bindings::root::{MutNullableDom, Root};
use dom::bindings::str::DOMString;
use dom::cssconditionrule::CSSConditionRule;
use dom::cssrule::SpecificCSSRule;
@@ -27,7 +27,7 @@ pub struct CSSMediaRule {
cssconditionrule: CSSConditionRule,
#[ignore_heap_size_of = "Arc"]
mediarule: Arc<Locked<MediaRule>>,
- medialist: MutNullableJS<MediaList>,
+ medialist: MutNullableDom<MediaList>,
}
impl CSSMediaRule {
@@ -38,7 +38,7 @@ impl CSSMediaRule {
CSSMediaRule {
cssconditionrule: CSSConditionRule::new_inherited(parent_stylesheet, list),
mediarule: mediarule,
- medialist: MutNullableJS::new(None),
+ medialist: MutNullableDom::new(None),
}
}
diff --git a/components/script/dom/cssrulelist.rs b/components/script/dom/cssrulelist.rs
index 4500405869e..8fdef21c4d0 100644
--- a/components/script/dom/cssrulelist.rs
+++ b/components/script/dom/cssrulelist.rs
@@ -7,7 +7,7 @@ use dom::bindings::codegen::Bindings::CSSRuleListBinding;
use dom::bindings::codegen::Bindings::CSSRuleListBinding::CSSRuleListMethods;
use dom::bindings::error::{Error, ErrorResult, Fallible};
use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, MutNullableJS, Root};
+use dom::bindings::root::{Dom, MutNullableDom, Root};
use dom::csskeyframerule::CSSKeyframeRule;
use dom::cssrule::CSSRule;
use dom::cssstylesheet::CSSStyleSheet;
@@ -39,7 +39,7 @@ pub struct CSSRuleList {
parent_stylesheet: Dom<CSSStyleSheet>,
#[ignore_heap_size_of = "Arc"]
rules: RulesSource,
- dom_rules: DOMRefCell<Vec<MutNullableJS<CSSRule>>>
+ dom_rules: DOMRefCell<Vec<MutNullableDom<CSSRule>>>
}
pub enum RulesSource {
@@ -53,10 +53,10 @@ impl CSSRuleList {
let guard = parent_stylesheet.shared_lock().read();
let dom_rules = match rules {
RulesSource::Rules(ref rules) => {
- rules.read_with(&guard).0.iter().map(|_| MutNullableJS::new(None)).collect()
+ rules.read_with(&guard).0.iter().map(|_| MutNullableDom::new(None)).collect()
}
RulesSource::Keyframes(ref rules) => {
- rules.read_with(&guard).keyframes.iter().map(|_| MutNullableJS::new(None)).collect()
+ rules.read_with(&guard).keyframes.iter().map(|_| MutNullableDom::new(None)).collect()
}
};
@@ -102,7 +102,7 @@ impl CSSRuleList {
let parent_stylesheet = &*self.parent_stylesheet;
let dom_rule = CSSRule::new_specific(&window, parent_stylesheet, new_rule);
- self.dom_rules.borrow_mut().insert(index, MutNullableJS::new(Some(&*dom_rule)));
+ self.dom_rules.borrow_mut().insert(index, MutNullableDom::new(Some(&*dom_rule)));
Ok((idx))
}
@@ -170,7 +170,7 @@ impl CSSRuleList {
if let RulesSource::Rules(..) = self.rules {
panic!("Can only call append_lazy_rule with keyframes-backed CSSRules");
}
- self.dom_rules.borrow_mut().push(MutNullableJS::new(None));
+ self.dom_rules.borrow_mut().push(MutNullableDom::new(None));
}
}
diff --git a/components/script/dom/cssstylerule.rs b/components/script/dom/cssstylerule.rs
index 5004a4f909b..b8b99b8aef3 100644
--- a/components/script/dom/cssstylerule.rs
+++ b/components/script/dom/cssstylerule.rs
@@ -8,7 +8,7 @@ use dom::bindings::codegen::Bindings::CSSStyleRuleBinding::{self, CSSStyleRuleMe
use dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
use dom::bindings::inheritance::Castable;
use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::{Dom, MutNullableJS, Root};
+use dom::bindings::root::{Dom, MutNullableDom, Root};
use dom::bindings::str::DOMString;
use dom::cssrule::{CSSRule, SpecificCSSRule};
use dom::cssstyledeclaration::{CSSModificationAccess, CSSStyleDeclaration, CSSStyleOwner};
@@ -27,7 +27,7 @@ pub struct CSSStyleRule {
cssrule: CSSRule,
#[ignore_heap_size_of = "Arc"]
stylerule: Arc<Locked<StyleRule>>,
- style_decl: MutNullableJS<CSSStyleDeclaration>,
+ style_decl: MutNullableDom<CSSStyleDeclaration>,
}
impl CSSStyleRule {
diff --git a/components/script/dom/cssstylesheet.rs b/components/script/dom/cssstylesheet.rs
index 26396c96439..2839708e607 100644
--- a/components/script/dom/cssstylesheet.rs
+++ b/components/script/dom/cssstylesheet.rs
@@ -7,7 +7,7 @@ use dom::bindings::codegen::Bindings::CSSStyleSheetBinding::CSSStyleSheetMethods
use dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
use dom::bindings::error::{Error, ErrorResult, Fallible};
use dom::bindings::reflector::{reflect_dom_object, DomObject};
-use dom::bindings::root::{Dom, MutNullableJS, Root};
+use dom::bindings::root::{Dom, MutNullableDom, Root};
use dom::bindings::str::DOMString;
use dom::cssrulelist::{CSSRuleList, RulesSource};
use dom::element::Element;
@@ -23,7 +23,7 @@ use style::stylesheets::Stylesheet as StyleStyleSheet;
pub struct CSSStyleSheet {
stylesheet: StyleSheet,
owner: Dom<Element>,
- rulelist: MutNullableJS<CSSRuleList>,
+ rulelist: MutNullableDom<CSSRuleList>,
#[ignore_heap_size_of = "Arc"]
style_stylesheet: Arc<StyleStyleSheet>,
origin_clean: Cell<bool>,
@@ -38,7 +38,7 @@ impl CSSStyleSheet {
CSSStyleSheet {
stylesheet: StyleSheet::new_inherited(type_, href, title),
owner: Dom::from_ref(owner),
- rulelist: MutNullableJS::new(None),
+ rulelist: MutNullableDom::new(None),
style_stylesheet: stylesheet,
origin_clean: Cell::new(true),
}
diff --git a/components/script/dom/dissimilaroriginwindow.rs b/components/script/dom/dissimilaroriginwindow.rs
index 174446b6098..ba1adf00c21 100644
--- a/components/script/dom/dissimilaroriginwindow.rs
+++ b/components/script/dom/dissimilaroriginwindow.rs
@@ -6,7 +6,7 @@ use dom::bindings::codegen::Bindings::DissimilarOriginWindowBinding;
use dom::bindings::codegen::Bindings::DissimilarOriginWindowBinding::DissimilarOriginWindowMethods;
use dom::bindings::error::{Error, ErrorResult};
use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{Dom, MutNullableJS, Root};
+use dom::bindings::root::{Dom, MutNullableDom, Root};
use dom::bindings::str::DOMString;
use dom::bindings::structuredclone::StructuredCloneData;
use dom::dissimilaroriginlocation::DissimilarOriginLocation;
@@ -40,7 +40,7 @@ pub struct DissimilarOriginWindow {
window_proxy: Dom<WindowProxy>,
/// The location of this window, initialized lazily.
- location: MutNullableJS<DissimilarOriginLocation>,
+ location: MutNullableDom<DissimilarOriginLocation>,
}
impl DissimilarOriginWindow {
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs
index 3075dcfc54d..49dfdb4230e 100644
--- a/components/script/dom/document.rs
+++ b/components/script/dom/document.rs
@@ -27,7 +27,7 @@ use dom::bindings::inheritance::{Castable, ElementTypeId, HTMLElementTypeId, Nod
use dom::bindings::num::Finite;
use dom::bindings::refcounted::{Trusted, TrustedPromise};
use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::{Dom, LayoutJS, MutNullableJS, Root, RootedReference};
+use dom::bindings::root::{Dom, LayoutJS, MutNullableDom, Root, RootedReference};
use dom::bindings::str::{DOMString, USVString};
use dom::bindings::xmlname::{namespace_from_domstring, validate_and_extract, xml_name_type};
use dom::bindings::xmlname::XMLName::InvalidXMLName;
@@ -224,7 +224,7 @@ impl ::style::stylesheets::StylesheetInDocument for StyleSheetInDocument {
pub struct Document {
node: Node,
window: Dom<Window>,
- implementation: MutNullableJS<DOMImplementation>,
+ implementation: MutNullableDom<DOMImplementation>,
content_type: DOMString,
last_modified: Option<String>,
encoding: Cell<EncodingRef>,
@@ -239,28 +239,28 @@ pub struct Document {
tag_map: DOMRefCell<HashMap<LocalName, Dom<HTMLCollection>>>,
tagns_map: DOMRefCell<HashMap<QualName, Dom<HTMLCollection>>>,
classes_map: DOMRefCell<HashMap<Vec<Atom>, Dom<HTMLCollection>>>,
- images: MutNullableJS<HTMLCollection>,
- embeds: MutNullableJS<HTMLCollection>,
- links: MutNullableJS<HTMLCollection>,
- forms: MutNullableJS<HTMLCollection>,
- scripts: MutNullableJS<HTMLCollection>,
- anchors: MutNullableJS<HTMLCollection>,
- applets: MutNullableJS<HTMLCollection>,
+ images: MutNullableDom<HTMLCollection>,
+ embeds: MutNullableDom<HTMLCollection>,
+ links: MutNullableDom<HTMLCollection>,
+ forms: MutNullableDom<HTMLCollection>,
+ scripts: MutNullableDom<HTMLCollection>,
+ anchors: MutNullableDom<HTMLCollection>,
+ applets: MutNullableDom<HTMLCollection>,
/// Lock use for style attributes and author-origin stylesheet objects in this document.
/// Can be acquired once for accessing many objects.
style_shared_lock: StyleSharedRwLock,
/// List of stylesheets associated with nodes in this document. |None| if the list needs to be refreshed.
stylesheets: DOMRefCell<StylesheetSet<StyleSheetInDocument>>,
- stylesheet_list: MutNullableJS<StyleSheetList>,
+ stylesheet_list: MutNullableDom<StyleSheetList>,
ready_state: Cell<DocumentReadyState>,
/// Whether the DOMContentLoaded event has already been dispatched.
domcontentloaded_dispatched: Cell<bool>,
/// The element that has most recently requested focus for itself.
- possibly_focused: MutNullableJS<Element>,
+ possibly_focused: MutNullableDom<Element>,
/// The element that currently has the document focus context.
- focused: MutNullableJS<Element>,
+ focused: MutNullableDom<Element>,
/// The script element that is currently executing.
- current_script: MutNullableJS<HTMLScriptElement>,
+ current_script: MutNullableDom<HTMLScriptElement>,
/// https://html.spec.whatwg.org/multipage/#pending-parsing-blocking-script
pending_parsing_blocking_script: DOMRefCell<Option<PendingScript>>,
/// Number of stylesheets that block executing the next parser-inserted script
@@ -288,14 +288,14 @@ pub struct Document {
/// Tracks all outstanding loads related to this document.
loader: DOMRefCell<DocumentLoader>,
/// The current active HTML parser, to allow resuming after interruptions.
- current_parser: MutNullableJS<ServoParser>,
+ current_parser: MutNullableDom<ServoParser>,
/// When we should kick off a reflow. This happens during parsing.
reflow_timeout: Cell<Option<u64>>,
/// The cached first `base` element with an `href` attribute.
- base_element: MutNullableJS<HTMLBaseElement>,
+ base_element: MutNullableDom<HTMLBaseElement>,
/// This field is set to the document itself for inert documents.
/// https://html.spec.whatwg.org/multipage/#appropriate-template-contents-owner-document
- appropriate_template_contents_owner_document: MutNullableJS<Document>,
+ appropriate_template_contents_owner_document: MutNullableDom<Document>,
/// Information on elements needing restyle to ship over to the layout thread when the
/// time comes.
pending_restyles: DOMRefCell<HashMap<Dom<Element>, PendingRestyle>>,
@@ -323,7 +323,7 @@ pub struct Document {
/// https://html.spec.whatwg.org/multipage/#dom-document-referrer
referrer: Option<String>,
/// https://html.spec.whatwg.org/multipage/#target-element
- target_element: MutNullableJS<Element>,
+ target_element: MutNullableDom<Element>,
/// https://w3c.github.io/uievents/#event-type-dblclick
#[ignore_heap_size_of = "Defined in std"]
last_click_info: DOMRefCell<Option<(Instant, Point2D<f32>)>>,
@@ -341,7 +341,7 @@ pub struct Document {
/// See also: https://github.com/servo/servo/issues/10110
dom_count: Cell<u32>,
/// Entry node for fullscreen.
- fullscreen_element: MutNullableJS<Element>,
+ fullscreen_element: MutNullableDom<Element>,
/// Map from ID to set of form control elements that have that ID as
/// their 'form' content attribute. Used to reset form controls
/// whenever any element with the same ID as the form attribute
@@ -1112,7 +1112,7 @@ impl Document {
pub fn handle_mouse_move_event(&self,
js_runtime: *mut JSRuntime,
client_point: Option<Point2D<f32>>,
- prev_mouse_over_target: &MutNullableJS<Element>) {
+ prev_mouse_over_target: &MutNullableDom<Element>) {
let client_point = match client_point {
None => {
// If there's no point, there's no target under the mouse
@@ -2264,7 +2264,7 @@ impl Document {
//StyleSharedRwLock::new()
},
stylesheets: DOMRefCell::new(StylesheetSet::new()),
- stylesheet_list: MutNullableJS::new(None),
+ stylesheet_list: MutNullableDom::new(None),
ready_state: Cell::new(ready_state),
domcontentloaded_dispatched: Cell::new(domcontentloaded_dispatched),
possibly_focused: Default::default(),
@@ -2299,12 +2299,12 @@ impl Document {
origin: origin,
referrer: referrer,
referrer_policy: Cell::new(referrer_policy),
- target_element: MutNullableJS::new(None),
+ target_element: MutNullableDom::new(None),
last_click_info: DOMRefCell::new(None),
ignore_destructive_writes_counter: Default::default(),
spurious_animation_frames: Cell::new(0),
dom_count: Cell::new(1),
- fullscreen_element: MutNullableJS::new(None),
+ fullscreen_element: MutNullableDom::new(None),
form_id_listener_map: Default::default(),
}
}
diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs
index 03c09c36df8..66c1ac9cbb1 100644
--- a/components/script/dom/element.rs
+++ b/components/script/dom/element.rs
@@ -24,7 +24,7 @@ use dom::bindings::error::{Error, ErrorResult, Fallible};
use dom::bindings::inheritance::{Castable, ElementTypeId, HTMLElementTypeId, NodeTypeId};
use dom::bindings::refcounted::{Trusted, TrustedPromise};
use dom::bindings::reflector::DomObject;
-use dom::bindings::root::{Dom, LayoutJS, MutNullableJS, Root, RootedReference};
+use dom::bindings::root::{Dom, LayoutJS, MutNullableDom, Root, RootedReference};
use dom::bindings::str::DOMString;
use dom::bindings::xmlname::{namespace_from_domstring, validate_and_extract, xml_name_type};
use dom::bindings::xmlname::XMLName::InvalidXMLName;
@@ -136,8 +136,8 @@ pub struct Element {
is: DOMRefCell<Option<LocalName>>,
#[ignore_heap_size_of = "Arc"]
style_attribute: DOMRefCell<Option<Arc<Locked<PropertyDeclarationBlock>>>>,
- attr_list: MutNullableJS<NamedNodeMap>,
- class_list: MutNullableJS<DOMTokenList>,
+ attr_list: MutNullableDom<NamedNodeMap>,
+ class_list: MutNullableDom<DOMTokenList>,
state: Cell<ElementState>,
/// These flags are set by the style system to indicate the that certain
/// operations may require restyling this element or its descendants. The
diff --git a/components/script/dom/event.rs b/components/script/dom/event.rs
index 58c4a503c8e..c00ed9a0011 100644
--- a/components/script/dom/event.rs
+++ b/components/script/dom/event.rs
@@ -11,7 +11,7 @@ use dom::bindings::error::Fallible;
use dom::bindings::inheritance::Castable;
use dom::bindings::refcounted::Trusted;
use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, MutNullableJS, Root, RootedReference};
+use dom::bindings::root::{Dom, MutNullableDom, Root, RootedReference};
use dom::bindings::str::DOMString;
use dom::document::Document;
use dom::eventtarget::{CompiledEventListener, EventTarget, ListenerPhase};
@@ -29,8 +29,8 @@ use time;
#[dom_struct]
pub struct Event {
reflector_: Reflector,
- current_target: MutNullableJS<EventTarget>,
- target: MutNullableJS<EventTarget>,
+ current_target: MutNullableDom<EventTarget>,
+ target: MutNullableDom<EventTarget>,
type_: DOMRefCell<Atom>,
phase: Cell<EventPhase>,
canceled: Cell<EventDefault>,
diff --git a/components/script/dom/filereader.rs b/components/script/dom/filereader.rs
index 6e72249748f..2e5721cc910 100644
--- a/components/script/dom/filereader.rs
+++ b/components/script/dom/filereader.rs
@@ -11,7 +11,7 @@ use dom::bindings::error::{Error, ErrorResult, Fallible};
use dom::bindings::inheritance::Castable;
use dom::bindings::refcounted::Trusted;
use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::{MutNullableJS, Root};
+use dom::bindings::root::{MutNullableDom, Root};
use dom::bindings::str::DOMString;
use dom::bindings::trace::RootedTraceableBox;
use dom::blob::Blob;
@@ -87,7 +87,7 @@ pub enum FileReaderResult {
pub struct FileReader {
eventtarget: EventTarget,
ready_state: Cell<FileReaderReadyState>,
- error: MutNullableJS<DOMException>,
+ error: MutNullableDom<DOMException>,
result: DOMRefCell<Option<FileReaderResult>>,
generation_id: Cell<GenerationId>,
}
@@ -97,7 +97,7 @@ impl FileReader {
FileReader {
eventtarget: EventTarget::new_inherited(),
ready_state: Cell::new(FileReaderReadyState::Empty),
- error: MutNullableJS::new(None),
+ error: MutNullableDom::new(None),
result: DOMRefCell::new(None),
generation_id: Cell::new(GenerationId(0)),
}
diff --git a/components/script/dom/focusevent.rs b/components/script/dom/focusevent.rs
index 0dbf3fc2f1e..10d78227aa2 100644
--- a/components/script/dom/focusevent.rs
+++ b/components/script/dom/focusevent.rs
@@ -8,7 +8,7 @@ use dom::bindings::codegen::Bindings::UIEventBinding::UIEventMethods;
use dom::bindings::error::Fallible;
use dom::bindings::inheritance::Castable;
use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::{MutNullableJS, Root, RootedReference};
+use dom::bindings::root::{MutNullableDom, Root, RootedReference};
use dom::bindings::str::DOMString;
use dom::event::{EventBubbles, EventCancelable};
use dom::eventtarget::EventTarget;
@@ -20,7 +20,7 @@ use std::default::Default;
#[dom_struct]
pub struct FocusEvent {
uievent: UIEvent,
- related_target: MutNullableJS<EventTarget>,
+ related_target: MutNullableDom<EventTarget>,
}
impl FocusEvent {
diff --git a/components/script/dom/globalscope.rs b/components/script/dom/globalscope.rs
index 16e47e0396f..e9854d4f991 100644
--- a/components/script/dom/globalscope.rs
+++ b/components/script/dom/globalscope.rs
@@ -10,7 +10,7 @@ use dom::bindings::conversions::root_from_object;
use dom::bindings::error::{ErrorInfo, report_pending_exception};
use dom::bindings::inheritance::Castable;
use dom::bindings::reflector::DomObject;
-use dom::bindings::root::{MutNullableJS, Root};
+use dom::bindings::root::{MutNullableDom, Root};
use dom::bindings::settings_stack::{AutoEntryScript, entry_global, incumbent_global};
use dom::bindings::str::DOMString;
use dom::crypto::Crypto;
@@ -58,7 +58,7 @@ use timers::{OneshotTimers, TimerCallback};
#[dom_struct]
pub struct GlobalScope {
eventtarget: EventTarget,
- crypto: MutNullableJS<Crypto>,
+ crypto: MutNullableDom<Crypto>,
next_worker_id: Cell<WorkerId>,
/// Pipeline id associated with this global.
diff --git a/components/script/dom/htmlanchorelement.rs b/components/script/dom/htmlanchorelement.rs
index 05065e07806..bd363e316c6 100644
--- a/components/script/dom/htmlanchorelement.rs
+++ b/components/script/dom/htmlanchorelement.rs
@@ -11,7 +11,7 @@ use dom::bindings::codegen::Bindings::HTMLAnchorElementBinding::HTMLAnchorElemen
use dom::bindings::codegen::Bindings::MouseEventBinding::MouseEventMethods;
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{MutNullableJS, Root};
+use dom::bindings::root::{MutNullableDom, Root};
use dom::bindings::str::{DOMString, USVString};
use dom::document::Document;
use dom::domtokenlist::DOMTokenList;
@@ -37,7 +37,7 @@ use style::attr::AttrValue;
#[dom_struct]
pub struct HTMLAnchorElement {
htmlelement: HTMLElement,
- rel_list: MutNullableJS<DOMTokenList>,
+ rel_list: MutNullableDom<DOMTokenList>,
url: DOMRefCell<Option<ServoUrl>>,
}
diff --git a/components/script/dom/htmlareaelement.rs b/components/script/dom/htmlareaelement.rs
index 531752ac8f9..2ea9dfa4006 100644
--- a/components/script/dom/htmlareaelement.rs
+++ b/components/script/dom/htmlareaelement.rs
@@ -7,7 +7,7 @@ use dom::bindings::codegen::Bindings::DOMTokenListBinding::DOMTokenListMethods;
use dom::bindings::codegen::Bindings::HTMLAreaElementBinding;
use dom::bindings::codegen::Bindings::HTMLAreaElementBinding::HTMLAreaElementMethods;
use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{MutNullableJS, Root};
+use dom::bindings::root::{MutNullableDom, Root};
use dom::bindings::str::DOMString;
use dom::document::Document;
use dom::domtokenlist::DOMTokenList;
@@ -217,7 +217,7 @@ impl Area {
#[dom_struct]
pub struct HTMLAreaElement {
htmlelement: HTMLElement,
- rel_list: MutNullableJS<DOMTokenList>,
+ rel_list: MutNullableDom<DOMTokenList>,
}
impl HTMLAreaElement {
diff --git a/components/script/dom/htmlbuttonelement.rs b/components/script/dom/htmlbuttonelement.rs
index 00aec8d5f2d..37997c93702 100755
--- a/components/script/dom/htmlbuttonelement.rs
+++ b/components/script/dom/htmlbuttonelement.rs
@@ -7,7 +7,7 @@ use dom::attr::Attr;
use dom::bindings::codegen::Bindings::HTMLButtonElementBinding;
use dom::bindings::codegen::Bindings::HTMLButtonElementBinding::HTMLButtonElementMethods;
use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{MutNullableJS, Root};
+use dom::bindings::root::{MutNullableDom, Root};
use dom::bindings::str::DOMString;
use dom::document::Document;
use dom::element::{AttributeMutation, Element};
@@ -42,7 +42,7 @@ enum ButtonType {
pub struct HTMLButtonElement {
htmlelement: HTMLElement,
button_type: Cell<ButtonType>,
- form_owner: MutNullableJS<HTMLFormElement>,
+ form_owner: MutNullableDom<HTMLFormElement>,
}
impl HTMLButtonElement {
diff --git a/components/script/dom/htmlcollection.rs b/components/script/dom/htmlcollection.rs
index c99e794a0e5..dd8a62617db 100644
--- a/components/script/dom/htmlcollection.rs
+++ b/components/script/dom/htmlcollection.rs
@@ -6,7 +6,7 @@ use dom::bindings::codegen::Bindings::HTMLCollectionBinding;
use dom::bindings::codegen::Bindings::HTMLCollectionBinding::HTMLCollectionMethods;
use dom::bindings::inheritance::Castable;
use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, Root, MutNullableJS};
+use dom::bindings::root::{Dom, Root, MutNullableDom};
use dom::bindings::str::DOMString;
use dom::bindings::trace::JSTraceable;
use dom::bindings::xmlname::namespace_from_domstring;
@@ -60,7 +60,7 @@ pub struct HTMLCollection {
// the length of the collection, and a cursor into the collection.
// FIXME: make the cached cursor element a weak pointer
cached_version: Cell<u64>,
- cached_cursor_element: MutNullableJS<Element>,
+ cached_cursor_element: MutNullableDom<Element>,
cached_cursor_index: Cell<OptionU32>,
cached_length: Cell<OptionU32>,
}
@@ -74,7 +74,7 @@ impl HTMLCollection {
filter: filter,
// Default values for the cache
cached_version: Cell::new(root.inclusive_descendants_version()),
- cached_cursor_element: MutNullableJS::new(None),
+ cached_cursor_element: MutNullableDom::new(None),
cached_cursor_index: Cell::new(OptionU32::none()),
cached_length: Cell::new(OptionU32::none()),
}
diff --git a/components/script/dom/htmlelement.rs b/components/script/dom/htmlelement.rs
index 946696863dc..7890cc5fa89 100644
--- a/components/script/dom/htmlelement.rs
+++ b/components/script/dom/htmlelement.rs
@@ -12,7 +12,7 @@ use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
use dom::bindings::error::{Error, ErrorResult};
use dom::bindings::inheritance::{ElementTypeId, HTMLElementTypeId, NodeTypeId};
use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{Dom, MutNullableJS, Root, RootedReference};
+use dom::bindings::root::{Dom, MutNullableDom, Root, RootedReference};
use dom::bindings::str::DOMString;
use dom::cssstyledeclaration::{CSSModificationAccess, CSSStyleDeclaration, CSSStyleOwner};
use dom::document::{Document, FocusType};
@@ -39,8 +39,8 @@ use style::element_state::*;
#[dom_struct]
pub struct HTMLElement {
element: Element,
- style_decl: MutNullableJS<CSSStyleDeclaration>,
- dataset: MutNullableJS<DOMStringMap>,
+ style_decl: MutNullableDom<CSSStyleDeclaration>,
+ dataset: MutNullableDom<DOMStringMap>,
}
impl HTMLElement {
diff --git a/components/script/dom/htmlfieldsetelement.rs b/components/script/dom/htmlfieldsetelement.rs
index 37187c6def5..e935169c244 100644
--- a/components/script/dom/htmlfieldsetelement.rs
+++ b/components/script/dom/htmlfieldsetelement.rs
@@ -6,7 +6,7 @@ use dom::attr::Attr;
use dom::bindings::codegen::Bindings::HTMLFieldSetElementBinding;
use dom::bindings::codegen::Bindings::HTMLFieldSetElementBinding::HTMLFieldSetElementMethods;
use dom::bindings::inheritance::{Castable, ElementTypeId, HTMLElementTypeId, NodeTypeId};
-use dom::bindings::root::{MutNullableJS, Root};
+use dom::bindings::root::{MutNullableDom, Root};
use dom::document::Document;
use dom::element::{AttributeMutation, Element};
use dom::htmlcollection::{CollectionFilter, HTMLCollection};
@@ -24,7 +24,7 @@ use style::element_state::*;
#[dom_struct]
pub struct HTMLFieldSetElement {
htmlelement: HTMLElement,
- form_owner: MutNullableJS<HTMLFormElement>,
+ form_owner: MutNullableDom<HTMLFormElement>,
}
impl HTMLFieldSetElement {
diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs
index cbff0beacc4..8e71609a451 100644
--- a/components/script/dom/htmliframeelement.rs
+++ b/components/script/dom/htmliframeelement.rs
@@ -21,7 +21,7 @@ use dom::bindings::error::{Error, ErrorResult, Fallible};
use dom::bindings::inheritance::Castable;
use dom::bindings::refcounted::Trusted;
use dom::bindings::reflector::DomObject;
-use dom::bindings::root::{LayoutJS, MutNullableJS, Root};
+use dom::bindings::root::{LayoutJS, MutNullableDom, Root};
use dom::bindings::str::DOMString;
use dom::customevent::CustomEvent;
use dom::document::Document;
@@ -88,7 +88,7 @@ pub struct HTMLIFrameElement {
browsing_context_id: Cell<Option<BrowsingContextId>>,
pipeline_id: Cell<Option<PipelineId>>,
pending_pipeline_id: Cell<Option<PipelineId>>,
- sandbox: MutNullableJS<DOMTokenList>,
+ sandbox: MutNullableDom<DOMTokenList>,
sandbox_allowance: Cell<Option<SandboxAllowance>>,
load_blocker: DOMRefCell<Option<LoadBlocker>>,
visibility: Cell<bool>,
diff --git a/components/script/dom/htmlimageelement.rs b/components/script/dom/htmlimageelement.rs
index 48cb34d1a98..89873ffc4d8 100644
--- a/components/script/dom/htmlimageelement.rs
+++ b/components/script/dom/htmlimageelement.rs
@@ -17,7 +17,7 @@ use dom::bindings::error::Fallible;
use dom::bindings::inheritance::Castable;
use dom::bindings::refcounted::Trusted;
use dom::bindings::reflector::DomObject;
-use dom::bindings::root::{LayoutJS, MutNullableJS, Root};
+use dom::bindings::root::{LayoutJS, MutNullableDom, Root};
use dom::bindings::str::DOMString;
use dom::document::Document;
use dom::element::{AttributeMutation, Element, RawLayoutElementHelpers};
@@ -89,7 +89,7 @@ pub struct HTMLImageElement {
image_request: Cell<ImageRequestPhase>,
current_request: DOMRefCell<ImageRequest>,
pending_request: DOMRefCell<ImageRequest>,
- form_owner: MutNullableJS<HTMLFormElement>,
+ form_owner: MutNullableDom<HTMLFormElement>,
generation: Cell<u32>,
}
diff --git a/components/script/dom/htmlinputelement.rs b/components/script/dom/htmlinputelement.rs
index 2cb872e4908..bd714509dda 100755
--- a/components/script/dom/htmlinputelement.rs
+++ b/components/script/dom/htmlinputelement.rs
@@ -15,7 +15,7 @@ use dom::bindings::codegen::Bindings::MouseEventBinding::MouseEventMethods;
use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
use dom::bindings::error::{Error, ErrorResult};
use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{Dom, LayoutJS, MutNullableJS, Root, RootedReference};
+use dom::bindings::root::{Dom, LayoutJS, MutNullableDom, Root, RootedReference};
use dom::bindings::str::DOMString;
use dom::document::Document;
use dom::element::{AttributeMutation, Element, LayoutElementHelpers, RawLayoutElementHelpers};
@@ -99,8 +99,8 @@ pub struct HTMLInputElement {
// https://html.spec.whatwg.org/multipage/#concept-input-value-dirty-flag
value_dirty: Cell<bool>,
- filelist: MutNullableJS<FileList>,
- form_owner: MutNullableJS<HTMLFormElement>,
+ filelist: MutNullableDom<FileList>,
+ form_owner: MutNullableDom<HTMLFormElement>,
}
#[derive(JSTraceable)]
@@ -156,7 +156,7 @@ impl HTMLInputElement {
SelectionDirection::None)),
activation_state: DOMRefCell::new(InputActivationState::new()),
value_dirty: Cell::new(false),
- filelist: MutNullableJS::new(None),
+ filelist: MutNullableDom::new(None),
form_owner: Default::default(),
}
}
diff --git a/components/script/dom/htmllegendelement.rs b/components/script/dom/htmllegendelement.rs
index ad51e0cb652..010e80c22ee 100644
--- a/components/script/dom/htmllegendelement.rs
+++ b/components/script/dom/htmllegendelement.rs
@@ -6,7 +6,7 @@ use dom::bindings::codegen::Bindings::HTMLLegendElementBinding;
use dom::bindings::codegen::Bindings::HTMLLegendElementBinding::HTMLLegendElementMethods;
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{MutNullableJS, Root};
+use dom::bindings::root::{MutNullableDom, Root};
use dom::document::Document;
use dom::element::Element;
use dom::htmlelement::HTMLElement;
@@ -20,7 +20,7 @@ use html5ever::{LocalName, Prefix};
#[dom_struct]
pub struct HTMLLegendElement {
htmlelement: HTMLElement,
- form_owner: MutNullableJS<HTMLFormElement>,
+ form_owner: MutNullableDom<HTMLFormElement>,
}
impl HTMLLegendElement {
diff --git a/components/script/dom/htmllinkelement.rs b/components/script/dom/htmllinkelement.rs
index 814c6b94bd4..b229e331ed6 100644
--- a/components/script/dom/htmllinkelement.rs
+++ b/components/script/dom/htmllinkelement.rs
@@ -9,7 +9,7 @@ use dom::bindings::codegen::Bindings::DOMTokenListBinding::DOMTokenListBinding::
use dom::bindings::codegen::Bindings::HTMLLinkElementBinding;
use dom::bindings::codegen::Bindings::HTMLLinkElementBinding::HTMLLinkElementMethods;
use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{MutNullableJS, Root, RootedReference};
+use dom::bindings::root::{MutNullableDom, Root, RootedReference};
use dom::bindings::str::DOMString;
use dom::cssstylesheet::CSSStyleSheet;
use dom::document::Document;
@@ -50,10 +50,10 @@ impl RequestGenerationId {
#[dom_struct]
pub struct HTMLLinkElement {
htmlelement: HTMLElement,
- rel_list: MutNullableJS<DOMTokenList>,
+ rel_list: MutNullableDom<DOMTokenList>,
#[ignore_heap_size_of = "Arc"]
stylesheet: DOMRefCell<Option<Arc<Stylesheet>>>,
- cssom_stylesheet: MutNullableJS<CSSStyleSheet>,
+ cssom_stylesheet: MutNullableDom<CSSStyleSheet>,
/// https://html.spec.whatwg.org/multipage/#a-style-sheet-that-is-blocking-scripts
parser_inserted: Cell<bool>,
@@ -74,7 +74,7 @@ impl HTMLLinkElement {
rel_list: Default::default(),
parser_inserted: Cell::new(creator.is_parser_created()),
stylesheet: DOMRefCell::new(None),
- cssom_stylesheet: MutNullableJS::new(None),
+ cssom_stylesheet: MutNullableDom::new(None),
pending_loads: Cell::new(0),
any_failed_load: Cell::new(false),
request_generation_id: Cell::new(RequestGenerationId(0)),
diff --git a/components/script/dom/htmlmediaelement.rs b/components/script/dom/htmlmediaelement.rs
index cadde0b2073..81708864742 100644
--- a/components/script/dom/htmlmediaelement.rs
+++ b/components/script/dom/htmlmediaelement.rs
@@ -18,7 +18,7 @@ use dom::bindings::error::{Error, ErrorResult};
use dom::bindings::inheritance::Castable;
use dom::bindings::refcounted::Trusted;
use dom::bindings::reflector::DomObject;
-use dom::bindings::root::{MutNullableJS, Root};
+use dom::bindings::root::{MutNullableDom, Root};
use dom::bindings::str::DOMString;
use dom::document::Document;
use dom::element::{Element, AttributeMutation};
@@ -66,7 +66,7 @@ pub struct HTMLMediaElement {
/// Reset to false every time the load algorithm is invoked.
fired_loadeddata_event: Cell<bool>,
/// https://html.spec.whatwg.org/multipage/#dom-media-error
- error: MutNullableJS<MediaError>,
+ error: MutNullableDom<MediaError>,
/// https://html.spec.whatwg.org/multipage/#dom-media-paused
paused: Cell<bool>,
/// https://html.spec.whatwg.org/multipage/#attr-media-autoplay
diff --git a/components/script/dom/htmlmetaelement.rs b/components/script/dom/htmlmetaelement.rs
index 09443824b70..41ae52a1b4c 100644
--- a/components/script/dom/htmlmetaelement.rs
+++ b/components/script/dom/htmlmetaelement.rs
@@ -8,7 +8,7 @@ use dom::bindings::codegen::Bindings::HTMLMetaElementBinding;
use dom::bindings::codegen::Bindings::HTMLMetaElementBinding::HTMLMetaElementMethods;
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{MutNullableJS, Root, RootedReference};
+use dom::bindings::root::{MutNullableDom, Root, RootedReference};
use dom::bindings::str::DOMString;
use dom::cssstylesheet::CSSStyleSheet;
use dom::document::Document;
@@ -34,7 +34,7 @@ pub struct HTMLMetaElement {
htmlelement: HTMLElement,
#[ignore_heap_size_of = "Arc"]
stylesheet: DOMRefCell<Option<Arc<Stylesheet>>>,
- cssom_stylesheet: MutNullableJS<CSSStyleSheet>,
+ cssom_stylesheet: MutNullableDom<CSSStyleSheet>,
}
impl HTMLMetaElement {
@@ -44,7 +44,7 @@ impl HTMLMetaElement {
HTMLMetaElement {
htmlelement: HTMLElement::new_inherited(local_name, prefix, document),
stylesheet: DOMRefCell::new(None),
- cssom_stylesheet: MutNullableJS::new(None),
+ cssom_stylesheet: MutNullableDom::new(None),
}
}
diff --git a/components/script/dom/htmlobjectelement.rs b/components/script/dom/htmlobjectelement.rs
index bfab288a9cf..121dde5d2ae 100755
--- a/components/script/dom/htmlobjectelement.rs
+++ b/components/script/dom/htmlobjectelement.rs
@@ -7,7 +7,7 @@ use dom::bindings::cell::DOMRefCell;
use dom::bindings::codegen::Bindings::HTMLObjectElementBinding;
use dom::bindings::codegen::Bindings::HTMLObjectElementBinding::HTMLObjectElementMethods;
use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{MutNullableJS, Root};
+use dom::bindings::root::{MutNullableDom, Root};
use dom::bindings::str::DOMString;
use dom::document::Document;
use dom::element::{AttributeMutation, Element};
@@ -28,7 +28,7 @@ pub struct HTMLObjectElement {
htmlelement: HTMLElement,
#[ignore_heap_size_of = "Arc"]
image: DOMRefCell<Option<Arc<Image>>>,
- form_owner: MutNullableJS<HTMLFormElement>,
+ form_owner: MutNullableDom<HTMLFormElement>,
}
impl HTMLObjectElement {
diff --git a/components/script/dom/htmloutputelement.rs b/components/script/dom/htmloutputelement.rs
index 510235e617a..2a52cfabcaa 100644
--- a/components/script/dom/htmloutputelement.rs
+++ b/components/script/dom/htmloutputelement.rs
@@ -6,7 +6,7 @@ use dom::attr::Attr;
use dom::bindings::codegen::Bindings::HTMLOutputElementBinding;
use dom::bindings::codegen::Bindings::HTMLOutputElementBinding::HTMLOutputElementMethods;
use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{MutNullableJS, Root};
+use dom::bindings::root::{MutNullableDom, Root};
use dom::document::Document;
use dom::element::{AttributeMutation, Element};
use dom::htmlelement::HTMLElement;
@@ -21,7 +21,7 @@ use html5ever::{LocalName, Prefix};
#[dom_struct]
pub struct HTMLOutputElement {
htmlelement: HTMLElement,
- form_owner: MutNullableJS<HTMLFormElement>,
+ form_owner: MutNullableDom<HTMLFormElement>,
}
impl HTMLOutputElement {
diff --git a/components/script/dom/htmlselectelement.rs b/components/script/dom/htmlselectelement.rs
index 641a8817814..73238870e48 100755
--- a/components/script/dom/htmlselectelement.rs
+++ b/components/script/dom/htmlselectelement.rs
@@ -14,7 +14,7 @@ use dom::bindings::codegen::UnionTypes::HTMLElementOrLong;
use dom::bindings::codegen::UnionTypes::HTMLOptionElementOrHTMLOptGroupElement;
//use dom::bindings::error::ErrorResult;
use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{MutNullableJS, Root};
+use dom::bindings::root::{MutNullableDom, Root};
use dom::bindings::str::DOMString;
use dom::document::Document;
use dom::element::{AttributeMutation, Element};
@@ -61,8 +61,8 @@ impl CollectionFilter for OptionsFilter {
#[dom_struct]
pub struct HTMLSelectElement {
htmlelement: HTMLElement,
- options: MutNullableJS<HTMLOptionsCollection>,
- form_owner: MutNullableJS<HTMLFormElement>,
+ options: MutNullableDom<HTMLOptionsCollection>,
+ form_owner: MutNullableDom<HTMLFormElement>,
}
static DEFAULT_SELECT_SIZE: u32 = 0;
diff --git a/components/script/dom/htmlstyleelement.rs b/components/script/dom/htmlstyleelement.rs
index cfe0651df28..a66ede9c930 100644
--- a/components/script/dom/htmlstyleelement.rs
+++ b/components/script/dom/htmlstyleelement.rs
@@ -8,7 +8,7 @@ use dom::bindings::codegen::Bindings::HTMLStyleElementBinding;
use dom::bindings::codegen::Bindings::HTMLStyleElementBinding::HTMLStyleElementMethods;
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{MutNullableJS, Root};
+use dom::bindings::root::{MutNullableDom, Root};
use dom::cssstylesheet::CSSStyleSheet;
use dom::document::Document;
use dom::element::{Element, ElementCreator};
@@ -33,7 +33,7 @@ pub struct HTMLStyleElement {
htmlelement: HTMLElement,
#[ignore_heap_size_of = "Arc"]
stylesheet: DOMRefCell<Option<Arc<Stylesheet>>>,
- cssom_stylesheet: MutNullableJS<CSSStyleSheet>,
+ cssom_stylesheet: MutNullableDom<CSSStyleSheet>,
/// https://html.spec.whatwg.org/multipage/#a-style-sheet-that-is-blocking-scripts
parser_inserted: Cell<bool>,
in_stack_of_open_elements: Cell<bool>,
@@ -50,7 +50,7 @@ impl HTMLStyleElement {
HTMLStyleElement {
htmlelement: HTMLElement::new_inherited(local_name, prefix, document),
stylesheet: DOMRefCell::new(None),
- cssom_stylesheet: MutNullableJS::new(None),
+ cssom_stylesheet: MutNullableDom::new(None),
parser_inserted: Cell::new(creator.is_parser_created()),
in_stack_of_open_elements: Cell::new(creator.is_parser_created()),
pending_loads: Cell::new(0),
diff --git a/components/script/dom/htmltableelement.rs b/components/script/dom/htmltableelement.rs
index 5e9a80f0790..25069647f6c 100644
--- a/components/script/dom/htmltableelement.rs
+++ b/components/script/dom/htmltableelement.rs
@@ -10,7 +10,7 @@ use dom::bindings::codegen::Bindings::HTMLTableElementBinding::HTMLTableElementM
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
use dom::bindings::error::{Error, ErrorResult, Fallible};
use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{Dom, LayoutJS, MutNullableJS, Root, RootedReference};
+use dom::bindings::root::{Dom, LayoutJS, MutNullableDom, Root, RootedReference};
use dom::bindings::str::DOMString;
use dom::document::Document;
use dom::element::{AttributeMutation, Element, RawLayoutElementHelpers};
@@ -32,7 +32,7 @@ pub struct HTMLTableElement {
htmlelement: HTMLElement,
border: Cell<Option<u32>>,
cellspacing: Cell<Option<u32>>,
- tbodies: MutNullableJS<HTMLCollection>,
+ tbodies: MutNullableDom<HTMLCollection>,
}
#[allow(unrooted_must_root)]
diff --git a/components/script/dom/htmltablerowelement.rs b/components/script/dom/htmltablerowelement.rs
index c56c7ae7add..78246d4444c 100644
--- a/components/script/dom/htmltablerowelement.rs
+++ b/components/script/dom/htmltablerowelement.rs
@@ -9,7 +9,7 @@ use dom::bindings::codegen::Bindings::HTMLTableSectionElementBinding::HTMLTableS
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
use dom::bindings::error::{ErrorResult, Fallible};
use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{LayoutJS, MutNullableJS, Root, RootedReference};
+use dom::bindings::root::{LayoutJS, MutNullableDom, Root, RootedReference};
use dom::bindings::str::DOMString;
use dom::document::Document;
use dom::element::{Element, RawLayoutElementHelpers};
@@ -37,7 +37,7 @@ impl CollectionFilter for CellsFilter {
#[dom_struct]
pub struct HTMLTableRowElement {
htmlelement: HTMLElement,
- cells: MutNullableJS<HTMLCollection>,
+ cells: MutNullableDom<HTMLCollection>,
}
impl HTMLTableRowElement {
diff --git a/components/script/dom/htmltemplateelement.rs b/components/script/dom/htmltemplateelement.rs
index ec46955db7e..5f345206a94 100644
--- a/components/script/dom/htmltemplateelement.rs
+++ b/components/script/dom/htmltemplateelement.rs
@@ -7,7 +7,7 @@ use dom::bindings::codegen::Bindings::HTMLTemplateElementBinding;
use dom::bindings::codegen::Bindings::HTMLTemplateElementBinding::HTMLTemplateElementMethods;
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{MutNullableJS, Root};
+use dom::bindings::root::{MutNullableDom, Root};
use dom::document::Document;
use dom::documentfragment::DocumentFragment;
use dom::htmlelement::HTMLElement;
@@ -21,7 +21,7 @@ pub struct HTMLTemplateElement {
htmlelement: HTMLElement,
/// https://html.spec.whatwg.org/multipage/#template-contents
- contents: MutNullableJS<DocumentFragment>,
+ contents: MutNullableDom<DocumentFragment>,
}
impl HTMLTemplateElement {
@@ -31,7 +31,7 @@ impl HTMLTemplateElement {
HTMLTemplateElement {
htmlelement:
HTMLElement::new_inherited(local_name, prefix, document),
- contents: MutNullableJS::new(None),
+ contents: MutNullableDom::new(None),
}
}
diff --git a/components/script/dom/htmltextareaelement.rs b/components/script/dom/htmltextareaelement.rs
index 9c050f0790f..4958d2d3ca9 100755
--- a/components/script/dom/htmltextareaelement.rs
+++ b/components/script/dom/htmltextareaelement.rs
@@ -9,7 +9,7 @@ use dom::bindings::codegen::Bindings::HTMLTextAreaElementBinding;
use dom::bindings::codegen::Bindings::HTMLTextAreaElementBinding::HTMLTextAreaElementMethods;
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{LayoutJS, MutNullableJS, Root};
+use dom::bindings::root::{LayoutJS, MutNullableDom, Root};
use dom::bindings::str::DOMString;
use dom::document::Document;
use dom::element::{AttributeMutation, Element};
@@ -43,7 +43,7 @@ pub struct HTMLTextAreaElement {
placeholder: DOMRefCell<DOMString>,
// https://html.spec.whatwg.org/multipage/#concept-textarea-dirty
value_changed: Cell<bool>,
- form_owner: MutNullableJS<HTMLFormElement>,
+ form_owner: MutNullableDom<HTMLFormElement>,
}
pub trait LayoutHTMLTextAreaElementHelpers {
diff --git a/components/script/dom/mod.rs b/components/script/dom/mod.rs
index 7c683edf9eb..b14cca5f820 100644
--- a/components/script/dom/mod.rs
+++ b/components/script/dom/mod.rs
@@ -32,7 +32,7 @@
//! * rooting pointers on the stack:
//! the [`Root`](bindings/root/struct.Root.html) smart pointer;
//! * tracing pointers in member fields: the [`Dom`](bindings/root/struct.Dom.html),
-//! [`MutNullableJS`](bindings/root/struct.MutNullableJS.html) and
+//! [`MutNullableDom`](bindings/root/struct.MutNullableDom.html) and
//! [`MutDom`](bindings/root/struct.MutDom.html) smart pointers and
//! [the tracing implementation](bindings/trace/index.html);
//! * rooting pointers from across thread boundaries or in channels: the
diff --git a/components/script/dom/mouseevent.rs b/components/script/dom/mouseevent.rs
index 049a92c8308..e3f4cdab91d 100644
--- a/components/script/dom/mouseevent.rs
+++ b/components/script/dom/mouseevent.rs
@@ -8,7 +8,7 @@ use dom::bindings::codegen::Bindings::UIEventBinding::UIEventMethods;
use dom::bindings::error::Fallible;
use dom::bindings::inheritance::Castable;
use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::{MutNullableJS, Root, RootedReference};
+use dom::bindings::root::{MutNullableDom, Root, RootedReference};
use dom::bindings::str::DOMString;
use dom::event::{Event, EventBubbles, EventCancelable};
use dom::eventtarget::EventTarget;
@@ -31,7 +31,7 @@ pub struct MouseEvent {
alt_key: Cell<bool>,
meta_key: Cell<bool>,
button: Cell<i16>,
- related_target: MutNullableJS<EventTarget>,
+ related_target: MutNullableDom<EventTarget>,
}
impl MouseEvent {
diff --git a/components/script/dom/mutationrecord.rs b/components/script/dom/mutationrecord.rs
index a5d21663b99..bbb42dd1f28 100644
--- a/components/script/dom/mutationrecord.rs
+++ b/components/script/dom/mutationrecord.rs
@@ -5,7 +5,7 @@
use dom::bindings::codegen::Bindings::MutationRecordBinding::MutationRecordBinding;
use dom::bindings::codegen::Bindings::MutationRecordBinding::MutationRecordBinding::MutationRecordMethods;
use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, MutNullableJS, Root};
+use dom::bindings::root::{Dom, MutNullableDom, Root};
use dom::bindings::str::DOMString;
use dom::node::{Node, window_from_node};
use dom::nodelist::NodeList;
@@ -20,8 +20,8 @@ pub struct MutationRecord {
attribute_name: Option<DOMString>,
attribute_namespace: Option<DOMString>,
old_value: Option<DOMString>,
- added_nodes: MutNullableJS<NodeList>,
- removed_nodes: MutNullableJS<NodeList>,
+ added_nodes: MutNullableDom<NodeList>,
+ removed_nodes: MutNullableDom<NodeList>,
next_sibling: Option<Dom<Node>>,
prev_sibling: Option<Dom<Node>>,
}
@@ -77,8 +77,8 @@ impl MutationRecord {
attribute_name: attribute_name,
attribute_namespace: attribute_namespace,
old_value: old_value,
- added_nodes: MutNullableJS::new(added_nodes),
- removed_nodes: MutNullableJS::new(removed_nodes),
+ added_nodes: MutNullableDom::new(added_nodes),
+ removed_nodes: MutNullableDom::new(removed_nodes),
next_sibling: next_sibling.map(Dom::from_ref),
prev_sibling: prev_sibling.map(Dom::from_ref),
}
diff --git a/components/script/dom/navigator.rs b/components/script/dom/navigator.rs
index dddac1bb561..c24b4972e37 100644
--- a/components/script/dom/navigator.rs
+++ b/components/script/dom/navigator.rs
@@ -6,7 +6,7 @@ use dom::bindings::codegen::Bindings::NavigatorBinding;
use dom::bindings::codegen::Bindings::NavigatorBinding::NavigatorMethods;
use dom::bindings::codegen::Bindings::VRBinding::VRBinding::VRMethods;
use dom::bindings::reflector::{Reflector, DomObject, reflect_dom_object};
-use dom::bindings::root::{MutNullableJS, Root};
+use dom::bindings::root::{MutNullableDom, Root};
use dom::bindings::str::DOMString;
use dom::bluetooth::Bluetooth;
use dom::gamepadlist::GamepadList;
@@ -24,13 +24,13 @@ use std::rc::Rc;
#[dom_struct]
pub struct Navigator {
reflector_: Reflector,
- bluetooth: MutNullableJS<Bluetooth>,
- plugins: MutNullableJS<PluginArray>,
- mime_types: MutNullableJS<MimeTypeArray>,
- service_worker: MutNullableJS<ServiceWorkerContainer>,
- vr: MutNullableJS<VR>,
- gamepads: MutNullableJS<GamepadList>,
- permissions: MutNullableJS<Permissions>,
+ bluetooth: MutNullableDom<Bluetooth>,
+ plugins: MutNullableDom<PluginArray>,
+ mime_types: MutNullableDom<MimeTypeArray>,
+ service_worker: MutNullableDom<ServiceWorkerContainer>,
+ vr: MutNullableDom<VR>,
+ gamepads: MutNullableDom<GamepadList>,
+ permissions: MutNullableDom<Permissions>,
}
impl Navigator {
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs
index f3cf9728b72..2ce11daeb0f 100644
--- a/components/script/dom/node.rs
+++ b/components/script/dom/node.rs
@@ -23,7 +23,7 @@ use dom::bindings::inheritance::{Castable, CharacterDataTypeId, ElementTypeId};
use dom::bindings::inheritance::{EventTargetTypeId, HTMLElementTypeId, NodeTypeId};
use dom::bindings::inheritance::{SVGElementTypeId, SVGGraphicsElementTypeId};
use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::{Dom, LayoutJS, MutNullableJS, Root, RootedReference};
+use dom::bindings::root::{Dom, LayoutJS, MutNullableDom, Root, RootedReference};
use dom::bindings::str::{DOMString, USVString};
use dom::bindings::xmlname::namespace_from_domstring;
use dom::characterdata::{CharacterData, LayoutCharacterDataHelpers};
@@ -98,25 +98,25 @@ pub struct Node {
eventtarget: EventTarget,
/// The parent of this node.
- parent_node: MutNullableJS<Node>,
+ parent_node: MutNullableDom<Node>,
/// The first child of this node.
- first_child: MutNullableJS<Node>,
+ first_child: MutNullableDom<Node>,
/// The last child of this node.
- last_child: MutNullableJS<Node>,
+ last_child: MutNullableDom<Node>,
/// The next sibling of this node.
- next_sibling: MutNullableJS<Node>,
+ next_sibling: MutNullableDom<Node>,
/// The previous sibling of this node.
- prev_sibling: MutNullableJS<Node>,
+ prev_sibling: MutNullableDom<Node>,
/// The document that this node belongs to.
- owner_doc: MutNullableJS<Document>,
+ owner_doc: MutNullableDom<Document>,
/// The live list of children return by .childNodes.
- child_list: MutNullableJS<NodeList>,
+ child_list: MutNullableDom<NodeList>,
/// The live count of children of this node.
children_count: Cell<u32>,
@@ -1407,7 +1407,7 @@ impl Node {
last_child: Default::default(),
next_sibling: Default::default(),
prev_sibling: Default::default(),
- owner_doc: MutNullableJS::new(doc),
+ owner_doc: MutNullableDom::new(doc),
child_list: Default::default(),
children_count: Cell::new(0u32),
flags: Cell::new(flags),
diff --git a/components/script/dom/nodelist.rs b/components/script/dom/nodelist.rs
index 14d1e533ef5..191cc1f30cd 100644
--- a/components/script/dom/nodelist.rs
+++ b/components/script/dom/nodelist.rs
@@ -6,7 +6,7 @@ use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
use dom::bindings::codegen::Bindings::NodeListBinding;
use dom::bindings::codegen::Bindings::NodeListBinding::NodeListMethods;
use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, MutNullableJS, Root, RootedReference};
+use dom::bindings::root::{Dom, MutNullableDom, Root, RootedReference};
use dom::node::{ChildrenMutation, Node};
use dom::window::Window;
use dom_struct::dom_struct;
@@ -114,7 +114,7 @@ impl NodeList {
pub struct ChildrenList {
node: Dom<Node>,
#[ignore_heap_size_of = "Defined in rust-mozjs"]
- last_visited: MutNullableJS<Node>,
+ last_visited: MutNullableDom<Node>,
last_index: Cell<u32>,
}
@@ -123,7 +123,7 @@ impl ChildrenList {
let last_visited = node.GetFirstChild();
ChildrenList {
node: Dom::from_ref(node),
- last_visited: MutNullableJS::new(last_visited.r()),
+ last_visited: MutNullableDom::new(last_visited.r()),
last_index: Cell::new(0u32),
}
}
diff --git a/components/script/dom/request.rs b/components/script/dom/request.rs
index 1225369cea5..1d9d20629d0 100644
--- a/components/script/dom/request.rs
+++ b/components/script/dom/request.rs
@@ -18,7 +18,7 @@ use dom::bindings::codegen::Bindings::RequestBinding::RequestRedirect;
use dom::bindings::codegen::Bindings::RequestBinding::RequestType;
use dom::bindings::error::{Error, Fallible};
use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::{MutNullableJS, Root};
+use dom::bindings::root::{MutNullableDom, Root};
use dom::bindings::str::{ByteString, DOMString, USVString};
use dom::bindings::trace::RootedTraceableBox;
use dom::globalscope::GlobalScope;
@@ -46,7 +46,7 @@ pub struct Request {
reflector_: Reflector,
request: DOMRefCell<NetTraitsRequest>,
body_used: Cell<bool>,
- headers: MutNullableJS<Headers>,
+ headers: MutNullableDom<Headers>,
mime_type: DOMRefCell<Vec<u8>>,
#[ignore_heap_size_of = "Rc"]
body_promise: DOMRefCell<Option<(Rc<Promise>, BodyType)>>,
diff --git a/components/script/dom/response.rs b/components/script/dom/response.rs
index 5d254b34525..55c942e88fc 100644
--- a/components/script/dom/response.rs
+++ b/components/script/dom/response.rs
@@ -11,7 +11,7 @@ use dom::bindings::codegen::Bindings::ResponseBinding::{ResponseMethods, Respons
use dom::bindings::codegen::Bindings::XMLHttpRequestBinding::BodyInit;
use dom::bindings::error::{Error, Fallible};
use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::{MutNullableJS, Root};
+use dom::bindings::root::{MutNullableDom, Root};
use dom::bindings::str::{ByteString, USVString};
use dom::globalscope::GlobalScope;
use dom::headers::{Headers, Guard};
@@ -33,7 +33,7 @@ use url::Position;
#[dom_struct]
pub struct Response {
reflector_: Reflector,
- headers_reflector: MutNullableJS<Headers>,
+ headers_reflector: MutNullableDom<Headers>,
mime_type: DOMRefCell<Vec<u8>>,
body_used: Cell<bool>,
/// `None` can be considered a StatusCode of `0`.
diff --git a/components/script/dom/serviceworkercontainer.rs b/components/script/dom/serviceworkercontainer.rs
index a322f618fa8..e4cb7c3a255 100644
--- a/components/script/dom/serviceworkercontainer.rs
+++ b/components/script/dom/serviceworkercontainer.rs
@@ -6,7 +6,7 @@ use dom::bindings::codegen::Bindings::ServiceWorkerContainerBinding::{ServiceWor
use dom::bindings::codegen::Bindings::ServiceWorkerContainerBinding::RegistrationOptions;
use dom::bindings::error::Error;
use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::{Dom, MutNullableJS, Root};
+use dom::bindings::root::{Dom, MutNullableDom, Root};
use dom::bindings::str::USVString;
use dom::client::Client;
use dom::eventtarget::EventTarget;
@@ -23,7 +23,7 @@ use std::rc::Rc;
#[dom_struct]
pub struct ServiceWorkerContainer {
eventtarget: EventTarget,
- controller: MutNullableJS<ServiceWorker>,
+ controller: MutNullableDom<ServiceWorker>,
client: Dom<Client>
}
diff --git a/components/script/dom/servoparser/mod.rs b/components/script/dom/servoparser/mod.rs
index 92d3b8a894e..0da5d9391d7 100644
--- a/components/script/dom/servoparser/mod.rs
+++ b/components/script/dom/servoparser/mod.rs
@@ -12,7 +12,7 @@ use dom::bindings::codegen::Bindings::ServoParserBinding;
use dom::bindings::inheritance::Castable;
use dom::bindings::refcounted::Trusted;
use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, MutNullableJS, Root, RootedReference};
+use dom::bindings::root::{Dom, MutNullableDom, Root, RootedReference};
use dom::bindings::str::DOMString;
use dom::characterdata::CharacterData;
use dom::comment::Comment;
@@ -748,7 +748,7 @@ pub struct Sink {
base_url: ServoUrl,
document: Dom<Document>,
current_line: u64,
- script: MutNullableJS<HTMLScriptElement>,
+ script: MutNullableDom<HTMLScriptElement>,
}
#[allow(unrooted_must_root)] // FIXME: really?
diff --git a/components/script/dom/storageevent.rs b/components/script/dom/storageevent.rs
index 5fa2f5da9dc..f5f8bc5577f 100644
--- a/components/script/dom/storageevent.rs
+++ b/components/script/dom/storageevent.rs
@@ -8,7 +8,7 @@ use dom::bindings::codegen::Bindings::StorageEventBinding::StorageEventMethods;
use dom::bindings::error::Fallible;
use dom::bindings::inheritance::Castable;
use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::{MutNullableJS, Root, RootedReference};
+use dom::bindings::root::{MutNullableDom, Root, RootedReference};
use dom::bindings::str::DOMString;
use dom::event::{Event, EventBubbles, EventCancelable};
use dom::storage::Storage;
@@ -23,7 +23,7 @@ pub struct StorageEvent {
old_value: Option<DOMString>,
new_value: Option<DOMString>,
url: DOMString,
- storage_area: MutNullableJS<Storage>
+ storage_area: MutNullableDom<Storage>
}
@@ -39,7 +39,7 @@ impl StorageEvent {
old_value: old_value,
new_value: new_value,
url: url,
- storage_area: MutNullableJS::new(storage_area)
+ storage_area: MutNullableDom::new(storage_area)
}
}
diff --git a/components/script/dom/uievent.rs b/components/script/dom/uievent.rs
index 2c17f4961f2..d799b979245 100644
--- a/components/script/dom/uievent.rs
+++ b/components/script/dom/uievent.rs
@@ -8,7 +8,7 @@ use dom::bindings::codegen::Bindings::UIEventBinding::UIEventMethods;
use dom::bindings::error::Fallible;
use dom::bindings::inheritance::Castable;
use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::{MutNullableJS, Root, RootedReference};
+use dom::bindings::root::{MutNullableDom, Root, RootedReference};
use dom::bindings::str::DOMString;
use dom::event::{Event, EventBubbles, EventCancelable};
use dom::window::Window;
@@ -21,7 +21,7 @@ use std::default::Default;
#[dom_struct]
pub struct UIEvent {
event: Event,
- view: MutNullableJS<Window>,
+ view: MutNullableDom<Window>,
detail: Cell<i32>
}
diff --git a/components/script/dom/url.rs b/components/script/dom/url.rs
index b4d17fdc9b6..b19d2337142 100644
--- a/components/script/dom/url.rs
+++ b/components/script/dom/url.rs
@@ -6,7 +6,7 @@ use dom::bindings::cell::DOMRefCell;
use dom::bindings::codegen::Bindings::URLBinding::{self, URLMethods};
use dom::bindings::error::{Error, ErrorResult, Fallible};
use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::{MutNullableJS, Root};
+use dom::bindings::root::{MutNullableDom, Root};
use dom::bindings::str::{DOMString, USVString};
use dom::blob::Blob;
use dom::globalscope::GlobalScope;
@@ -30,7 +30,7 @@ pub struct URL {
url: DOMRefCell<ServoUrl>,
// https://url.spec.whatwg.org/#dom-url-searchparams
- search_params: MutNullableJS<URLSearchParams>,
+ search_params: MutNullableDom<URLSearchParams>,
}
impl URL {
diff --git a/components/script/dom/vrdisplay.rs b/components/script/dom/vrdisplay.rs
index d6e8d480c3d..c05ff88b19a 100644
--- a/components/script/dom/vrdisplay.rs
+++ b/components/script/dom/vrdisplay.rs
@@ -18,7 +18,7 @@ use dom::bindings::inheritance::Castable;
use dom::bindings::num::Finite;
use dom::bindings::refcounted::Trusted;
use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::{MutDom, MutNullableJS, Root};
+use dom::bindings::root::{MutDom, MutNullableDom, Root};
use dom::bindings::str::DOMString;
use dom::event::Event;
use dom::eventtarget::EventTarget;
@@ -54,12 +54,12 @@ pub struct VRDisplay {
left_eye_params: MutDom<VREyeParameters>,
right_eye_params: MutDom<VREyeParameters>,
capabilities: MutDom<VRDisplayCapabilities>,
- stage_params: MutNullableJS<VRStageParameters>,
+ stage_params: MutNullableDom<VRStageParameters>,
#[ignore_heap_size_of = "Defined in rust-webvr"]
frame_data: DOMRefCell<WebVRFrameData>,
#[ignore_heap_size_of = "Defined in rust-webvr"]
layer: DOMRefCell<WebVRLayer>,
- layer_ctx: MutNullableJS<WebGLRenderingContext>,
+ layer_ctx: MutNullableDom<WebGLRenderingContext>,
#[ignore_heap_size_of = "Defined in rust-webvr"]
next_raf_id: Cell<u32>,
/// List of request animation frame callbacks
@@ -103,10 +103,10 @@ impl VRDisplay {
left_eye_params: MutDom::new(&*VREyeParameters::new(display.left_eye_parameters.clone(), &global)),
right_eye_params: MutDom::new(&*VREyeParameters::new(display.right_eye_parameters.clone(), &global)),
capabilities: MutDom::new(&*VRDisplayCapabilities::new(display.capabilities.clone(), &global)),
- stage_params: MutNullableJS::new(stage.as_ref().map(|v| v.deref())),
+ stage_params: MutNullableDom::new(stage.as_ref().map(|v| v.deref())),
frame_data: DOMRefCell::new(Default::default()),
layer: DOMRefCell::new(Default::default()),
- layer_ctx: MutNullableJS::default(),
+ layer_ctx: MutNullableDom::default(),
next_raf_id: Cell::new(1),
raf_callback_list: DOMRefCell::new(vec![]),
frame_data_status: Cell::new(VRFrameDataStatus::Waiting),
diff --git a/components/script/dom/webgl_extensions/ext/oesvertexarrayobject.rs b/components/script/dom/webgl_extensions/ext/oesvertexarrayobject.rs
index f7414bcbb1b..00c9d1abdda 100644
--- a/components/script/dom/webgl_extensions/ext/oesvertexarrayobject.rs
+++ b/components/script/dom/webgl_extensions/ext/oesvertexarrayobject.rs
@@ -6,7 +6,7 @@ use canvas_traits::webgl::{webgl_channel, WebGLCommand, WebGLError};
use dom::bindings::codegen::Bindings::OESVertexArrayObjectBinding::{self, OESVertexArrayObjectMethods};
use dom::bindings::codegen::Bindings::OESVertexArrayObjectBinding::OESVertexArrayObjectConstants;
use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, MutNullableJS, Root};
+use dom::bindings::root::{Dom, MutNullableDom, Root};
use dom::webglrenderingcontext::WebGLRenderingContext;
use dom::webglvertexarrayobjectoes::WebGLVertexArrayObjectOES;
use dom_struct::dom_struct;
@@ -20,7 +20,7 @@ use super::{WebGLExtension, WebGLExtensions};
pub struct OESVertexArrayObject {
reflector_: Reflector,
ctx: Dom<WebGLRenderingContext>,
- bound_vao: MutNullableJS<WebGLVertexArrayObjectOES>,
+ bound_vao: MutNullableDom<WebGLVertexArrayObjectOES>,
}
impl OESVertexArrayObject {
@@ -28,7 +28,7 @@ impl OESVertexArrayObject {
Self {
reflector_: Reflector::new(),
ctx: Dom::from_ref(ctx),
- bound_vao: MutNullableJS::new(None)
+ bound_vao: MutNullableDom::new(None)
}
}
diff --git a/components/script/dom/webgl_extensions/ext/webglvertexarrayobjectoes.rs b/components/script/dom/webgl_extensions/ext/webglvertexarrayobjectoes.rs
index ccd103e07a2..3ef5f8bbefa 100644
--- a/components/script/dom/webgl_extensions/ext/webglvertexarrayobjectoes.rs
+++ b/components/script/dom/webgl_extensions/ext/webglvertexarrayobjectoes.rs
@@ -8,7 +8,7 @@ use core::iter::FromIterator;
use dom::bindings::cell::DOMRefCell;
use dom::bindings::codegen::Bindings::WebGLVertexArrayObjectOESBinding;
use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::{Dom, MutNullableJS, Root};
+use dom::bindings::root::{Dom, MutNullableDom, Root};
use dom::globalscope::GlobalScope;
use dom::webglbuffer::WebGLBuffer;
use dom::webglobject::WebGLObject;
@@ -23,7 +23,7 @@ pub struct WebGLVertexArrayObjectOES {
ever_bound: Cell<bool>,
is_deleted: Cell<bool>,
bound_attrib_buffers: DOMRefCell<HashMap<u32, Dom<WebGLBuffer>>>,
- bound_buffer_element_array: MutNullableJS<WebGLBuffer>,
+ bound_buffer_element_array: MutNullableDom<WebGLBuffer>,
}
impl WebGLVertexArrayObjectOES {
@@ -34,7 +34,7 @@ impl WebGLVertexArrayObjectOES {
ever_bound: Cell::new(false),
is_deleted: Cell::new(false),
bound_attrib_buffers: DOMRefCell::new(HashMap::new()),
- bound_buffer_element_array: MutNullableJS::new(None),
+ bound_buffer_element_array: MutNullableDom::new(None),
}
}
diff --git a/components/script/dom/webgl_extensions/wrapper.rs b/components/script/dom/webgl_extensions/wrapper.rs
index 53aba5ed462..fa4d1112a3c 100644
--- a/components/script/dom/webgl_extensions/wrapper.rs
+++ b/components/script/dom/webgl_extensions/wrapper.rs
@@ -4,7 +4,7 @@
use core::nonzero::NonZero;
use dom::bindings::reflector::DomObject;
-use dom::bindings::root::{MutNullableJS, Root};
+use dom::bindings::root::{MutNullableDom, Root};
use dom::bindings::trace::JSTraceable;
use dom::webglrenderingcontext::WebGLRenderingContext;
use heapsize::HeapSizeOf;
@@ -29,15 +29,15 @@ pub trait WebGLExtensionWrapper: JSTraceable + HeapSizeOf {
#[must_root]
#[derive(HeapSizeOf, JSTraceable)]
pub struct TypedWebGLExtensionWrapper<T: WebGLExtension> {
- extension: MutNullableJS<T::Extension>
+ extension: MutNullableDom<T::Extension>
}
/// Typed WebGL Extension implementation.
-/// Exposes the exact MutNullableJS<DOMObject> type defined by the extension.
+/// Exposes the exact MutNullableDom<DOMObject> type defined by the extension.
impl<T: WebGLExtension> TypedWebGLExtensionWrapper<T> {
pub fn new() -> TypedWebGLExtensionWrapper<T> {
TypedWebGLExtensionWrapper {
- extension: MutNullableJS::new(None)
+ extension: MutNullableDom::new(None)
}
}
}
diff --git a/components/script/dom/webglprogram.rs b/components/script/dom/webglprogram.rs
index cc242503607..39262c2f5bd 100644
--- a/components/script/dom/webglprogram.rs
+++ b/components/script/dom/webglprogram.rs
@@ -8,7 +8,7 @@ use canvas_traits::webgl::webgl_channel;
use dom::bindings::codegen::Bindings::WebGLProgramBinding;
use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::{MutNullableJS, Root};
+use dom::bindings::root::{MutNullableDom, Root};
use dom::bindings::str::DOMString;
use dom::webglactiveinfo::WebGLActiveInfo;
use dom::webglobject::WebGLObject;
@@ -25,8 +25,8 @@ pub struct WebGLProgram {
is_deleted: Cell<bool>,
link_called: Cell<bool>,
linked: Cell<bool>,
- fragment_shader: MutNullableJS<WebGLShader>,
- vertex_shader: MutNullableJS<WebGLShader>,
+ fragment_shader: MutNullableDom<WebGLShader>,
+ vertex_shader: MutNullableDom<WebGLShader>,
#[ignore_heap_size_of = "Defined in ipc-channel"]
renderer: WebGLMsgSender,
}
diff --git a/components/script/dom/webglrenderingcontext.rs b/components/script/dom/webglrenderingcontext.rs
index 64148a0a435..9f3b9f286e8 100644
--- a/components/script/dom/webglrenderingcontext.rs
+++ b/components/script/dom/webglrenderingcontext.rs
@@ -20,7 +20,7 @@ use dom::bindings::conversions::{ConversionResult, FromJSValConvertible, ToJSVal
use dom::bindings::error::{Error, Fallible};
use dom::bindings::inheritance::Castable;
use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, LayoutJS, MutNullableJS, Root};
+use dom::bindings::root::{Dom, LayoutJS, MutNullableDom, Root};
use dom::bindings::str::DOMString;
use dom::event::{Event, EventBubbles, EventCancelable};
use dom::htmlcanvaselement::HTMLCanvasElement;
@@ -145,14 +145,14 @@ pub struct WebGLRenderingContext {
last_error: Cell<Option<WebGLError>>,
texture_unpacking_settings: Cell<TextureUnpacking>,
texture_unpacking_alignment: Cell<u32>,
- bound_framebuffer: MutNullableJS<WebGLFramebuffer>,
- bound_renderbuffer: MutNullableJS<WebGLRenderbuffer>,
- bound_texture_2d: MutNullableJS<WebGLTexture>,
- bound_texture_cube_map: MutNullableJS<WebGLTexture>,
- bound_buffer_array: MutNullableJS<WebGLBuffer>,
- bound_buffer_element_array: MutNullableJS<WebGLBuffer>,
+ bound_framebuffer: MutNullableDom<WebGLFramebuffer>,
+ bound_renderbuffer: MutNullableDom<WebGLRenderbuffer>,
+ bound_texture_2d: MutNullableDom<WebGLTexture>,
+ bound_texture_cube_map: MutNullableDom<WebGLTexture>,
+ bound_buffer_array: MutNullableDom<WebGLBuffer>,
+ bound_buffer_element_array: MutNullableDom<WebGLBuffer>,
bound_attrib_buffers: DOMRefCell<FnvHashMap<u32, Dom<WebGLBuffer>>>,
- current_program: MutNullableJS<WebGLProgram>,
+ current_program: MutNullableDom<WebGLProgram>,
#[ignore_heap_size_of = "Because it's small"]
current_vertex_attrib_0: Cell<(f32, f32, f32, f32)>,
#[ignore_heap_size_of = "Because it's small"]
@@ -189,14 +189,14 @@ impl WebGLRenderingContext {
last_error: Cell::new(None),
texture_unpacking_settings: Cell::new(CONVERT_COLORSPACE),
texture_unpacking_alignment: Cell::new(4),
- bound_framebuffer: MutNullableJS::new(None),
- bound_texture_2d: MutNullableJS::new(None),
- bound_texture_cube_map: MutNullableJS::new(None),
- bound_buffer_array: MutNullableJS::new(None),
- bound_buffer_element_array: MutNullableJS::new(None),
+ bound_framebuffer: MutNullableDom::new(None),
+ bound_texture_2d: MutNullableDom::new(None),
+ bound_texture_cube_map: MutNullableDom::new(None),
+ bound_buffer_array: MutNullableDom::new(None),
+ bound_buffer_element_array: MutNullableDom::new(None),
bound_attrib_buffers: DOMRefCell::new(Default::default()),
- bound_renderbuffer: MutNullableJS::new(None),
- current_program: MutNullableJS::new(None),
+ bound_renderbuffer: MutNullableDom::new(None),
+ current_program: MutNullableDom::new(None),
current_vertex_attrib_0: Cell::new((0f32, 0f32, 0f32, 1f32)),
current_scissor: Cell::new((0, 0, size.width, size.height)),
current_clear_color: Cell::new((0.0, 0.0, 0.0, 0.0)),
diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs
index b80beb186d0..1cb9bd37158 100644
--- a/components/script/dom/window.rs
+++ b/components/script/dom/window.rs
@@ -21,7 +21,7 @@ use dom::bindings::inheritance::Castable;
use dom::bindings::num::Finite;
use dom::bindings::refcounted::Trusted;
use dom::bindings::reflector::DomObject;
-use dom::bindings::root::{Dom, MutNullableJS, Root};
+use dom::bindings::root::{Dom, MutNullableDom, Root};
use dom::bindings::str::DOMString;
use dom::bindings::structuredclone::StructuredCloneData;
use dom::bindings::trace::RootedTraceableBox;
@@ -176,22 +176,22 @@ pub struct Window {
file_reading_task_source: FileReadingTaskSource,
#[ignore_heap_size_of = "task sources are hard"]
performance_timeline_task_source: PerformanceTimelineTaskSource,
- navigator: MutNullableJS<Navigator>,
+ navigator: MutNullableDom<Navigator>,
#[ignore_heap_size_of = "Arc"]
image_cache: Arc<ImageCache>,
#[ignore_heap_size_of = "channels are hard"]
image_cache_chan: Sender<ImageCacheMsg>,
- window_proxy: MutNullableJS<WindowProxy>,
- document: MutNullableJS<Document>,
- location: MutNullableJS<Location>,
- history: MutNullableJS<History>,
- custom_element_registry: MutNullableJS<CustomElementRegistry>,
- performance: MutNullableJS<Performance>,
+ window_proxy: MutNullableDom<WindowProxy>,
+ document: MutNullableDom<Document>,
+ location: MutNullableDom<Location>,
+ history: MutNullableDom<History>,
+ custom_element_registry: MutNullableDom<CustomElementRegistry>,
+ performance: MutNullableDom<Performance>,
navigation_start: Cell<u64>,
navigation_start_precise: Cell<f64>,
- screen: MutNullableJS<Screen>,
- session_storage: MutNullableJS<Storage>,
- local_storage: MutNullableJS<Storage>,
+ screen: MutNullableDom<Screen>,
+ session_storage: MutNullableDom<Storage>,
+ local_storage: MutNullableDom<Storage>,
status: DOMRefCell<DOMString>,
/// For sending timeline markers. Will be ignored if
@@ -263,7 +263,7 @@ pub struct Window {
/// All the MediaQueryLists we need to update
media_query_lists: WeakMediaQueryListVec,
- test_runner: MutNullableJS<TestRunner>,
+ test_runner: MutNullableDom<TestRunner>,
/// A handle for communicating messages to the webvr thread, if available.
#[ignore_heap_size_of = "channels are hard"]
@@ -287,9 +287,9 @@ pub struct Window {
unminified_js_dir: DOMRefCell<Option<String>>,
/// Worklets
- test_worklet: MutNullableJS<Worklet>,
+ test_worklet: MutNullableDom<Worklet>,
/// https://drafts.css-houdini.org/css-paint-api-1/#paint-worklet
- paint_worklet: MutNullableJS<Worklet>,
+ paint_worklet: MutNullableDom<Worklet>,
}
impl Window {
diff --git a/components/script/dom/workerglobalscope.rs b/components/script/dom/workerglobalscope.rs
index 6817a466400..252be0f3bf1 100644
--- a/components/script/dom/workerglobalscope.rs
+++ b/components/script/dom/workerglobalscope.rs
@@ -10,7 +10,7 @@ use dom::bindings::codegen::UnionTypes::RequestOrUSVString;
use dom::bindings::error::{Error, ErrorResult, Fallible, report_pending_exception};
use dom::bindings::inheritance::Castable;
use dom::bindings::reflector::DomObject;
-use dom::bindings::root::{MutNullableJS, Root};
+use dom::bindings::root::{MutNullableDom, Root};
use dom::bindings::settings_stack::AutoEntryScript;
use dom::bindings::str::DOMString;
use dom::bindings::trace::RootedTraceableBox;
@@ -77,8 +77,8 @@ pub struct WorkerGlobalScope {
closing: Option<Arc<AtomicBool>>,
#[ignore_heap_size_of = "Defined in js"]
runtime: Runtime,
- location: MutNullableJS<WorkerLocation>,
- navigator: MutNullableJS<WorkerNavigator>,
+ location: MutNullableDom<WorkerLocation>,
+ navigator: MutNullableDom<WorkerNavigator>,
#[ignore_heap_size_of = "Defined in ipc-channel"]
/// Optional `IpcSender` for sending the `DevtoolScriptControlMsg`
@@ -91,7 +91,7 @@ pub struct WorkerGlobalScope {
from_devtools_receiver: Receiver<DevtoolScriptControlMsg>,
navigation_start_precise: f64,
- performance: MutNullableJS<Performance>,
+ performance: MutNullableDom<Performance>,
}
impl WorkerGlobalScope {
diff --git a/components/script/dom/workernavigator.rs b/components/script/dom/workernavigator.rs
index 165deaf5b5d..d2d99be1264 100644
--- a/components/script/dom/workernavigator.rs
+++ b/components/script/dom/workernavigator.rs
@@ -5,7 +5,7 @@
use dom::bindings::codegen::Bindings::WorkerNavigatorBinding;
use dom::bindings::codegen::Bindings::WorkerNavigatorBinding::WorkerNavigatorMethods;
use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::{MutNullableJS, Root};
+use dom::bindings::root::{MutNullableDom, Root};
use dom::bindings::str::DOMString;
use dom::navigatorinfo;
use dom::permissions::Permissions;
@@ -16,7 +16,7 @@ use dom_struct::dom_struct;
#[dom_struct]
pub struct WorkerNavigator {
reflector_: Reflector,
- permissions: MutNullableJS<Permissions>,
+ permissions: MutNullableDom<Permissions>,
}
impl WorkerNavigator {
diff --git a/components/script/dom/xmlhttprequest.rs b/components/script/dom/xmlhttprequest.rs
index a4446d55a56..a08982c4255 100644
--- a/components/script/dom/xmlhttprequest.rs
+++ b/components/script/dom/xmlhttprequest.rs
@@ -16,7 +16,7 @@ use dom::bindings::error::{Error, ErrorResult, Fallible};
use dom::bindings::inheritance::Castable;
use dom::bindings::refcounted::Trusted;
use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::{Dom, MutNullableJS, Root};
+use dom::bindings::root::{Dom, MutNullableDom, Root};
use dom::bindings::str::{ByteString, DOMString, USVString, is_token};
use dom::blob::{Blob, BlobImpl};
use dom::document::{Document, HasBrowsingContext, IsHTMLDocument};
@@ -129,8 +129,8 @@ pub struct XMLHttpRequest {
status_text: DOMRefCell<ByteString>,
response: DOMRefCell<ByteString>,
response_type: Cell<XMLHttpRequestResponseType>,
- response_xml: MutNullableJS<Document>,
- response_blob: MutNullableJS<Blob>,
+ response_xml: MutNullableDom<Document>,
+ response_blob: MutNullableDom<Blob>,
#[ignore_heap_size_of = "Defined in rust-mozjs"]
response_json: Heap<JSVal>,
#[ignore_heap_size_of = "Defined in hyper"]