mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Rename MutNullableJS<T> to MutNullableDom<T>
This commit is contained in:
parent
d29335040d
commit
c52fd0a780
63 changed files with 232 additions and 232 deletions
|
@ -7,7 +7,7 @@ use dom::bindings::cell::DOMRefCell;
|
||||||
use dom::bindings::codegen::Bindings::AttrBinding::{self, AttrMethods};
|
use dom::bindings::codegen::Bindings::AttrBinding::{self, AttrMethods};
|
||||||
use dom::bindings::inheritance::Castable;
|
use dom::bindings::inheritance::Castable;
|
||||||
use dom::bindings::reflector::{Reflector, reflect_dom_object};
|
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::bindings::str::DOMString;
|
||||||
use dom::customelementregistry::CallbackReaction;
|
use dom::customelementregistry::CallbackReaction;
|
||||||
use dom::element::{AttributeMutation, Element};
|
use dom::element::{AttributeMutation, Element};
|
||||||
|
@ -32,7 +32,7 @@ pub struct Attr {
|
||||||
value: DOMRefCell<AttrValue>,
|
value: DOMRefCell<AttrValue>,
|
||||||
|
|
||||||
/// the element that owns this attribute.
|
/// the element that owns this attribute.
|
||||||
owner: MutNullableJS<Element>,
|
owner: MutNullableDom<Element>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Attr {
|
impl Attr {
|
||||||
|
@ -52,7 +52,7 @@ impl Attr {
|
||||||
prefix: prefix,
|
prefix: prefix,
|
||||||
},
|
},
|
||||||
value: DOMRefCell::new(value),
|
value: DOMRefCell::new(value),
|
||||||
owner: MutNullableJS::new(owner),
|
owner: MutNullableDom::new(owner),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -298,15 +298,15 @@ impl<T: DomObject + PartialEq> PartialEq<T> for MutDom<T> {
|
||||||
/// on `Dom<T>`.
|
/// on `Dom<T>`.
|
||||||
#[must_root]
|
#[must_root]
|
||||||
#[derive(JSTraceable)]
|
#[derive(JSTraceable)]
|
||||||
pub struct MutNullableJS<T: DomObject> {
|
pub struct MutNullableDom<T: DomObject> {
|
||||||
ptr: UnsafeCell<Option<Dom<T>>>,
|
ptr: UnsafeCell<Option<Dom<T>>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T: DomObject> MutNullableJS<T> {
|
impl<T: DomObject> MutNullableDom<T> {
|
||||||
/// Create a new `MutNullableJS`.
|
/// Create a new `MutNullableDom`.
|
||||||
pub fn new(initial: Option<&T>) -> MutNullableJS<T> {
|
pub fn new(initial: Option<&T>) -> MutNullableDom<T> {
|
||||||
debug_assert!(thread_state::get().is_script());
|
debug_assert!(thread_state::get().is_script());
|
||||||
MutNullableJS {
|
MutNullableDom {
|
||||||
ptr: UnsafeCell::new(initial.map(Dom::from_ref)),
|
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>) {
|
pub fn set(&self, val: Option<&T>) {
|
||||||
debug_assert!(thread_state::get().is_script());
|
debug_assert!(thread_state::get().is_script());
|
||||||
unsafe {
|
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 {
|
fn eq(&self, other: &Self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
*self.ptr.get() == *other.ptr.get()
|
*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 {
|
fn eq(&self, other: &Option<&T>) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
*self.ptr.get() == other.map(Dom::from_ref)
|
*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)]
|
#[allow(unrooted_must_root)]
|
||||||
fn default() -> MutNullableJS<T> {
|
fn default() -> MutNullableDom<T> {
|
||||||
debug_assert!(thread_state::get().is_script());
|
debug_assert!(thread_state::get().is_script());
|
||||||
MutNullableJS {
|
MutNullableDom {
|
||||||
ptr: UnsafeCell::new(None),
|
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 {
|
fn heap_size_of_children(&self) -> usize {
|
||||||
// See comment on HeapSizeOf for Dom<T>.
|
// See comment on HeapSizeOf for Dom<T>.
|
||||||
0
|
0
|
||||||
|
|
|
@ -12,7 +12,7 @@ use dom::bindings::error::Error;
|
||||||
use dom::bindings::error::ErrorResult;
|
use dom::bindings::error::ErrorResult;
|
||||||
use dom::bindings::inheritance::Castable;
|
use dom::bindings::inheritance::Castable;
|
||||||
use dom::bindings::reflector::{DomObject, reflect_dom_object};
|
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::bindings::str::DOMString;
|
||||||
use dom::bluetooth::{AsyncBluetoothListener, Bluetooth, response_async};
|
use dom::bluetooth::{AsyncBluetoothListener, Bluetooth, response_async};
|
||||||
use dom::bluetoothcharacteristicproperties::BluetoothCharacteristicProperties;
|
use dom::bluetoothcharacteristicproperties::BluetoothCharacteristicProperties;
|
||||||
|
@ -35,7 +35,7 @@ pub struct BluetoothDevice {
|
||||||
eventtarget: EventTarget,
|
eventtarget: EventTarget,
|
||||||
id: DOMString,
|
id: DOMString,
|
||||||
name: Option<DOMString>,
|
name: Option<DOMString>,
|
||||||
gatt: MutNullableJS<BluetoothRemoteGATTServer>,
|
gatt: MutNullableDom<BluetoothRemoteGATTServer>,
|
||||||
context: Dom<Bluetooth>,
|
context: Dom<Bluetooth>,
|
||||||
attribute_instance_map: (DOMRefCell<HashMap<String, Dom<BluetoothRemoteGATTService>>>,
|
attribute_instance_map: (DOMRefCell<HashMap<String, Dom<BluetoothRemoteGATTService>>>,
|
||||||
DOMRefCell<HashMap<String, Dom<BluetoothRemoteGATTCharacteristic>>>,
|
DOMRefCell<HashMap<String, Dom<BluetoothRemoteGATTCharacteristic>>>,
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
use dom::bindings::codegen::Bindings::ClientBinding::{ClientMethods, Wrap};
|
use dom::bindings::codegen::Bindings::ClientBinding::{ClientMethods, Wrap};
|
||||||
use dom::bindings::codegen::Bindings::ClientBinding::FrameType;
|
use dom::bindings::codegen::Bindings::ClientBinding::FrameType;
|
||||||
use dom::bindings::reflector::{Reflector, reflect_dom_object};
|
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::bindings::str::{DOMString, USVString};
|
||||||
use dom::serviceworker::ServiceWorker;
|
use dom::serviceworker::ServiceWorker;
|
||||||
use dom::window::Window;
|
use dom::window::Window;
|
||||||
|
@ -17,7 +17,7 @@ use uuid::Uuid;
|
||||||
#[dom_struct]
|
#[dom_struct]
|
||||||
pub struct Client {
|
pub struct Client {
|
||||||
reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
active_worker: MutNullableJS<ServiceWorker>,
|
active_worker: MutNullableDom<ServiceWorker>,
|
||||||
url: ServoUrl,
|
url: ServoUrl,
|
||||||
frame_type: FrameType,
|
frame_type: FrameType,
|
||||||
#[ignore_heap_size_of = "Defined in uuid"]
|
#[ignore_heap_size_of = "Defined in uuid"]
|
||||||
|
|
|
@ -6,7 +6,7 @@ use dom::bindings::codegen::Bindings::CSSGroupingRuleBinding::CSSGroupingRuleMet
|
||||||
use dom::bindings::error::{ErrorResult, Fallible};
|
use dom::bindings::error::{ErrorResult, Fallible};
|
||||||
use dom::bindings::inheritance::Castable;
|
use dom::bindings::inheritance::Castable;
|
||||||
use dom::bindings::reflector::DomObject;
|
use dom::bindings::reflector::DomObject;
|
||||||
use dom::bindings::root::{MutNullableJS, Root};
|
use dom::bindings::root::{MutNullableDom, Root};
|
||||||
use dom::bindings::str::DOMString;
|
use dom::bindings::str::DOMString;
|
||||||
use dom::cssrule::CSSRule;
|
use dom::cssrule::CSSRule;
|
||||||
use dom::cssrulelist::{CSSRuleList, RulesSource};
|
use dom::cssrulelist::{CSSRuleList, RulesSource};
|
||||||
|
@ -21,7 +21,7 @@ pub struct CSSGroupingRule {
|
||||||
cssrule: CSSRule,
|
cssrule: CSSRule,
|
||||||
#[ignore_heap_size_of = "Arc"]
|
#[ignore_heap_size_of = "Arc"]
|
||||||
rules: Arc<Locked<StyleCssRules>>,
|
rules: Arc<Locked<StyleCssRules>>,
|
||||||
rulelist: MutNullableJS<CSSRuleList>,
|
rulelist: MutNullableDom<CSSRuleList>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl CSSGroupingRule {
|
impl CSSGroupingRule {
|
||||||
|
@ -30,7 +30,7 @@ impl CSSGroupingRule {
|
||||||
CSSGroupingRule {
|
CSSGroupingRule {
|
||||||
cssrule: CSSRule::new_inherited(parent_stylesheet),
|
cssrule: CSSRule::new_inherited(parent_stylesheet),
|
||||||
rules: rules,
|
rules: rules,
|
||||||
rulelist: MutNullableJS::new(None),
|
rulelist: MutNullableDom::new(None),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
use dom::bindings::codegen::Bindings::CSSKeyframeRuleBinding::{self, CSSKeyframeRuleMethods};
|
use dom::bindings::codegen::Bindings::CSSKeyframeRuleBinding::{self, CSSKeyframeRuleMethods};
|
||||||
use dom::bindings::inheritance::Castable;
|
use dom::bindings::inheritance::Castable;
|
||||||
use dom::bindings::reflector::{DomObject, reflect_dom_object};
|
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::bindings::str::DOMString;
|
||||||
use dom::cssrule::{CSSRule, SpecificCSSRule};
|
use dom::cssrule::{CSSRule, SpecificCSSRule};
|
||||||
use dom::cssstyledeclaration::{CSSModificationAccess, CSSStyleDeclaration, CSSStyleOwner};
|
use dom::cssstyledeclaration::{CSSModificationAccess, CSSStyleDeclaration, CSSStyleOwner};
|
||||||
|
@ -21,7 +21,7 @@ pub struct CSSKeyframeRule {
|
||||||
cssrule: CSSRule,
|
cssrule: CSSRule,
|
||||||
#[ignore_heap_size_of = "Arc"]
|
#[ignore_heap_size_of = "Arc"]
|
||||||
keyframerule: Arc<Locked<Keyframe>>,
|
keyframerule: Arc<Locked<Keyframe>>,
|
||||||
style_decl: MutNullableJS<CSSStyleDeclaration>,
|
style_decl: MutNullableDom<CSSStyleDeclaration>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl CSSKeyframeRule {
|
impl CSSKeyframeRule {
|
||||||
|
|
|
@ -8,7 +8,7 @@ use dom::bindings::codegen::Bindings::CSSKeyframesRuleBinding::CSSKeyframesRuleM
|
||||||
use dom::bindings::error::ErrorResult;
|
use dom::bindings::error::ErrorResult;
|
||||||
use dom::bindings::inheritance::Castable;
|
use dom::bindings::inheritance::Castable;
|
||||||
use dom::bindings::reflector::{DomObject, reflect_dom_object};
|
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::str::DOMString;
|
||||||
use dom::csskeyframerule::CSSKeyframeRule;
|
use dom::csskeyframerule::CSSKeyframeRule;
|
||||||
use dom::cssrule::{CSSRule, SpecificCSSRule};
|
use dom::cssrule::{CSSRule, SpecificCSSRule};
|
||||||
|
@ -26,7 +26,7 @@ pub struct CSSKeyframesRule {
|
||||||
cssrule: CSSRule,
|
cssrule: CSSRule,
|
||||||
#[ignore_heap_size_of = "Arc"]
|
#[ignore_heap_size_of = "Arc"]
|
||||||
keyframesrule: Arc<Locked<KeyframesRule>>,
|
keyframesrule: Arc<Locked<KeyframesRule>>,
|
||||||
rulelist: MutNullableJS<CSSRuleList>,
|
rulelist: MutNullableDom<CSSRuleList>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl CSSKeyframesRule {
|
impl CSSKeyframesRule {
|
||||||
|
@ -35,7 +35,7 @@ impl CSSKeyframesRule {
|
||||||
CSSKeyframesRule {
|
CSSKeyframesRule {
|
||||||
cssrule: CSSRule::new_inherited(parent_stylesheet),
|
cssrule: CSSRule::new_inherited(parent_stylesheet),
|
||||||
keyframesrule: keyframesrule,
|
keyframesrule: keyframesrule,
|
||||||
rulelist: MutNullableJS::new(None),
|
rulelist: MutNullableDom::new(None),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ use dom::bindings::codegen::Bindings::CSSMediaRuleBinding;
|
||||||
use dom::bindings::codegen::Bindings::CSSMediaRuleBinding::CSSMediaRuleMethods;
|
use dom::bindings::codegen::Bindings::CSSMediaRuleBinding::CSSMediaRuleMethods;
|
||||||
use dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
|
use dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
|
||||||
use dom::bindings::reflector::{DomObject, reflect_dom_object};
|
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::str::DOMString;
|
||||||
use dom::cssconditionrule::CSSConditionRule;
|
use dom::cssconditionrule::CSSConditionRule;
|
||||||
use dom::cssrule::SpecificCSSRule;
|
use dom::cssrule::SpecificCSSRule;
|
||||||
|
@ -27,7 +27,7 @@ pub struct CSSMediaRule {
|
||||||
cssconditionrule: CSSConditionRule,
|
cssconditionrule: CSSConditionRule,
|
||||||
#[ignore_heap_size_of = "Arc"]
|
#[ignore_heap_size_of = "Arc"]
|
||||||
mediarule: Arc<Locked<MediaRule>>,
|
mediarule: Arc<Locked<MediaRule>>,
|
||||||
medialist: MutNullableJS<MediaList>,
|
medialist: MutNullableDom<MediaList>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl CSSMediaRule {
|
impl CSSMediaRule {
|
||||||
|
@ -38,7 +38,7 @@ impl CSSMediaRule {
|
||||||
CSSMediaRule {
|
CSSMediaRule {
|
||||||
cssconditionrule: CSSConditionRule::new_inherited(parent_stylesheet, list),
|
cssconditionrule: CSSConditionRule::new_inherited(parent_stylesheet, list),
|
||||||
mediarule: mediarule,
|
mediarule: mediarule,
|
||||||
medialist: MutNullableJS::new(None),
|
medialist: MutNullableDom::new(None),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ use dom::bindings::codegen::Bindings::CSSRuleListBinding;
|
||||||
use dom::bindings::codegen::Bindings::CSSRuleListBinding::CSSRuleListMethods;
|
use dom::bindings::codegen::Bindings::CSSRuleListBinding::CSSRuleListMethods;
|
||||||
use dom::bindings::error::{Error, ErrorResult, Fallible};
|
use dom::bindings::error::{Error, ErrorResult, Fallible};
|
||||||
use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
|
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::csskeyframerule::CSSKeyframeRule;
|
||||||
use dom::cssrule::CSSRule;
|
use dom::cssrule::CSSRule;
|
||||||
use dom::cssstylesheet::CSSStyleSheet;
|
use dom::cssstylesheet::CSSStyleSheet;
|
||||||
|
@ -39,7 +39,7 @@ pub struct CSSRuleList {
|
||||||
parent_stylesheet: Dom<CSSStyleSheet>,
|
parent_stylesheet: Dom<CSSStyleSheet>,
|
||||||
#[ignore_heap_size_of = "Arc"]
|
#[ignore_heap_size_of = "Arc"]
|
||||||
rules: RulesSource,
|
rules: RulesSource,
|
||||||
dom_rules: DOMRefCell<Vec<MutNullableJS<CSSRule>>>
|
dom_rules: DOMRefCell<Vec<MutNullableDom<CSSRule>>>
|
||||||
}
|
}
|
||||||
|
|
||||||
pub enum RulesSource {
|
pub enum RulesSource {
|
||||||
|
@ -53,10 +53,10 @@ impl CSSRuleList {
|
||||||
let guard = parent_stylesheet.shared_lock().read();
|
let guard = parent_stylesheet.shared_lock().read();
|
||||||
let dom_rules = match rules {
|
let dom_rules = match rules {
|
||||||
RulesSource::Rules(ref 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) => {
|
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 parent_stylesheet = &*self.parent_stylesheet;
|
||||||
let dom_rule = CSSRule::new_specific(&window, parent_stylesheet, new_rule);
|
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))
|
Ok((idx))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ impl CSSRuleList {
|
||||||
if let RulesSource::Rules(..) = self.rules {
|
if let RulesSource::Rules(..) = self.rules {
|
||||||
panic!("Can only call append_lazy_rule with keyframes-backed CSSRules");
|
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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ use dom::bindings::codegen::Bindings::CSSStyleRuleBinding::{self, CSSStyleRuleMe
|
||||||
use dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
|
use dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
|
||||||
use dom::bindings::inheritance::Castable;
|
use dom::bindings::inheritance::Castable;
|
||||||
use dom::bindings::reflector::{DomObject, reflect_dom_object};
|
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::bindings::str::DOMString;
|
||||||
use dom::cssrule::{CSSRule, SpecificCSSRule};
|
use dom::cssrule::{CSSRule, SpecificCSSRule};
|
||||||
use dom::cssstyledeclaration::{CSSModificationAccess, CSSStyleDeclaration, CSSStyleOwner};
|
use dom::cssstyledeclaration::{CSSModificationAccess, CSSStyleDeclaration, CSSStyleOwner};
|
||||||
|
@ -27,7 +27,7 @@ pub struct CSSStyleRule {
|
||||||
cssrule: CSSRule,
|
cssrule: CSSRule,
|
||||||
#[ignore_heap_size_of = "Arc"]
|
#[ignore_heap_size_of = "Arc"]
|
||||||
stylerule: Arc<Locked<StyleRule>>,
|
stylerule: Arc<Locked<StyleRule>>,
|
||||||
style_decl: MutNullableJS<CSSStyleDeclaration>,
|
style_decl: MutNullableDom<CSSStyleDeclaration>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl CSSStyleRule {
|
impl CSSStyleRule {
|
||||||
|
|
|
@ -7,7 +7,7 @@ use dom::bindings::codegen::Bindings::CSSStyleSheetBinding::CSSStyleSheetMethods
|
||||||
use dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
|
use dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
|
||||||
use dom::bindings::error::{Error, ErrorResult, Fallible};
|
use dom::bindings::error::{Error, ErrorResult, Fallible};
|
||||||
use dom::bindings::reflector::{reflect_dom_object, DomObject};
|
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::bindings::str::DOMString;
|
||||||
use dom::cssrulelist::{CSSRuleList, RulesSource};
|
use dom::cssrulelist::{CSSRuleList, RulesSource};
|
||||||
use dom::element::Element;
|
use dom::element::Element;
|
||||||
|
@ -23,7 +23,7 @@ use style::stylesheets::Stylesheet as StyleStyleSheet;
|
||||||
pub struct CSSStyleSheet {
|
pub struct CSSStyleSheet {
|
||||||
stylesheet: StyleSheet,
|
stylesheet: StyleSheet,
|
||||||
owner: Dom<Element>,
|
owner: Dom<Element>,
|
||||||
rulelist: MutNullableJS<CSSRuleList>,
|
rulelist: MutNullableDom<CSSRuleList>,
|
||||||
#[ignore_heap_size_of = "Arc"]
|
#[ignore_heap_size_of = "Arc"]
|
||||||
style_stylesheet: Arc<StyleStyleSheet>,
|
style_stylesheet: Arc<StyleStyleSheet>,
|
||||||
origin_clean: Cell<bool>,
|
origin_clean: Cell<bool>,
|
||||||
|
@ -38,7 +38,7 @@ impl CSSStyleSheet {
|
||||||
CSSStyleSheet {
|
CSSStyleSheet {
|
||||||
stylesheet: StyleSheet::new_inherited(type_, href, title),
|
stylesheet: StyleSheet::new_inherited(type_, href, title),
|
||||||
owner: Dom::from_ref(owner),
|
owner: Dom::from_ref(owner),
|
||||||
rulelist: MutNullableJS::new(None),
|
rulelist: MutNullableDom::new(None),
|
||||||
style_stylesheet: stylesheet,
|
style_stylesheet: stylesheet,
|
||||||
origin_clean: Cell::new(true),
|
origin_clean: Cell::new(true),
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ use dom::bindings::codegen::Bindings::DissimilarOriginWindowBinding;
|
||||||
use dom::bindings::codegen::Bindings::DissimilarOriginWindowBinding::DissimilarOriginWindowMethods;
|
use dom::bindings::codegen::Bindings::DissimilarOriginWindowBinding::DissimilarOriginWindowMethods;
|
||||||
use dom::bindings::error::{Error, ErrorResult};
|
use dom::bindings::error::{Error, ErrorResult};
|
||||||
use dom::bindings::inheritance::Castable;
|
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::str::DOMString;
|
||||||
use dom::bindings::structuredclone::StructuredCloneData;
|
use dom::bindings::structuredclone::StructuredCloneData;
|
||||||
use dom::dissimilaroriginlocation::DissimilarOriginLocation;
|
use dom::dissimilaroriginlocation::DissimilarOriginLocation;
|
||||||
|
@ -40,7 +40,7 @@ pub struct DissimilarOriginWindow {
|
||||||
window_proxy: Dom<WindowProxy>,
|
window_proxy: Dom<WindowProxy>,
|
||||||
|
|
||||||
/// The location of this window, initialized lazily.
|
/// The location of this window, initialized lazily.
|
||||||
location: MutNullableJS<DissimilarOriginLocation>,
|
location: MutNullableDom<DissimilarOriginLocation>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl DissimilarOriginWindow {
|
impl DissimilarOriginWindow {
|
||||||
|
|
|
@ -27,7 +27,7 @@ use dom::bindings::inheritance::{Castable, ElementTypeId, HTMLElementTypeId, Nod
|
||||||
use dom::bindings::num::Finite;
|
use dom::bindings::num::Finite;
|
||||||
use dom::bindings::refcounted::{Trusted, TrustedPromise};
|
use dom::bindings::refcounted::{Trusted, TrustedPromise};
|
||||||
use dom::bindings::reflector::{DomObject, reflect_dom_object};
|
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::str::{DOMString, USVString};
|
||||||
use dom::bindings::xmlname::{namespace_from_domstring, validate_and_extract, xml_name_type};
|
use dom::bindings::xmlname::{namespace_from_domstring, validate_and_extract, xml_name_type};
|
||||||
use dom::bindings::xmlname::XMLName::InvalidXMLName;
|
use dom::bindings::xmlname::XMLName::InvalidXMLName;
|
||||||
|
@ -224,7 +224,7 @@ impl ::style::stylesheets::StylesheetInDocument for StyleSheetInDocument {
|
||||||
pub struct Document {
|
pub struct Document {
|
||||||
node: Node,
|
node: Node,
|
||||||
window: Dom<Window>,
|
window: Dom<Window>,
|
||||||
implementation: MutNullableJS<DOMImplementation>,
|
implementation: MutNullableDom<DOMImplementation>,
|
||||||
content_type: DOMString,
|
content_type: DOMString,
|
||||||
last_modified: Option<String>,
|
last_modified: Option<String>,
|
||||||
encoding: Cell<EncodingRef>,
|
encoding: Cell<EncodingRef>,
|
||||||
|
@ -239,28 +239,28 @@ pub struct Document {
|
||||||
tag_map: DOMRefCell<HashMap<LocalName, Dom<HTMLCollection>>>,
|
tag_map: DOMRefCell<HashMap<LocalName, Dom<HTMLCollection>>>,
|
||||||
tagns_map: DOMRefCell<HashMap<QualName, Dom<HTMLCollection>>>,
|
tagns_map: DOMRefCell<HashMap<QualName, Dom<HTMLCollection>>>,
|
||||||
classes_map: DOMRefCell<HashMap<Vec<Atom>, Dom<HTMLCollection>>>,
|
classes_map: DOMRefCell<HashMap<Vec<Atom>, Dom<HTMLCollection>>>,
|
||||||
images: MutNullableJS<HTMLCollection>,
|
images: MutNullableDom<HTMLCollection>,
|
||||||
embeds: MutNullableJS<HTMLCollection>,
|
embeds: MutNullableDom<HTMLCollection>,
|
||||||
links: MutNullableJS<HTMLCollection>,
|
links: MutNullableDom<HTMLCollection>,
|
||||||
forms: MutNullableJS<HTMLCollection>,
|
forms: MutNullableDom<HTMLCollection>,
|
||||||
scripts: MutNullableJS<HTMLCollection>,
|
scripts: MutNullableDom<HTMLCollection>,
|
||||||
anchors: MutNullableJS<HTMLCollection>,
|
anchors: MutNullableDom<HTMLCollection>,
|
||||||
applets: MutNullableJS<HTMLCollection>,
|
applets: MutNullableDom<HTMLCollection>,
|
||||||
/// Lock use for style attributes and author-origin stylesheet objects in this document.
|
/// Lock use for style attributes and author-origin stylesheet objects in this document.
|
||||||
/// Can be acquired once for accessing many objects.
|
/// Can be acquired once for accessing many objects.
|
||||||
style_shared_lock: StyleSharedRwLock,
|
style_shared_lock: StyleSharedRwLock,
|
||||||
/// List of stylesheets associated with nodes in this document. |None| if the list needs to be refreshed.
|
/// List of stylesheets associated with nodes in this document. |None| if the list needs to be refreshed.
|
||||||
stylesheets: DOMRefCell<StylesheetSet<StyleSheetInDocument>>,
|
stylesheets: DOMRefCell<StylesheetSet<StyleSheetInDocument>>,
|
||||||
stylesheet_list: MutNullableJS<StyleSheetList>,
|
stylesheet_list: MutNullableDom<StyleSheetList>,
|
||||||
ready_state: Cell<DocumentReadyState>,
|
ready_state: Cell<DocumentReadyState>,
|
||||||
/// Whether the DOMContentLoaded event has already been dispatched.
|
/// Whether the DOMContentLoaded event has already been dispatched.
|
||||||
domcontentloaded_dispatched: Cell<bool>,
|
domcontentloaded_dispatched: Cell<bool>,
|
||||||
/// The element that has most recently requested focus for itself.
|
/// 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.
|
/// The element that currently has the document focus context.
|
||||||
focused: MutNullableJS<Element>,
|
focused: MutNullableDom<Element>,
|
||||||
/// The script element that is currently executing.
|
/// 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
|
/// https://html.spec.whatwg.org/multipage/#pending-parsing-blocking-script
|
||||||
pending_parsing_blocking_script: DOMRefCell<Option<PendingScript>>,
|
pending_parsing_blocking_script: DOMRefCell<Option<PendingScript>>,
|
||||||
/// Number of stylesheets that block executing the next parser-inserted script
|
/// 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.
|
/// Tracks all outstanding loads related to this document.
|
||||||
loader: DOMRefCell<DocumentLoader>,
|
loader: DOMRefCell<DocumentLoader>,
|
||||||
/// The current active HTML parser, to allow resuming after interruptions.
|
/// 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.
|
/// When we should kick off a reflow. This happens during parsing.
|
||||||
reflow_timeout: Cell<Option<u64>>,
|
reflow_timeout: Cell<Option<u64>>,
|
||||||
/// The cached first `base` element with an `href` attribute.
|
/// 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.
|
/// This field is set to the document itself for inert documents.
|
||||||
/// https://html.spec.whatwg.org/multipage/#appropriate-template-contents-owner-document
|
/// 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
|
/// Information on elements needing restyle to ship over to the layout thread when the
|
||||||
/// time comes.
|
/// time comes.
|
||||||
pending_restyles: DOMRefCell<HashMap<Dom<Element>, PendingRestyle>>,
|
pending_restyles: DOMRefCell<HashMap<Dom<Element>, PendingRestyle>>,
|
||||||
|
@ -323,7 +323,7 @@ pub struct Document {
|
||||||
/// https://html.spec.whatwg.org/multipage/#dom-document-referrer
|
/// https://html.spec.whatwg.org/multipage/#dom-document-referrer
|
||||||
referrer: Option<String>,
|
referrer: Option<String>,
|
||||||
/// https://html.spec.whatwg.org/multipage/#target-element
|
/// https://html.spec.whatwg.org/multipage/#target-element
|
||||||
target_element: MutNullableJS<Element>,
|
target_element: MutNullableDom<Element>,
|
||||||
/// https://w3c.github.io/uievents/#event-type-dblclick
|
/// https://w3c.github.io/uievents/#event-type-dblclick
|
||||||
#[ignore_heap_size_of = "Defined in std"]
|
#[ignore_heap_size_of = "Defined in std"]
|
||||||
last_click_info: DOMRefCell<Option<(Instant, Point2D<f32>)>>,
|
last_click_info: DOMRefCell<Option<(Instant, Point2D<f32>)>>,
|
||||||
|
@ -341,7 +341,7 @@ pub struct Document {
|
||||||
/// See also: https://github.com/servo/servo/issues/10110
|
/// See also: https://github.com/servo/servo/issues/10110
|
||||||
dom_count: Cell<u32>,
|
dom_count: Cell<u32>,
|
||||||
/// Entry node for fullscreen.
|
/// 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
|
/// Map from ID to set of form control elements that have that ID as
|
||||||
/// their 'form' content attribute. Used to reset form controls
|
/// their 'form' content attribute. Used to reset form controls
|
||||||
/// whenever any element with the same ID as the form attribute
|
/// whenever any element with the same ID as the form attribute
|
||||||
|
@ -1112,7 +1112,7 @@ impl Document {
|
||||||
pub fn handle_mouse_move_event(&self,
|
pub fn handle_mouse_move_event(&self,
|
||||||
js_runtime: *mut JSRuntime,
|
js_runtime: *mut JSRuntime,
|
||||||
client_point: Option<Point2D<f32>>,
|
client_point: Option<Point2D<f32>>,
|
||||||
prev_mouse_over_target: &MutNullableJS<Element>) {
|
prev_mouse_over_target: &MutNullableDom<Element>) {
|
||||||
let client_point = match client_point {
|
let client_point = match client_point {
|
||||||
None => {
|
None => {
|
||||||
// If there's no point, there's no target under the mouse
|
// If there's no point, there's no target under the mouse
|
||||||
|
@ -2264,7 +2264,7 @@ impl Document {
|
||||||
//StyleSharedRwLock::new()
|
//StyleSharedRwLock::new()
|
||||||
},
|
},
|
||||||
stylesheets: DOMRefCell::new(StylesheetSet::new()),
|
stylesheets: DOMRefCell::new(StylesheetSet::new()),
|
||||||
stylesheet_list: MutNullableJS::new(None),
|
stylesheet_list: MutNullableDom::new(None),
|
||||||
ready_state: Cell::new(ready_state),
|
ready_state: Cell::new(ready_state),
|
||||||
domcontentloaded_dispatched: Cell::new(domcontentloaded_dispatched),
|
domcontentloaded_dispatched: Cell::new(domcontentloaded_dispatched),
|
||||||
possibly_focused: Default::default(),
|
possibly_focused: Default::default(),
|
||||||
|
@ -2299,12 +2299,12 @@ impl Document {
|
||||||
origin: origin,
|
origin: origin,
|
||||||
referrer: referrer,
|
referrer: referrer,
|
||||||
referrer_policy: Cell::new(referrer_policy),
|
referrer_policy: Cell::new(referrer_policy),
|
||||||
target_element: MutNullableJS::new(None),
|
target_element: MutNullableDom::new(None),
|
||||||
last_click_info: DOMRefCell::new(None),
|
last_click_info: DOMRefCell::new(None),
|
||||||
ignore_destructive_writes_counter: Default::default(),
|
ignore_destructive_writes_counter: Default::default(),
|
||||||
spurious_animation_frames: Cell::new(0),
|
spurious_animation_frames: Cell::new(0),
|
||||||
dom_count: Cell::new(1),
|
dom_count: Cell::new(1),
|
||||||
fullscreen_element: MutNullableJS::new(None),
|
fullscreen_element: MutNullableDom::new(None),
|
||||||
form_id_listener_map: Default::default(),
|
form_id_listener_map: Default::default(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ use dom::bindings::error::{Error, ErrorResult, Fallible};
|
||||||
use dom::bindings::inheritance::{Castable, ElementTypeId, HTMLElementTypeId, NodeTypeId};
|
use dom::bindings::inheritance::{Castable, ElementTypeId, HTMLElementTypeId, NodeTypeId};
|
||||||
use dom::bindings::refcounted::{Trusted, TrustedPromise};
|
use dom::bindings::refcounted::{Trusted, TrustedPromise};
|
||||||
use dom::bindings::reflector::DomObject;
|
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::str::DOMString;
|
||||||
use dom::bindings::xmlname::{namespace_from_domstring, validate_and_extract, xml_name_type};
|
use dom::bindings::xmlname::{namespace_from_domstring, validate_and_extract, xml_name_type};
|
||||||
use dom::bindings::xmlname::XMLName::InvalidXMLName;
|
use dom::bindings::xmlname::XMLName::InvalidXMLName;
|
||||||
|
@ -136,8 +136,8 @@ pub struct Element {
|
||||||
is: DOMRefCell<Option<LocalName>>,
|
is: DOMRefCell<Option<LocalName>>,
|
||||||
#[ignore_heap_size_of = "Arc"]
|
#[ignore_heap_size_of = "Arc"]
|
||||||
style_attribute: DOMRefCell<Option<Arc<Locked<PropertyDeclarationBlock>>>>,
|
style_attribute: DOMRefCell<Option<Arc<Locked<PropertyDeclarationBlock>>>>,
|
||||||
attr_list: MutNullableJS<NamedNodeMap>,
|
attr_list: MutNullableDom<NamedNodeMap>,
|
||||||
class_list: MutNullableJS<DOMTokenList>,
|
class_list: MutNullableDom<DOMTokenList>,
|
||||||
state: Cell<ElementState>,
|
state: Cell<ElementState>,
|
||||||
/// These flags are set by the style system to indicate the that certain
|
/// These flags are set by the style system to indicate the that certain
|
||||||
/// operations may require restyling this element or its descendants. The
|
/// operations may require restyling this element or its descendants. The
|
||||||
|
|
|
@ -11,7 +11,7 @@ use dom::bindings::error::Fallible;
|
||||||
use dom::bindings::inheritance::Castable;
|
use dom::bindings::inheritance::Castable;
|
||||||
use dom::bindings::refcounted::Trusted;
|
use dom::bindings::refcounted::Trusted;
|
||||||
use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
|
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::bindings::str::DOMString;
|
||||||
use dom::document::Document;
|
use dom::document::Document;
|
||||||
use dom::eventtarget::{CompiledEventListener, EventTarget, ListenerPhase};
|
use dom::eventtarget::{CompiledEventListener, EventTarget, ListenerPhase};
|
||||||
|
@ -29,8 +29,8 @@ use time;
|
||||||
#[dom_struct]
|
#[dom_struct]
|
||||||
pub struct Event {
|
pub struct Event {
|
||||||
reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
current_target: MutNullableJS<EventTarget>,
|
current_target: MutNullableDom<EventTarget>,
|
||||||
target: MutNullableJS<EventTarget>,
|
target: MutNullableDom<EventTarget>,
|
||||||
type_: DOMRefCell<Atom>,
|
type_: DOMRefCell<Atom>,
|
||||||
phase: Cell<EventPhase>,
|
phase: Cell<EventPhase>,
|
||||||
canceled: Cell<EventDefault>,
|
canceled: Cell<EventDefault>,
|
||||||
|
|
|
@ -11,7 +11,7 @@ use dom::bindings::error::{Error, ErrorResult, Fallible};
|
||||||
use dom::bindings::inheritance::Castable;
|
use dom::bindings::inheritance::Castable;
|
||||||
use dom::bindings::refcounted::Trusted;
|
use dom::bindings::refcounted::Trusted;
|
||||||
use dom::bindings::reflector::{DomObject, reflect_dom_object};
|
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::str::DOMString;
|
||||||
use dom::bindings::trace::RootedTraceableBox;
|
use dom::bindings::trace::RootedTraceableBox;
|
||||||
use dom::blob::Blob;
|
use dom::blob::Blob;
|
||||||
|
@ -87,7 +87,7 @@ pub enum FileReaderResult {
|
||||||
pub struct FileReader {
|
pub struct FileReader {
|
||||||
eventtarget: EventTarget,
|
eventtarget: EventTarget,
|
||||||
ready_state: Cell<FileReaderReadyState>,
|
ready_state: Cell<FileReaderReadyState>,
|
||||||
error: MutNullableJS<DOMException>,
|
error: MutNullableDom<DOMException>,
|
||||||
result: DOMRefCell<Option<FileReaderResult>>,
|
result: DOMRefCell<Option<FileReaderResult>>,
|
||||||
generation_id: Cell<GenerationId>,
|
generation_id: Cell<GenerationId>,
|
||||||
}
|
}
|
||||||
|
@ -97,7 +97,7 @@ impl FileReader {
|
||||||
FileReader {
|
FileReader {
|
||||||
eventtarget: EventTarget::new_inherited(),
|
eventtarget: EventTarget::new_inherited(),
|
||||||
ready_state: Cell::new(FileReaderReadyState::Empty),
|
ready_state: Cell::new(FileReaderReadyState::Empty),
|
||||||
error: MutNullableJS::new(None),
|
error: MutNullableDom::new(None),
|
||||||
result: DOMRefCell::new(None),
|
result: DOMRefCell::new(None),
|
||||||
generation_id: Cell::new(GenerationId(0)),
|
generation_id: Cell::new(GenerationId(0)),
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ use dom::bindings::codegen::Bindings::UIEventBinding::UIEventMethods;
|
||||||
use dom::bindings::error::Fallible;
|
use dom::bindings::error::Fallible;
|
||||||
use dom::bindings::inheritance::Castable;
|
use dom::bindings::inheritance::Castable;
|
||||||
use dom::bindings::reflector::reflect_dom_object;
|
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::bindings::str::DOMString;
|
||||||
use dom::event::{EventBubbles, EventCancelable};
|
use dom::event::{EventBubbles, EventCancelable};
|
||||||
use dom::eventtarget::EventTarget;
|
use dom::eventtarget::EventTarget;
|
||||||
|
@ -20,7 +20,7 @@ use std::default::Default;
|
||||||
#[dom_struct]
|
#[dom_struct]
|
||||||
pub struct FocusEvent {
|
pub struct FocusEvent {
|
||||||
uievent: UIEvent,
|
uievent: UIEvent,
|
||||||
related_target: MutNullableJS<EventTarget>,
|
related_target: MutNullableDom<EventTarget>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl FocusEvent {
|
impl FocusEvent {
|
||||||
|
|
|
@ -10,7 +10,7 @@ use dom::bindings::conversions::root_from_object;
|
||||||
use dom::bindings::error::{ErrorInfo, report_pending_exception};
|
use dom::bindings::error::{ErrorInfo, report_pending_exception};
|
||||||
use dom::bindings::inheritance::Castable;
|
use dom::bindings::inheritance::Castable;
|
||||||
use dom::bindings::reflector::DomObject;
|
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::settings_stack::{AutoEntryScript, entry_global, incumbent_global};
|
||||||
use dom::bindings::str::DOMString;
|
use dom::bindings::str::DOMString;
|
||||||
use dom::crypto::Crypto;
|
use dom::crypto::Crypto;
|
||||||
|
@ -58,7 +58,7 @@ use timers::{OneshotTimers, TimerCallback};
|
||||||
#[dom_struct]
|
#[dom_struct]
|
||||||
pub struct GlobalScope {
|
pub struct GlobalScope {
|
||||||
eventtarget: EventTarget,
|
eventtarget: EventTarget,
|
||||||
crypto: MutNullableJS<Crypto>,
|
crypto: MutNullableDom<Crypto>,
|
||||||
next_worker_id: Cell<WorkerId>,
|
next_worker_id: Cell<WorkerId>,
|
||||||
|
|
||||||
/// Pipeline id associated with this global.
|
/// Pipeline id associated with this global.
|
||||||
|
|
|
@ -11,7 +11,7 @@ use dom::bindings::codegen::Bindings::HTMLAnchorElementBinding::HTMLAnchorElemen
|
||||||
use dom::bindings::codegen::Bindings::MouseEventBinding::MouseEventMethods;
|
use dom::bindings::codegen::Bindings::MouseEventBinding::MouseEventMethods;
|
||||||
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
|
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
|
||||||
use dom::bindings::inheritance::Castable;
|
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::bindings::str::{DOMString, USVString};
|
||||||
use dom::document::Document;
|
use dom::document::Document;
|
||||||
use dom::domtokenlist::DOMTokenList;
|
use dom::domtokenlist::DOMTokenList;
|
||||||
|
@ -37,7 +37,7 @@ use style::attr::AttrValue;
|
||||||
#[dom_struct]
|
#[dom_struct]
|
||||||
pub struct HTMLAnchorElement {
|
pub struct HTMLAnchorElement {
|
||||||
htmlelement: HTMLElement,
|
htmlelement: HTMLElement,
|
||||||
rel_list: MutNullableJS<DOMTokenList>,
|
rel_list: MutNullableDom<DOMTokenList>,
|
||||||
url: DOMRefCell<Option<ServoUrl>>,
|
url: DOMRefCell<Option<ServoUrl>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ use dom::bindings::codegen::Bindings::DOMTokenListBinding::DOMTokenListMethods;
|
||||||
use dom::bindings::codegen::Bindings::HTMLAreaElementBinding;
|
use dom::bindings::codegen::Bindings::HTMLAreaElementBinding;
|
||||||
use dom::bindings::codegen::Bindings::HTMLAreaElementBinding::HTMLAreaElementMethods;
|
use dom::bindings::codegen::Bindings::HTMLAreaElementBinding::HTMLAreaElementMethods;
|
||||||
use dom::bindings::inheritance::Castable;
|
use dom::bindings::inheritance::Castable;
|
||||||
use dom::bindings::root::{MutNullableJS, Root};
|
use dom::bindings::root::{MutNullableDom, Root};
|
||||||
use dom::bindings::str::DOMString;
|
use dom::bindings::str::DOMString;
|
||||||
use dom::document::Document;
|
use dom::document::Document;
|
||||||
use dom::domtokenlist::DOMTokenList;
|
use dom::domtokenlist::DOMTokenList;
|
||||||
|
@ -217,7 +217,7 @@ impl Area {
|
||||||
#[dom_struct]
|
#[dom_struct]
|
||||||
pub struct HTMLAreaElement {
|
pub struct HTMLAreaElement {
|
||||||
htmlelement: HTMLElement,
|
htmlelement: HTMLElement,
|
||||||
rel_list: MutNullableJS<DOMTokenList>,
|
rel_list: MutNullableDom<DOMTokenList>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLAreaElement {
|
impl HTMLAreaElement {
|
||||||
|
|
|
@ -7,7 +7,7 @@ use dom::attr::Attr;
|
||||||
use dom::bindings::codegen::Bindings::HTMLButtonElementBinding;
|
use dom::bindings::codegen::Bindings::HTMLButtonElementBinding;
|
||||||
use dom::bindings::codegen::Bindings::HTMLButtonElementBinding::HTMLButtonElementMethods;
|
use dom::bindings::codegen::Bindings::HTMLButtonElementBinding::HTMLButtonElementMethods;
|
||||||
use dom::bindings::inheritance::Castable;
|
use dom::bindings::inheritance::Castable;
|
||||||
use dom::bindings::root::{MutNullableJS, Root};
|
use dom::bindings::root::{MutNullableDom, Root};
|
||||||
use dom::bindings::str::DOMString;
|
use dom::bindings::str::DOMString;
|
||||||
use dom::document::Document;
|
use dom::document::Document;
|
||||||
use dom::element::{AttributeMutation, Element};
|
use dom::element::{AttributeMutation, Element};
|
||||||
|
@ -42,7 +42,7 @@ enum ButtonType {
|
||||||
pub struct HTMLButtonElement {
|
pub struct HTMLButtonElement {
|
||||||
htmlelement: HTMLElement,
|
htmlelement: HTMLElement,
|
||||||
button_type: Cell<ButtonType>,
|
button_type: Cell<ButtonType>,
|
||||||
form_owner: MutNullableJS<HTMLFormElement>,
|
form_owner: MutNullableDom<HTMLFormElement>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLButtonElement {
|
impl HTMLButtonElement {
|
||||||
|
|
|
@ -6,7 +6,7 @@ use dom::bindings::codegen::Bindings::HTMLCollectionBinding;
|
||||||
use dom::bindings::codegen::Bindings::HTMLCollectionBinding::HTMLCollectionMethods;
|
use dom::bindings::codegen::Bindings::HTMLCollectionBinding::HTMLCollectionMethods;
|
||||||
use dom::bindings::inheritance::Castable;
|
use dom::bindings::inheritance::Castable;
|
||||||
use dom::bindings::reflector::{Reflector, reflect_dom_object};
|
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::str::DOMString;
|
||||||
use dom::bindings::trace::JSTraceable;
|
use dom::bindings::trace::JSTraceable;
|
||||||
use dom::bindings::xmlname::namespace_from_domstring;
|
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.
|
// the length of the collection, and a cursor into the collection.
|
||||||
// FIXME: make the cached cursor element a weak pointer
|
// FIXME: make the cached cursor element a weak pointer
|
||||||
cached_version: Cell<u64>,
|
cached_version: Cell<u64>,
|
||||||
cached_cursor_element: MutNullableJS<Element>,
|
cached_cursor_element: MutNullableDom<Element>,
|
||||||
cached_cursor_index: Cell<OptionU32>,
|
cached_cursor_index: Cell<OptionU32>,
|
||||||
cached_length: Cell<OptionU32>,
|
cached_length: Cell<OptionU32>,
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,7 @@ impl HTMLCollection {
|
||||||
filter: filter,
|
filter: filter,
|
||||||
// Default values for the cache
|
// Default values for the cache
|
||||||
cached_version: Cell::new(root.inclusive_descendants_version()),
|
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_cursor_index: Cell::new(OptionU32::none()),
|
||||||
cached_length: Cell::new(OptionU32::none()),
|
cached_length: Cell::new(OptionU32::none()),
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
|
||||||
use dom::bindings::error::{Error, ErrorResult};
|
use dom::bindings::error::{Error, ErrorResult};
|
||||||
use dom::bindings::inheritance::{ElementTypeId, HTMLElementTypeId, NodeTypeId};
|
use dom::bindings::inheritance::{ElementTypeId, HTMLElementTypeId, NodeTypeId};
|
||||||
use dom::bindings::inheritance::Castable;
|
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::bindings::str::DOMString;
|
||||||
use dom::cssstyledeclaration::{CSSModificationAccess, CSSStyleDeclaration, CSSStyleOwner};
|
use dom::cssstyledeclaration::{CSSModificationAccess, CSSStyleDeclaration, CSSStyleOwner};
|
||||||
use dom::document::{Document, FocusType};
|
use dom::document::{Document, FocusType};
|
||||||
|
@ -39,8 +39,8 @@ use style::element_state::*;
|
||||||
#[dom_struct]
|
#[dom_struct]
|
||||||
pub struct HTMLElement {
|
pub struct HTMLElement {
|
||||||
element: Element,
|
element: Element,
|
||||||
style_decl: MutNullableJS<CSSStyleDeclaration>,
|
style_decl: MutNullableDom<CSSStyleDeclaration>,
|
||||||
dataset: MutNullableJS<DOMStringMap>,
|
dataset: MutNullableDom<DOMStringMap>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLElement {
|
impl HTMLElement {
|
||||||
|
|
|
@ -6,7 +6,7 @@ use dom::attr::Attr;
|
||||||
use dom::bindings::codegen::Bindings::HTMLFieldSetElementBinding;
|
use dom::bindings::codegen::Bindings::HTMLFieldSetElementBinding;
|
||||||
use dom::bindings::codegen::Bindings::HTMLFieldSetElementBinding::HTMLFieldSetElementMethods;
|
use dom::bindings::codegen::Bindings::HTMLFieldSetElementBinding::HTMLFieldSetElementMethods;
|
||||||
use dom::bindings::inheritance::{Castable, ElementTypeId, HTMLElementTypeId, NodeTypeId};
|
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::document::Document;
|
||||||
use dom::element::{AttributeMutation, Element};
|
use dom::element::{AttributeMutation, Element};
|
||||||
use dom::htmlcollection::{CollectionFilter, HTMLCollection};
|
use dom::htmlcollection::{CollectionFilter, HTMLCollection};
|
||||||
|
@ -24,7 +24,7 @@ use style::element_state::*;
|
||||||
#[dom_struct]
|
#[dom_struct]
|
||||||
pub struct HTMLFieldSetElement {
|
pub struct HTMLFieldSetElement {
|
||||||
htmlelement: HTMLElement,
|
htmlelement: HTMLElement,
|
||||||
form_owner: MutNullableJS<HTMLFormElement>,
|
form_owner: MutNullableDom<HTMLFormElement>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLFieldSetElement {
|
impl HTMLFieldSetElement {
|
||||||
|
|
|
@ -21,7 +21,7 @@ use dom::bindings::error::{Error, ErrorResult, Fallible};
|
||||||
use dom::bindings::inheritance::Castable;
|
use dom::bindings::inheritance::Castable;
|
||||||
use dom::bindings::refcounted::Trusted;
|
use dom::bindings::refcounted::Trusted;
|
||||||
use dom::bindings::reflector::DomObject;
|
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::bindings::str::DOMString;
|
||||||
use dom::customevent::CustomEvent;
|
use dom::customevent::CustomEvent;
|
||||||
use dom::document::Document;
|
use dom::document::Document;
|
||||||
|
@ -88,7 +88,7 @@ pub struct HTMLIFrameElement {
|
||||||
browsing_context_id: Cell<Option<BrowsingContextId>>,
|
browsing_context_id: Cell<Option<BrowsingContextId>>,
|
||||||
pipeline_id: Cell<Option<PipelineId>>,
|
pipeline_id: Cell<Option<PipelineId>>,
|
||||||
pending_pipeline_id: Cell<Option<PipelineId>>,
|
pending_pipeline_id: Cell<Option<PipelineId>>,
|
||||||
sandbox: MutNullableJS<DOMTokenList>,
|
sandbox: MutNullableDom<DOMTokenList>,
|
||||||
sandbox_allowance: Cell<Option<SandboxAllowance>>,
|
sandbox_allowance: Cell<Option<SandboxAllowance>>,
|
||||||
load_blocker: DOMRefCell<Option<LoadBlocker>>,
|
load_blocker: DOMRefCell<Option<LoadBlocker>>,
|
||||||
visibility: Cell<bool>,
|
visibility: Cell<bool>,
|
||||||
|
|
|
@ -17,7 +17,7 @@ use dom::bindings::error::Fallible;
|
||||||
use dom::bindings::inheritance::Castable;
|
use dom::bindings::inheritance::Castable;
|
||||||
use dom::bindings::refcounted::Trusted;
|
use dom::bindings::refcounted::Trusted;
|
||||||
use dom::bindings::reflector::DomObject;
|
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::bindings::str::DOMString;
|
||||||
use dom::document::Document;
|
use dom::document::Document;
|
||||||
use dom::element::{AttributeMutation, Element, RawLayoutElementHelpers};
|
use dom::element::{AttributeMutation, Element, RawLayoutElementHelpers};
|
||||||
|
@ -89,7 +89,7 @@ pub struct HTMLImageElement {
|
||||||
image_request: Cell<ImageRequestPhase>,
|
image_request: Cell<ImageRequestPhase>,
|
||||||
current_request: DOMRefCell<ImageRequest>,
|
current_request: DOMRefCell<ImageRequest>,
|
||||||
pending_request: DOMRefCell<ImageRequest>,
|
pending_request: DOMRefCell<ImageRequest>,
|
||||||
form_owner: MutNullableJS<HTMLFormElement>,
|
form_owner: MutNullableDom<HTMLFormElement>,
|
||||||
generation: Cell<u32>,
|
generation: Cell<u32>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ use dom::bindings::codegen::Bindings::MouseEventBinding::MouseEventMethods;
|
||||||
use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
|
use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
|
||||||
use dom::bindings::error::{Error, ErrorResult};
|
use dom::bindings::error::{Error, ErrorResult};
|
||||||
use dom::bindings::inheritance::Castable;
|
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::bindings::str::DOMString;
|
||||||
use dom::document::Document;
|
use dom::document::Document;
|
||||||
use dom::element::{AttributeMutation, Element, LayoutElementHelpers, RawLayoutElementHelpers};
|
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
|
// https://html.spec.whatwg.org/multipage/#concept-input-value-dirty-flag
|
||||||
value_dirty: Cell<bool>,
|
value_dirty: Cell<bool>,
|
||||||
|
|
||||||
filelist: MutNullableJS<FileList>,
|
filelist: MutNullableDom<FileList>,
|
||||||
form_owner: MutNullableJS<HTMLFormElement>,
|
form_owner: MutNullableDom<HTMLFormElement>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(JSTraceable)]
|
#[derive(JSTraceable)]
|
||||||
|
@ -156,7 +156,7 @@ impl HTMLInputElement {
|
||||||
SelectionDirection::None)),
|
SelectionDirection::None)),
|
||||||
activation_state: DOMRefCell::new(InputActivationState::new()),
|
activation_state: DOMRefCell::new(InputActivationState::new()),
|
||||||
value_dirty: Cell::new(false),
|
value_dirty: Cell::new(false),
|
||||||
filelist: MutNullableJS::new(None),
|
filelist: MutNullableDom::new(None),
|
||||||
form_owner: Default::default(),
|
form_owner: Default::default(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ use dom::bindings::codegen::Bindings::HTMLLegendElementBinding;
|
||||||
use dom::bindings::codegen::Bindings::HTMLLegendElementBinding::HTMLLegendElementMethods;
|
use dom::bindings::codegen::Bindings::HTMLLegendElementBinding::HTMLLegendElementMethods;
|
||||||
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
|
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
|
||||||
use dom::bindings::inheritance::Castable;
|
use dom::bindings::inheritance::Castable;
|
||||||
use dom::bindings::root::{MutNullableJS, Root};
|
use dom::bindings::root::{MutNullableDom, Root};
|
||||||
use dom::document::Document;
|
use dom::document::Document;
|
||||||
use dom::element::Element;
|
use dom::element::Element;
|
||||||
use dom::htmlelement::HTMLElement;
|
use dom::htmlelement::HTMLElement;
|
||||||
|
@ -20,7 +20,7 @@ use html5ever::{LocalName, Prefix};
|
||||||
#[dom_struct]
|
#[dom_struct]
|
||||||
pub struct HTMLLegendElement {
|
pub struct HTMLLegendElement {
|
||||||
htmlelement: HTMLElement,
|
htmlelement: HTMLElement,
|
||||||
form_owner: MutNullableJS<HTMLFormElement>,
|
form_owner: MutNullableDom<HTMLFormElement>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLLegendElement {
|
impl HTMLLegendElement {
|
||||||
|
|
|
@ -9,7 +9,7 @@ use dom::bindings::codegen::Bindings::DOMTokenListBinding::DOMTokenListBinding::
|
||||||
use dom::bindings::codegen::Bindings::HTMLLinkElementBinding;
|
use dom::bindings::codegen::Bindings::HTMLLinkElementBinding;
|
||||||
use dom::bindings::codegen::Bindings::HTMLLinkElementBinding::HTMLLinkElementMethods;
|
use dom::bindings::codegen::Bindings::HTMLLinkElementBinding::HTMLLinkElementMethods;
|
||||||
use dom::bindings::inheritance::Castable;
|
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::bindings::str::DOMString;
|
||||||
use dom::cssstylesheet::CSSStyleSheet;
|
use dom::cssstylesheet::CSSStyleSheet;
|
||||||
use dom::document::Document;
|
use dom::document::Document;
|
||||||
|
@ -50,10 +50,10 @@ impl RequestGenerationId {
|
||||||
#[dom_struct]
|
#[dom_struct]
|
||||||
pub struct HTMLLinkElement {
|
pub struct HTMLLinkElement {
|
||||||
htmlelement: HTMLElement,
|
htmlelement: HTMLElement,
|
||||||
rel_list: MutNullableJS<DOMTokenList>,
|
rel_list: MutNullableDom<DOMTokenList>,
|
||||||
#[ignore_heap_size_of = "Arc"]
|
#[ignore_heap_size_of = "Arc"]
|
||||||
stylesheet: DOMRefCell<Option<Arc<Stylesheet>>>,
|
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
|
/// https://html.spec.whatwg.org/multipage/#a-style-sheet-that-is-blocking-scripts
|
||||||
parser_inserted: Cell<bool>,
|
parser_inserted: Cell<bool>,
|
||||||
|
@ -74,7 +74,7 @@ impl HTMLLinkElement {
|
||||||
rel_list: Default::default(),
|
rel_list: Default::default(),
|
||||||
parser_inserted: Cell::new(creator.is_parser_created()),
|
parser_inserted: Cell::new(creator.is_parser_created()),
|
||||||
stylesheet: DOMRefCell::new(None),
|
stylesheet: DOMRefCell::new(None),
|
||||||
cssom_stylesheet: MutNullableJS::new(None),
|
cssom_stylesheet: MutNullableDom::new(None),
|
||||||
pending_loads: Cell::new(0),
|
pending_loads: Cell::new(0),
|
||||||
any_failed_load: Cell::new(false),
|
any_failed_load: Cell::new(false),
|
||||||
request_generation_id: Cell::new(RequestGenerationId(0)),
|
request_generation_id: Cell::new(RequestGenerationId(0)),
|
||||||
|
|
|
@ -18,7 +18,7 @@ use dom::bindings::error::{Error, ErrorResult};
|
||||||
use dom::bindings::inheritance::Castable;
|
use dom::bindings::inheritance::Castable;
|
||||||
use dom::bindings::refcounted::Trusted;
|
use dom::bindings::refcounted::Trusted;
|
||||||
use dom::bindings::reflector::DomObject;
|
use dom::bindings::reflector::DomObject;
|
||||||
use dom::bindings::root::{MutNullableJS, Root};
|
use dom::bindings::root::{MutNullableDom, Root};
|
||||||
use dom::bindings::str::DOMString;
|
use dom::bindings::str::DOMString;
|
||||||
use dom::document::Document;
|
use dom::document::Document;
|
||||||
use dom::element::{Element, AttributeMutation};
|
use dom::element::{Element, AttributeMutation};
|
||||||
|
@ -66,7 +66,7 @@ pub struct HTMLMediaElement {
|
||||||
/// Reset to false every time the load algorithm is invoked.
|
/// Reset to false every time the load algorithm is invoked.
|
||||||
fired_loadeddata_event: Cell<bool>,
|
fired_loadeddata_event: Cell<bool>,
|
||||||
/// https://html.spec.whatwg.org/multipage/#dom-media-error
|
/// https://html.spec.whatwg.org/multipage/#dom-media-error
|
||||||
error: MutNullableJS<MediaError>,
|
error: MutNullableDom<MediaError>,
|
||||||
/// https://html.spec.whatwg.org/multipage/#dom-media-paused
|
/// https://html.spec.whatwg.org/multipage/#dom-media-paused
|
||||||
paused: Cell<bool>,
|
paused: Cell<bool>,
|
||||||
/// https://html.spec.whatwg.org/multipage/#attr-media-autoplay
|
/// https://html.spec.whatwg.org/multipage/#attr-media-autoplay
|
||||||
|
|
|
@ -8,7 +8,7 @@ use dom::bindings::codegen::Bindings::HTMLMetaElementBinding;
|
||||||
use dom::bindings::codegen::Bindings::HTMLMetaElementBinding::HTMLMetaElementMethods;
|
use dom::bindings::codegen::Bindings::HTMLMetaElementBinding::HTMLMetaElementMethods;
|
||||||
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
|
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
|
||||||
use dom::bindings::inheritance::Castable;
|
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::bindings::str::DOMString;
|
||||||
use dom::cssstylesheet::CSSStyleSheet;
|
use dom::cssstylesheet::CSSStyleSheet;
|
||||||
use dom::document::Document;
|
use dom::document::Document;
|
||||||
|
@ -34,7 +34,7 @@ pub struct HTMLMetaElement {
|
||||||
htmlelement: HTMLElement,
|
htmlelement: HTMLElement,
|
||||||
#[ignore_heap_size_of = "Arc"]
|
#[ignore_heap_size_of = "Arc"]
|
||||||
stylesheet: DOMRefCell<Option<Arc<Stylesheet>>>,
|
stylesheet: DOMRefCell<Option<Arc<Stylesheet>>>,
|
||||||
cssom_stylesheet: MutNullableJS<CSSStyleSheet>,
|
cssom_stylesheet: MutNullableDom<CSSStyleSheet>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLMetaElement {
|
impl HTMLMetaElement {
|
||||||
|
@ -44,7 +44,7 @@ impl HTMLMetaElement {
|
||||||
HTMLMetaElement {
|
HTMLMetaElement {
|
||||||
htmlelement: HTMLElement::new_inherited(local_name, prefix, document),
|
htmlelement: HTMLElement::new_inherited(local_name, prefix, document),
|
||||||
stylesheet: DOMRefCell::new(None),
|
stylesheet: DOMRefCell::new(None),
|
||||||
cssom_stylesheet: MutNullableJS::new(None),
|
cssom_stylesheet: MutNullableDom::new(None),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ use dom::bindings::cell::DOMRefCell;
|
||||||
use dom::bindings::codegen::Bindings::HTMLObjectElementBinding;
|
use dom::bindings::codegen::Bindings::HTMLObjectElementBinding;
|
||||||
use dom::bindings::codegen::Bindings::HTMLObjectElementBinding::HTMLObjectElementMethods;
|
use dom::bindings::codegen::Bindings::HTMLObjectElementBinding::HTMLObjectElementMethods;
|
||||||
use dom::bindings::inheritance::Castable;
|
use dom::bindings::inheritance::Castable;
|
||||||
use dom::bindings::root::{MutNullableJS, Root};
|
use dom::bindings::root::{MutNullableDom, Root};
|
||||||
use dom::bindings::str::DOMString;
|
use dom::bindings::str::DOMString;
|
||||||
use dom::document::Document;
|
use dom::document::Document;
|
||||||
use dom::element::{AttributeMutation, Element};
|
use dom::element::{AttributeMutation, Element};
|
||||||
|
@ -28,7 +28,7 @@ pub struct HTMLObjectElement {
|
||||||
htmlelement: HTMLElement,
|
htmlelement: HTMLElement,
|
||||||
#[ignore_heap_size_of = "Arc"]
|
#[ignore_heap_size_of = "Arc"]
|
||||||
image: DOMRefCell<Option<Arc<Image>>>,
|
image: DOMRefCell<Option<Arc<Image>>>,
|
||||||
form_owner: MutNullableJS<HTMLFormElement>,
|
form_owner: MutNullableDom<HTMLFormElement>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLObjectElement {
|
impl HTMLObjectElement {
|
||||||
|
|
|
@ -6,7 +6,7 @@ use dom::attr::Attr;
|
||||||
use dom::bindings::codegen::Bindings::HTMLOutputElementBinding;
|
use dom::bindings::codegen::Bindings::HTMLOutputElementBinding;
|
||||||
use dom::bindings::codegen::Bindings::HTMLOutputElementBinding::HTMLOutputElementMethods;
|
use dom::bindings::codegen::Bindings::HTMLOutputElementBinding::HTMLOutputElementMethods;
|
||||||
use dom::bindings::inheritance::Castable;
|
use dom::bindings::inheritance::Castable;
|
||||||
use dom::bindings::root::{MutNullableJS, Root};
|
use dom::bindings::root::{MutNullableDom, Root};
|
||||||
use dom::document::Document;
|
use dom::document::Document;
|
||||||
use dom::element::{AttributeMutation, Element};
|
use dom::element::{AttributeMutation, Element};
|
||||||
use dom::htmlelement::HTMLElement;
|
use dom::htmlelement::HTMLElement;
|
||||||
|
@ -21,7 +21,7 @@ use html5ever::{LocalName, Prefix};
|
||||||
#[dom_struct]
|
#[dom_struct]
|
||||||
pub struct HTMLOutputElement {
|
pub struct HTMLOutputElement {
|
||||||
htmlelement: HTMLElement,
|
htmlelement: HTMLElement,
|
||||||
form_owner: MutNullableJS<HTMLFormElement>,
|
form_owner: MutNullableDom<HTMLFormElement>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLOutputElement {
|
impl HTMLOutputElement {
|
||||||
|
|
|
@ -14,7 +14,7 @@ use dom::bindings::codegen::UnionTypes::HTMLElementOrLong;
|
||||||
use dom::bindings::codegen::UnionTypes::HTMLOptionElementOrHTMLOptGroupElement;
|
use dom::bindings::codegen::UnionTypes::HTMLOptionElementOrHTMLOptGroupElement;
|
||||||
//use dom::bindings::error::ErrorResult;
|
//use dom::bindings::error::ErrorResult;
|
||||||
use dom::bindings::inheritance::Castable;
|
use dom::bindings::inheritance::Castable;
|
||||||
use dom::bindings::root::{MutNullableJS, Root};
|
use dom::bindings::root::{MutNullableDom, Root};
|
||||||
use dom::bindings::str::DOMString;
|
use dom::bindings::str::DOMString;
|
||||||
use dom::document::Document;
|
use dom::document::Document;
|
||||||
use dom::element::{AttributeMutation, Element};
|
use dom::element::{AttributeMutation, Element};
|
||||||
|
@ -61,8 +61,8 @@ impl CollectionFilter for OptionsFilter {
|
||||||
#[dom_struct]
|
#[dom_struct]
|
||||||
pub struct HTMLSelectElement {
|
pub struct HTMLSelectElement {
|
||||||
htmlelement: HTMLElement,
|
htmlelement: HTMLElement,
|
||||||
options: MutNullableJS<HTMLOptionsCollection>,
|
options: MutNullableDom<HTMLOptionsCollection>,
|
||||||
form_owner: MutNullableJS<HTMLFormElement>,
|
form_owner: MutNullableDom<HTMLFormElement>,
|
||||||
}
|
}
|
||||||
|
|
||||||
static DEFAULT_SELECT_SIZE: u32 = 0;
|
static DEFAULT_SELECT_SIZE: u32 = 0;
|
||||||
|
|
|
@ -8,7 +8,7 @@ use dom::bindings::codegen::Bindings::HTMLStyleElementBinding;
|
||||||
use dom::bindings::codegen::Bindings::HTMLStyleElementBinding::HTMLStyleElementMethods;
|
use dom::bindings::codegen::Bindings::HTMLStyleElementBinding::HTMLStyleElementMethods;
|
||||||
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
|
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
|
||||||
use dom::bindings::inheritance::Castable;
|
use dom::bindings::inheritance::Castable;
|
||||||
use dom::bindings::root::{MutNullableJS, Root};
|
use dom::bindings::root::{MutNullableDom, Root};
|
||||||
use dom::cssstylesheet::CSSStyleSheet;
|
use dom::cssstylesheet::CSSStyleSheet;
|
||||||
use dom::document::Document;
|
use dom::document::Document;
|
||||||
use dom::element::{Element, ElementCreator};
|
use dom::element::{Element, ElementCreator};
|
||||||
|
@ -33,7 +33,7 @@ pub struct HTMLStyleElement {
|
||||||
htmlelement: HTMLElement,
|
htmlelement: HTMLElement,
|
||||||
#[ignore_heap_size_of = "Arc"]
|
#[ignore_heap_size_of = "Arc"]
|
||||||
stylesheet: DOMRefCell<Option<Arc<Stylesheet>>>,
|
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
|
/// https://html.spec.whatwg.org/multipage/#a-style-sheet-that-is-blocking-scripts
|
||||||
parser_inserted: Cell<bool>,
|
parser_inserted: Cell<bool>,
|
||||||
in_stack_of_open_elements: Cell<bool>,
|
in_stack_of_open_elements: Cell<bool>,
|
||||||
|
@ -50,7 +50,7 @@ impl HTMLStyleElement {
|
||||||
HTMLStyleElement {
|
HTMLStyleElement {
|
||||||
htmlelement: HTMLElement::new_inherited(local_name, prefix, document),
|
htmlelement: HTMLElement::new_inherited(local_name, prefix, document),
|
||||||
stylesheet: DOMRefCell::new(None),
|
stylesheet: DOMRefCell::new(None),
|
||||||
cssom_stylesheet: MutNullableJS::new(None),
|
cssom_stylesheet: MutNullableDom::new(None),
|
||||||
parser_inserted: Cell::new(creator.is_parser_created()),
|
parser_inserted: Cell::new(creator.is_parser_created()),
|
||||||
in_stack_of_open_elements: Cell::new(creator.is_parser_created()),
|
in_stack_of_open_elements: Cell::new(creator.is_parser_created()),
|
||||||
pending_loads: Cell::new(0),
|
pending_loads: Cell::new(0),
|
||||||
|
|
|
@ -10,7 +10,7 @@ use dom::bindings::codegen::Bindings::HTMLTableElementBinding::HTMLTableElementM
|
||||||
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
|
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
|
||||||
use dom::bindings::error::{Error, ErrorResult, Fallible};
|
use dom::bindings::error::{Error, ErrorResult, Fallible};
|
||||||
use dom::bindings::inheritance::Castable;
|
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::bindings::str::DOMString;
|
||||||
use dom::document::Document;
|
use dom::document::Document;
|
||||||
use dom::element::{AttributeMutation, Element, RawLayoutElementHelpers};
|
use dom::element::{AttributeMutation, Element, RawLayoutElementHelpers};
|
||||||
|
@ -32,7 +32,7 @@ pub struct HTMLTableElement {
|
||||||
htmlelement: HTMLElement,
|
htmlelement: HTMLElement,
|
||||||
border: Cell<Option<u32>>,
|
border: Cell<Option<u32>>,
|
||||||
cellspacing: Cell<Option<u32>>,
|
cellspacing: Cell<Option<u32>>,
|
||||||
tbodies: MutNullableJS<HTMLCollection>,
|
tbodies: MutNullableDom<HTMLCollection>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
|
|
|
@ -9,7 +9,7 @@ use dom::bindings::codegen::Bindings::HTMLTableSectionElementBinding::HTMLTableS
|
||||||
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
|
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
|
||||||
use dom::bindings::error::{ErrorResult, Fallible};
|
use dom::bindings::error::{ErrorResult, Fallible};
|
||||||
use dom::bindings::inheritance::Castable;
|
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::bindings::str::DOMString;
|
||||||
use dom::document::Document;
|
use dom::document::Document;
|
||||||
use dom::element::{Element, RawLayoutElementHelpers};
|
use dom::element::{Element, RawLayoutElementHelpers};
|
||||||
|
@ -37,7 +37,7 @@ impl CollectionFilter for CellsFilter {
|
||||||
#[dom_struct]
|
#[dom_struct]
|
||||||
pub struct HTMLTableRowElement {
|
pub struct HTMLTableRowElement {
|
||||||
htmlelement: HTMLElement,
|
htmlelement: HTMLElement,
|
||||||
cells: MutNullableJS<HTMLCollection>,
|
cells: MutNullableDom<HTMLCollection>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLTableRowElement {
|
impl HTMLTableRowElement {
|
||||||
|
|
|
@ -7,7 +7,7 @@ use dom::bindings::codegen::Bindings::HTMLTemplateElementBinding;
|
||||||
use dom::bindings::codegen::Bindings::HTMLTemplateElementBinding::HTMLTemplateElementMethods;
|
use dom::bindings::codegen::Bindings::HTMLTemplateElementBinding::HTMLTemplateElementMethods;
|
||||||
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
|
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
|
||||||
use dom::bindings::inheritance::Castable;
|
use dom::bindings::inheritance::Castable;
|
||||||
use dom::bindings::root::{MutNullableJS, Root};
|
use dom::bindings::root::{MutNullableDom, Root};
|
||||||
use dom::document::Document;
|
use dom::document::Document;
|
||||||
use dom::documentfragment::DocumentFragment;
|
use dom::documentfragment::DocumentFragment;
|
||||||
use dom::htmlelement::HTMLElement;
|
use dom::htmlelement::HTMLElement;
|
||||||
|
@ -21,7 +21,7 @@ pub struct HTMLTemplateElement {
|
||||||
htmlelement: HTMLElement,
|
htmlelement: HTMLElement,
|
||||||
|
|
||||||
/// https://html.spec.whatwg.org/multipage/#template-contents
|
/// https://html.spec.whatwg.org/multipage/#template-contents
|
||||||
contents: MutNullableJS<DocumentFragment>,
|
contents: MutNullableDom<DocumentFragment>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLTemplateElement {
|
impl HTMLTemplateElement {
|
||||||
|
@ -31,7 +31,7 @@ impl HTMLTemplateElement {
|
||||||
HTMLTemplateElement {
|
HTMLTemplateElement {
|
||||||
htmlelement:
|
htmlelement:
|
||||||
HTMLElement::new_inherited(local_name, prefix, document),
|
HTMLElement::new_inherited(local_name, prefix, document),
|
||||||
contents: MutNullableJS::new(None),
|
contents: MutNullableDom::new(None),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ use dom::bindings::codegen::Bindings::HTMLTextAreaElementBinding;
|
||||||
use dom::bindings::codegen::Bindings::HTMLTextAreaElementBinding::HTMLTextAreaElementMethods;
|
use dom::bindings::codegen::Bindings::HTMLTextAreaElementBinding::HTMLTextAreaElementMethods;
|
||||||
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
|
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
|
||||||
use dom::bindings::inheritance::Castable;
|
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::bindings::str::DOMString;
|
||||||
use dom::document::Document;
|
use dom::document::Document;
|
||||||
use dom::element::{AttributeMutation, Element};
|
use dom::element::{AttributeMutation, Element};
|
||||||
|
@ -43,7 +43,7 @@ pub struct HTMLTextAreaElement {
|
||||||
placeholder: DOMRefCell<DOMString>,
|
placeholder: DOMRefCell<DOMString>,
|
||||||
// https://html.spec.whatwg.org/multipage/#concept-textarea-dirty
|
// https://html.spec.whatwg.org/multipage/#concept-textarea-dirty
|
||||||
value_changed: Cell<bool>,
|
value_changed: Cell<bool>,
|
||||||
form_owner: MutNullableJS<HTMLFormElement>,
|
form_owner: MutNullableDom<HTMLFormElement>,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait LayoutHTMLTextAreaElementHelpers {
|
pub trait LayoutHTMLTextAreaElementHelpers {
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
//! * rooting pointers on the stack:
|
//! * rooting pointers on the stack:
|
||||||
//! the [`Root`](bindings/root/struct.Root.html) smart pointer;
|
//! the [`Root`](bindings/root/struct.Root.html) smart pointer;
|
||||||
//! * tracing pointers in member fields: the [`Dom`](bindings/root/struct.Dom.html),
|
//! * 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
|
//! [`MutDom`](bindings/root/struct.MutDom.html) smart pointers and
|
||||||
//! [the tracing implementation](bindings/trace/index.html);
|
//! [the tracing implementation](bindings/trace/index.html);
|
||||||
//! * rooting pointers from across thread boundaries or in channels: the
|
//! * rooting pointers from across thread boundaries or in channels: the
|
||||||
|
|
|
@ -8,7 +8,7 @@ use dom::bindings::codegen::Bindings::UIEventBinding::UIEventMethods;
|
||||||
use dom::bindings::error::Fallible;
|
use dom::bindings::error::Fallible;
|
||||||
use dom::bindings::inheritance::Castable;
|
use dom::bindings::inheritance::Castable;
|
||||||
use dom::bindings::reflector::reflect_dom_object;
|
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::bindings::str::DOMString;
|
||||||
use dom::event::{Event, EventBubbles, EventCancelable};
|
use dom::event::{Event, EventBubbles, EventCancelable};
|
||||||
use dom::eventtarget::EventTarget;
|
use dom::eventtarget::EventTarget;
|
||||||
|
@ -31,7 +31,7 @@ pub struct MouseEvent {
|
||||||
alt_key: Cell<bool>,
|
alt_key: Cell<bool>,
|
||||||
meta_key: Cell<bool>,
|
meta_key: Cell<bool>,
|
||||||
button: Cell<i16>,
|
button: Cell<i16>,
|
||||||
related_target: MutNullableJS<EventTarget>,
|
related_target: MutNullableDom<EventTarget>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl MouseEvent {
|
impl MouseEvent {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
use dom::bindings::codegen::Bindings::MutationRecordBinding::MutationRecordBinding;
|
use dom::bindings::codegen::Bindings::MutationRecordBinding::MutationRecordBinding;
|
||||||
use dom::bindings::codegen::Bindings::MutationRecordBinding::MutationRecordBinding::MutationRecordMethods;
|
use dom::bindings::codegen::Bindings::MutationRecordBinding::MutationRecordBinding::MutationRecordMethods;
|
||||||
use dom::bindings::reflector::{Reflector, reflect_dom_object};
|
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::bindings::str::DOMString;
|
||||||
use dom::node::{Node, window_from_node};
|
use dom::node::{Node, window_from_node};
|
||||||
use dom::nodelist::NodeList;
|
use dom::nodelist::NodeList;
|
||||||
|
@ -20,8 +20,8 @@ pub struct MutationRecord {
|
||||||
attribute_name: Option<DOMString>,
|
attribute_name: Option<DOMString>,
|
||||||
attribute_namespace: Option<DOMString>,
|
attribute_namespace: Option<DOMString>,
|
||||||
old_value: Option<DOMString>,
|
old_value: Option<DOMString>,
|
||||||
added_nodes: MutNullableJS<NodeList>,
|
added_nodes: MutNullableDom<NodeList>,
|
||||||
removed_nodes: MutNullableJS<NodeList>,
|
removed_nodes: MutNullableDom<NodeList>,
|
||||||
next_sibling: Option<Dom<Node>>,
|
next_sibling: Option<Dom<Node>>,
|
||||||
prev_sibling: Option<Dom<Node>>,
|
prev_sibling: Option<Dom<Node>>,
|
||||||
}
|
}
|
||||||
|
@ -77,8 +77,8 @@ impl MutationRecord {
|
||||||
attribute_name: attribute_name,
|
attribute_name: attribute_name,
|
||||||
attribute_namespace: attribute_namespace,
|
attribute_namespace: attribute_namespace,
|
||||||
old_value: old_value,
|
old_value: old_value,
|
||||||
added_nodes: MutNullableJS::new(added_nodes),
|
added_nodes: MutNullableDom::new(added_nodes),
|
||||||
removed_nodes: MutNullableJS::new(removed_nodes),
|
removed_nodes: MutNullableDom::new(removed_nodes),
|
||||||
next_sibling: next_sibling.map(Dom::from_ref),
|
next_sibling: next_sibling.map(Dom::from_ref),
|
||||||
prev_sibling: prev_sibling.map(Dom::from_ref),
|
prev_sibling: prev_sibling.map(Dom::from_ref),
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ use dom::bindings::codegen::Bindings::NavigatorBinding;
|
||||||
use dom::bindings::codegen::Bindings::NavigatorBinding::NavigatorMethods;
|
use dom::bindings::codegen::Bindings::NavigatorBinding::NavigatorMethods;
|
||||||
use dom::bindings::codegen::Bindings::VRBinding::VRBinding::VRMethods;
|
use dom::bindings::codegen::Bindings::VRBinding::VRBinding::VRMethods;
|
||||||
use dom::bindings::reflector::{Reflector, DomObject, reflect_dom_object};
|
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::bindings::str::DOMString;
|
||||||
use dom::bluetooth::Bluetooth;
|
use dom::bluetooth::Bluetooth;
|
||||||
use dom::gamepadlist::GamepadList;
|
use dom::gamepadlist::GamepadList;
|
||||||
|
@ -24,13 +24,13 @@ use std::rc::Rc;
|
||||||
#[dom_struct]
|
#[dom_struct]
|
||||||
pub struct Navigator {
|
pub struct Navigator {
|
||||||
reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
bluetooth: MutNullableJS<Bluetooth>,
|
bluetooth: MutNullableDom<Bluetooth>,
|
||||||
plugins: MutNullableJS<PluginArray>,
|
plugins: MutNullableDom<PluginArray>,
|
||||||
mime_types: MutNullableJS<MimeTypeArray>,
|
mime_types: MutNullableDom<MimeTypeArray>,
|
||||||
service_worker: MutNullableJS<ServiceWorkerContainer>,
|
service_worker: MutNullableDom<ServiceWorkerContainer>,
|
||||||
vr: MutNullableJS<VR>,
|
vr: MutNullableDom<VR>,
|
||||||
gamepads: MutNullableJS<GamepadList>,
|
gamepads: MutNullableDom<GamepadList>,
|
||||||
permissions: MutNullableJS<Permissions>,
|
permissions: MutNullableDom<Permissions>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Navigator {
|
impl Navigator {
|
||||||
|
|
|
@ -23,7 +23,7 @@ use dom::bindings::inheritance::{Castable, CharacterDataTypeId, ElementTypeId};
|
||||||
use dom::bindings::inheritance::{EventTargetTypeId, HTMLElementTypeId, NodeTypeId};
|
use dom::bindings::inheritance::{EventTargetTypeId, HTMLElementTypeId, NodeTypeId};
|
||||||
use dom::bindings::inheritance::{SVGElementTypeId, SVGGraphicsElementTypeId};
|
use dom::bindings::inheritance::{SVGElementTypeId, SVGGraphicsElementTypeId};
|
||||||
use dom::bindings::reflector::{DomObject, reflect_dom_object};
|
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::str::{DOMString, USVString};
|
||||||
use dom::bindings::xmlname::namespace_from_domstring;
|
use dom::bindings::xmlname::namespace_from_domstring;
|
||||||
use dom::characterdata::{CharacterData, LayoutCharacterDataHelpers};
|
use dom::characterdata::{CharacterData, LayoutCharacterDataHelpers};
|
||||||
|
@ -98,25 +98,25 @@ pub struct Node {
|
||||||
eventtarget: EventTarget,
|
eventtarget: EventTarget,
|
||||||
|
|
||||||
/// The parent of this node.
|
/// The parent of this node.
|
||||||
parent_node: MutNullableJS<Node>,
|
parent_node: MutNullableDom<Node>,
|
||||||
|
|
||||||
/// The first child of this node.
|
/// The first child of this node.
|
||||||
first_child: MutNullableJS<Node>,
|
first_child: MutNullableDom<Node>,
|
||||||
|
|
||||||
/// The last child of this node.
|
/// The last child of this node.
|
||||||
last_child: MutNullableJS<Node>,
|
last_child: MutNullableDom<Node>,
|
||||||
|
|
||||||
/// The next sibling of this node.
|
/// The next sibling of this node.
|
||||||
next_sibling: MutNullableJS<Node>,
|
next_sibling: MutNullableDom<Node>,
|
||||||
|
|
||||||
/// The previous sibling of this node.
|
/// The previous sibling of this node.
|
||||||
prev_sibling: MutNullableJS<Node>,
|
prev_sibling: MutNullableDom<Node>,
|
||||||
|
|
||||||
/// The document that this node belongs to.
|
/// The document that this node belongs to.
|
||||||
owner_doc: MutNullableJS<Document>,
|
owner_doc: MutNullableDom<Document>,
|
||||||
|
|
||||||
/// The live list of children return by .childNodes.
|
/// The live list of children return by .childNodes.
|
||||||
child_list: MutNullableJS<NodeList>,
|
child_list: MutNullableDom<NodeList>,
|
||||||
|
|
||||||
/// The live count of children of this node.
|
/// The live count of children of this node.
|
||||||
children_count: Cell<u32>,
|
children_count: Cell<u32>,
|
||||||
|
@ -1407,7 +1407,7 @@ impl Node {
|
||||||
last_child: Default::default(),
|
last_child: Default::default(),
|
||||||
next_sibling: Default::default(),
|
next_sibling: Default::default(),
|
||||||
prev_sibling: Default::default(),
|
prev_sibling: Default::default(),
|
||||||
owner_doc: MutNullableJS::new(doc),
|
owner_doc: MutNullableDom::new(doc),
|
||||||
child_list: Default::default(),
|
child_list: Default::default(),
|
||||||
children_count: Cell::new(0u32),
|
children_count: Cell::new(0u32),
|
||||||
flags: Cell::new(flags),
|
flags: Cell::new(flags),
|
||||||
|
|
|
@ -6,7 +6,7 @@ use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
|
||||||
use dom::bindings::codegen::Bindings::NodeListBinding;
|
use dom::bindings::codegen::Bindings::NodeListBinding;
|
||||||
use dom::bindings::codegen::Bindings::NodeListBinding::NodeListMethods;
|
use dom::bindings::codegen::Bindings::NodeListBinding::NodeListMethods;
|
||||||
use dom::bindings::reflector::{Reflector, reflect_dom_object};
|
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::node::{ChildrenMutation, Node};
|
||||||
use dom::window::Window;
|
use dom::window::Window;
|
||||||
use dom_struct::dom_struct;
|
use dom_struct::dom_struct;
|
||||||
|
@ -114,7 +114,7 @@ impl NodeList {
|
||||||
pub struct ChildrenList {
|
pub struct ChildrenList {
|
||||||
node: Dom<Node>,
|
node: Dom<Node>,
|
||||||
#[ignore_heap_size_of = "Defined in rust-mozjs"]
|
#[ignore_heap_size_of = "Defined in rust-mozjs"]
|
||||||
last_visited: MutNullableJS<Node>,
|
last_visited: MutNullableDom<Node>,
|
||||||
last_index: Cell<u32>,
|
last_index: Cell<u32>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ impl ChildrenList {
|
||||||
let last_visited = node.GetFirstChild();
|
let last_visited = node.GetFirstChild();
|
||||||
ChildrenList {
|
ChildrenList {
|
||||||
node: Dom::from_ref(node),
|
node: Dom::from_ref(node),
|
||||||
last_visited: MutNullableJS::new(last_visited.r()),
|
last_visited: MutNullableDom::new(last_visited.r()),
|
||||||
last_index: Cell::new(0u32),
|
last_index: Cell::new(0u32),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ use dom::bindings::codegen::Bindings::RequestBinding::RequestRedirect;
|
||||||
use dom::bindings::codegen::Bindings::RequestBinding::RequestType;
|
use dom::bindings::codegen::Bindings::RequestBinding::RequestType;
|
||||||
use dom::bindings::error::{Error, Fallible};
|
use dom::bindings::error::{Error, Fallible};
|
||||||
use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
|
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::str::{ByteString, DOMString, USVString};
|
||||||
use dom::bindings::trace::RootedTraceableBox;
|
use dom::bindings::trace::RootedTraceableBox;
|
||||||
use dom::globalscope::GlobalScope;
|
use dom::globalscope::GlobalScope;
|
||||||
|
@ -46,7 +46,7 @@ pub struct Request {
|
||||||
reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
request: DOMRefCell<NetTraitsRequest>,
|
request: DOMRefCell<NetTraitsRequest>,
|
||||||
body_used: Cell<bool>,
|
body_used: Cell<bool>,
|
||||||
headers: MutNullableJS<Headers>,
|
headers: MutNullableDom<Headers>,
|
||||||
mime_type: DOMRefCell<Vec<u8>>,
|
mime_type: DOMRefCell<Vec<u8>>,
|
||||||
#[ignore_heap_size_of = "Rc"]
|
#[ignore_heap_size_of = "Rc"]
|
||||||
body_promise: DOMRefCell<Option<(Rc<Promise>, BodyType)>>,
|
body_promise: DOMRefCell<Option<(Rc<Promise>, BodyType)>>,
|
||||||
|
|
|
@ -11,7 +11,7 @@ use dom::bindings::codegen::Bindings::ResponseBinding::{ResponseMethods, Respons
|
||||||
use dom::bindings::codegen::Bindings::XMLHttpRequestBinding::BodyInit;
|
use dom::bindings::codegen::Bindings::XMLHttpRequestBinding::BodyInit;
|
||||||
use dom::bindings::error::{Error, Fallible};
|
use dom::bindings::error::{Error, Fallible};
|
||||||
use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
|
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::bindings::str::{ByteString, USVString};
|
||||||
use dom::globalscope::GlobalScope;
|
use dom::globalscope::GlobalScope;
|
||||||
use dom::headers::{Headers, Guard};
|
use dom::headers::{Headers, Guard};
|
||||||
|
@ -33,7 +33,7 @@ use url::Position;
|
||||||
#[dom_struct]
|
#[dom_struct]
|
||||||
pub struct Response {
|
pub struct Response {
|
||||||
reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
headers_reflector: MutNullableJS<Headers>,
|
headers_reflector: MutNullableDom<Headers>,
|
||||||
mime_type: DOMRefCell<Vec<u8>>,
|
mime_type: DOMRefCell<Vec<u8>>,
|
||||||
body_used: Cell<bool>,
|
body_used: Cell<bool>,
|
||||||
/// `None` can be considered a StatusCode of `0`.
|
/// `None` can be considered a StatusCode of `0`.
|
||||||
|
|
|
@ -6,7 +6,7 @@ use dom::bindings::codegen::Bindings::ServiceWorkerContainerBinding::{ServiceWor
|
||||||
use dom::bindings::codegen::Bindings::ServiceWorkerContainerBinding::RegistrationOptions;
|
use dom::bindings::codegen::Bindings::ServiceWorkerContainerBinding::RegistrationOptions;
|
||||||
use dom::bindings::error::Error;
|
use dom::bindings::error::Error;
|
||||||
use dom::bindings::reflector::{DomObject, reflect_dom_object};
|
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::bindings::str::USVString;
|
||||||
use dom::client::Client;
|
use dom::client::Client;
|
||||||
use dom::eventtarget::EventTarget;
|
use dom::eventtarget::EventTarget;
|
||||||
|
@ -23,7 +23,7 @@ use std::rc::Rc;
|
||||||
#[dom_struct]
|
#[dom_struct]
|
||||||
pub struct ServiceWorkerContainer {
|
pub struct ServiceWorkerContainer {
|
||||||
eventtarget: EventTarget,
|
eventtarget: EventTarget,
|
||||||
controller: MutNullableJS<ServiceWorker>,
|
controller: MutNullableDom<ServiceWorker>,
|
||||||
client: Dom<Client>
|
client: Dom<Client>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ use dom::bindings::codegen::Bindings::ServoParserBinding;
|
||||||
use dom::bindings::inheritance::Castable;
|
use dom::bindings::inheritance::Castable;
|
||||||
use dom::bindings::refcounted::Trusted;
|
use dom::bindings::refcounted::Trusted;
|
||||||
use dom::bindings::reflector::{Reflector, reflect_dom_object};
|
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::bindings::str::DOMString;
|
||||||
use dom::characterdata::CharacterData;
|
use dom::characterdata::CharacterData;
|
||||||
use dom::comment::Comment;
|
use dom::comment::Comment;
|
||||||
|
@ -748,7 +748,7 @@ pub struct Sink {
|
||||||
base_url: ServoUrl,
|
base_url: ServoUrl,
|
||||||
document: Dom<Document>,
|
document: Dom<Document>,
|
||||||
current_line: u64,
|
current_line: u64,
|
||||||
script: MutNullableJS<HTMLScriptElement>,
|
script: MutNullableDom<HTMLScriptElement>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)] // FIXME: really?
|
#[allow(unrooted_must_root)] // FIXME: really?
|
||||||
|
|
|
@ -8,7 +8,7 @@ use dom::bindings::codegen::Bindings::StorageEventBinding::StorageEventMethods;
|
||||||
use dom::bindings::error::Fallible;
|
use dom::bindings::error::Fallible;
|
||||||
use dom::bindings::inheritance::Castable;
|
use dom::bindings::inheritance::Castable;
|
||||||
use dom::bindings::reflector::reflect_dom_object;
|
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::bindings::str::DOMString;
|
||||||
use dom::event::{Event, EventBubbles, EventCancelable};
|
use dom::event::{Event, EventBubbles, EventCancelable};
|
||||||
use dom::storage::Storage;
|
use dom::storage::Storage;
|
||||||
|
@ -23,7 +23,7 @@ pub struct StorageEvent {
|
||||||
old_value: Option<DOMString>,
|
old_value: Option<DOMString>,
|
||||||
new_value: Option<DOMString>,
|
new_value: Option<DOMString>,
|
||||||
url: DOMString,
|
url: DOMString,
|
||||||
storage_area: MutNullableJS<Storage>
|
storage_area: MutNullableDom<Storage>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ impl StorageEvent {
|
||||||
old_value: old_value,
|
old_value: old_value,
|
||||||
new_value: new_value,
|
new_value: new_value,
|
||||||
url: url,
|
url: url,
|
||||||
storage_area: MutNullableJS::new(storage_area)
|
storage_area: MutNullableDom::new(storage_area)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ use dom::bindings::codegen::Bindings::UIEventBinding::UIEventMethods;
|
||||||
use dom::bindings::error::Fallible;
|
use dom::bindings::error::Fallible;
|
||||||
use dom::bindings::inheritance::Castable;
|
use dom::bindings::inheritance::Castable;
|
||||||
use dom::bindings::reflector::reflect_dom_object;
|
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::bindings::str::DOMString;
|
||||||
use dom::event::{Event, EventBubbles, EventCancelable};
|
use dom::event::{Event, EventBubbles, EventCancelable};
|
||||||
use dom::window::Window;
|
use dom::window::Window;
|
||||||
|
@ -21,7 +21,7 @@ use std::default::Default;
|
||||||
#[dom_struct]
|
#[dom_struct]
|
||||||
pub struct UIEvent {
|
pub struct UIEvent {
|
||||||
event: Event,
|
event: Event,
|
||||||
view: MutNullableJS<Window>,
|
view: MutNullableDom<Window>,
|
||||||
detail: Cell<i32>
|
detail: Cell<i32>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ use dom::bindings::cell::DOMRefCell;
|
||||||
use dom::bindings::codegen::Bindings::URLBinding::{self, URLMethods};
|
use dom::bindings::codegen::Bindings::URLBinding::{self, URLMethods};
|
||||||
use dom::bindings::error::{Error, ErrorResult, Fallible};
|
use dom::bindings::error::{Error, ErrorResult, Fallible};
|
||||||
use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
|
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::bindings::str::{DOMString, USVString};
|
||||||
use dom::blob::Blob;
|
use dom::blob::Blob;
|
||||||
use dom::globalscope::GlobalScope;
|
use dom::globalscope::GlobalScope;
|
||||||
|
@ -30,7 +30,7 @@ pub struct URL {
|
||||||
url: DOMRefCell<ServoUrl>,
|
url: DOMRefCell<ServoUrl>,
|
||||||
|
|
||||||
// https://url.spec.whatwg.org/#dom-url-searchparams
|
// https://url.spec.whatwg.org/#dom-url-searchparams
|
||||||
search_params: MutNullableJS<URLSearchParams>,
|
search_params: MutNullableDom<URLSearchParams>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl URL {
|
impl URL {
|
||||||
|
|
|
@ -18,7 +18,7 @@ use dom::bindings::inheritance::Castable;
|
||||||
use dom::bindings::num::Finite;
|
use dom::bindings::num::Finite;
|
||||||
use dom::bindings::refcounted::Trusted;
|
use dom::bindings::refcounted::Trusted;
|
||||||
use dom::bindings::reflector::{DomObject, reflect_dom_object};
|
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::bindings::str::DOMString;
|
||||||
use dom::event::Event;
|
use dom::event::Event;
|
||||||
use dom::eventtarget::EventTarget;
|
use dom::eventtarget::EventTarget;
|
||||||
|
@ -54,12 +54,12 @@ pub struct VRDisplay {
|
||||||
left_eye_params: MutDom<VREyeParameters>,
|
left_eye_params: MutDom<VREyeParameters>,
|
||||||
right_eye_params: MutDom<VREyeParameters>,
|
right_eye_params: MutDom<VREyeParameters>,
|
||||||
capabilities: MutDom<VRDisplayCapabilities>,
|
capabilities: MutDom<VRDisplayCapabilities>,
|
||||||
stage_params: MutNullableJS<VRStageParameters>,
|
stage_params: MutNullableDom<VRStageParameters>,
|
||||||
#[ignore_heap_size_of = "Defined in rust-webvr"]
|
#[ignore_heap_size_of = "Defined in rust-webvr"]
|
||||||
frame_data: DOMRefCell<WebVRFrameData>,
|
frame_data: DOMRefCell<WebVRFrameData>,
|
||||||
#[ignore_heap_size_of = "Defined in rust-webvr"]
|
#[ignore_heap_size_of = "Defined in rust-webvr"]
|
||||||
layer: DOMRefCell<WebVRLayer>,
|
layer: DOMRefCell<WebVRLayer>,
|
||||||
layer_ctx: MutNullableJS<WebGLRenderingContext>,
|
layer_ctx: MutNullableDom<WebGLRenderingContext>,
|
||||||
#[ignore_heap_size_of = "Defined in rust-webvr"]
|
#[ignore_heap_size_of = "Defined in rust-webvr"]
|
||||||
next_raf_id: Cell<u32>,
|
next_raf_id: Cell<u32>,
|
||||||
/// List of request animation frame callbacks
|
/// 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)),
|
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)),
|
right_eye_params: MutDom::new(&*VREyeParameters::new(display.right_eye_parameters.clone(), &global)),
|
||||||
capabilities: MutDom::new(&*VRDisplayCapabilities::new(display.capabilities.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()),
|
frame_data: DOMRefCell::new(Default::default()),
|
||||||
layer: DOMRefCell::new(Default::default()),
|
layer: DOMRefCell::new(Default::default()),
|
||||||
layer_ctx: MutNullableJS::default(),
|
layer_ctx: MutNullableDom::default(),
|
||||||
next_raf_id: Cell::new(1),
|
next_raf_id: Cell::new(1),
|
||||||
raf_callback_list: DOMRefCell::new(vec![]),
|
raf_callback_list: DOMRefCell::new(vec![]),
|
||||||
frame_data_status: Cell::new(VRFrameDataStatus::Waiting),
|
frame_data_status: Cell::new(VRFrameDataStatus::Waiting),
|
||||||
|
|
|
@ -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::{self, OESVertexArrayObjectMethods};
|
||||||
use dom::bindings::codegen::Bindings::OESVertexArrayObjectBinding::OESVertexArrayObjectConstants;
|
use dom::bindings::codegen::Bindings::OESVertexArrayObjectBinding::OESVertexArrayObjectConstants;
|
||||||
use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
|
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::webglrenderingcontext::WebGLRenderingContext;
|
||||||
use dom::webglvertexarrayobjectoes::WebGLVertexArrayObjectOES;
|
use dom::webglvertexarrayobjectoes::WebGLVertexArrayObjectOES;
|
||||||
use dom_struct::dom_struct;
|
use dom_struct::dom_struct;
|
||||||
|
@ -20,7 +20,7 @@ use super::{WebGLExtension, WebGLExtensions};
|
||||||
pub struct OESVertexArrayObject {
|
pub struct OESVertexArrayObject {
|
||||||
reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
ctx: Dom<WebGLRenderingContext>,
|
ctx: Dom<WebGLRenderingContext>,
|
||||||
bound_vao: MutNullableJS<WebGLVertexArrayObjectOES>,
|
bound_vao: MutNullableDom<WebGLVertexArrayObjectOES>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl OESVertexArrayObject {
|
impl OESVertexArrayObject {
|
||||||
|
@ -28,7 +28,7 @@ impl OESVertexArrayObject {
|
||||||
Self {
|
Self {
|
||||||
reflector_: Reflector::new(),
|
reflector_: Reflector::new(),
|
||||||
ctx: Dom::from_ref(ctx),
|
ctx: Dom::from_ref(ctx),
|
||||||
bound_vao: MutNullableJS::new(None)
|
bound_vao: MutNullableDom::new(None)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ use core::iter::FromIterator;
|
||||||
use dom::bindings::cell::DOMRefCell;
|
use dom::bindings::cell::DOMRefCell;
|
||||||
use dom::bindings::codegen::Bindings::WebGLVertexArrayObjectOESBinding;
|
use dom::bindings::codegen::Bindings::WebGLVertexArrayObjectOESBinding;
|
||||||
use dom::bindings::reflector::reflect_dom_object;
|
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::globalscope::GlobalScope;
|
||||||
use dom::webglbuffer::WebGLBuffer;
|
use dom::webglbuffer::WebGLBuffer;
|
||||||
use dom::webglobject::WebGLObject;
|
use dom::webglobject::WebGLObject;
|
||||||
|
@ -23,7 +23,7 @@ pub struct WebGLVertexArrayObjectOES {
|
||||||
ever_bound: Cell<bool>,
|
ever_bound: Cell<bool>,
|
||||||
is_deleted: Cell<bool>,
|
is_deleted: Cell<bool>,
|
||||||
bound_attrib_buffers: DOMRefCell<HashMap<u32, Dom<WebGLBuffer>>>,
|
bound_attrib_buffers: DOMRefCell<HashMap<u32, Dom<WebGLBuffer>>>,
|
||||||
bound_buffer_element_array: MutNullableJS<WebGLBuffer>,
|
bound_buffer_element_array: MutNullableDom<WebGLBuffer>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl WebGLVertexArrayObjectOES {
|
impl WebGLVertexArrayObjectOES {
|
||||||
|
@ -34,7 +34,7 @@ impl WebGLVertexArrayObjectOES {
|
||||||
ever_bound: Cell::new(false),
|
ever_bound: Cell::new(false),
|
||||||
is_deleted: Cell::new(false),
|
is_deleted: Cell::new(false),
|
||||||
bound_attrib_buffers: DOMRefCell::new(HashMap::new()),
|
bound_attrib_buffers: DOMRefCell::new(HashMap::new()),
|
||||||
bound_buffer_element_array: MutNullableJS::new(None),
|
bound_buffer_element_array: MutNullableDom::new(None),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
use core::nonzero::NonZero;
|
use core::nonzero::NonZero;
|
||||||
use dom::bindings::reflector::DomObject;
|
use dom::bindings::reflector::DomObject;
|
||||||
use dom::bindings::root::{MutNullableJS, Root};
|
use dom::bindings::root::{MutNullableDom, Root};
|
||||||
use dom::bindings::trace::JSTraceable;
|
use dom::bindings::trace::JSTraceable;
|
||||||
use dom::webglrenderingcontext::WebGLRenderingContext;
|
use dom::webglrenderingcontext::WebGLRenderingContext;
|
||||||
use heapsize::HeapSizeOf;
|
use heapsize::HeapSizeOf;
|
||||||
|
@ -29,15 +29,15 @@ pub trait WebGLExtensionWrapper: JSTraceable + HeapSizeOf {
|
||||||
#[must_root]
|
#[must_root]
|
||||||
#[derive(HeapSizeOf, JSTraceable)]
|
#[derive(HeapSizeOf, JSTraceable)]
|
||||||
pub struct TypedWebGLExtensionWrapper<T: WebGLExtension> {
|
pub struct TypedWebGLExtensionWrapper<T: WebGLExtension> {
|
||||||
extension: MutNullableJS<T::Extension>
|
extension: MutNullableDom<T::Extension>
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Typed WebGL Extension implementation.
|
/// 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> {
|
impl<T: WebGLExtension> TypedWebGLExtensionWrapper<T> {
|
||||||
pub fn new() -> TypedWebGLExtensionWrapper<T> {
|
pub fn new() -> TypedWebGLExtensionWrapper<T> {
|
||||||
TypedWebGLExtensionWrapper {
|
TypedWebGLExtensionWrapper {
|
||||||
extension: MutNullableJS::new(None)
|
extension: MutNullableDom::new(None)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ use canvas_traits::webgl::webgl_channel;
|
||||||
use dom::bindings::codegen::Bindings::WebGLProgramBinding;
|
use dom::bindings::codegen::Bindings::WebGLProgramBinding;
|
||||||
use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
|
use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
|
||||||
use dom::bindings::reflector::{DomObject, reflect_dom_object};
|
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::str::DOMString;
|
||||||
use dom::webglactiveinfo::WebGLActiveInfo;
|
use dom::webglactiveinfo::WebGLActiveInfo;
|
||||||
use dom::webglobject::WebGLObject;
|
use dom::webglobject::WebGLObject;
|
||||||
|
@ -25,8 +25,8 @@ pub struct WebGLProgram {
|
||||||
is_deleted: Cell<bool>,
|
is_deleted: Cell<bool>,
|
||||||
link_called: Cell<bool>,
|
link_called: Cell<bool>,
|
||||||
linked: Cell<bool>,
|
linked: Cell<bool>,
|
||||||
fragment_shader: MutNullableJS<WebGLShader>,
|
fragment_shader: MutNullableDom<WebGLShader>,
|
||||||
vertex_shader: MutNullableJS<WebGLShader>,
|
vertex_shader: MutNullableDom<WebGLShader>,
|
||||||
#[ignore_heap_size_of = "Defined in ipc-channel"]
|
#[ignore_heap_size_of = "Defined in ipc-channel"]
|
||||||
renderer: WebGLMsgSender,
|
renderer: WebGLMsgSender,
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ use dom::bindings::conversions::{ConversionResult, FromJSValConvertible, ToJSVal
|
||||||
use dom::bindings::error::{Error, Fallible};
|
use dom::bindings::error::{Error, Fallible};
|
||||||
use dom::bindings::inheritance::Castable;
|
use dom::bindings::inheritance::Castable;
|
||||||
use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
|
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::bindings::str::DOMString;
|
||||||
use dom::event::{Event, EventBubbles, EventCancelable};
|
use dom::event::{Event, EventBubbles, EventCancelable};
|
||||||
use dom::htmlcanvaselement::HTMLCanvasElement;
|
use dom::htmlcanvaselement::HTMLCanvasElement;
|
||||||
|
@ -145,14 +145,14 @@ pub struct WebGLRenderingContext {
|
||||||
last_error: Cell<Option<WebGLError>>,
|
last_error: Cell<Option<WebGLError>>,
|
||||||
texture_unpacking_settings: Cell<TextureUnpacking>,
|
texture_unpacking_settings: Cell<TextureUnpacking>,
|
||||||
texture_unpacking_alignment: Cell<u32>,
|
texture_unpacking_alignment: Cell<u32>,
|
||||||
bound_framebuffer: MutNullableJS<WebGLFramebuffer>,
|
bound_framebuffer: MutNullableDom<WebGLFramebuffer>,
|
||||||
bound_renderbuffer: MutNullableJS<WebGLRenderbuffer>,
|
bound_renderbuffer: MutNullableDom<WebGLRenderbuffer>,
|
||||||
bound_texture_2d: MutNullableJS<WebGLTexture>,
|
bound_texture_2d: MutNullableDom<WebGLTexture>,
|
||||||
bound_texture_cube_map: MutNullableJS<WebGLTexture>,
|
bound_texture_cube_map: MutNullableDom<WebGLTexture>,
|
||||||
bound_buffer_array: MutNullableJS<WebGLBuffer>,
|
bound_buffer_array: MutNullableDom<WebGLBuffer>,
|
||||||
bound_buffer_element_array: MutNullableJS<WebGLBuffer>,
|
bound_buffer_element_array: MutNullableDom<WebGLBuffer>,
|
||||||
bound_attrib_buffers: DOMRefCell<FnvHashMap<u32, Dom<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"]
|
#[ignore_heap_size_of = "Because it's small"]
|
||||||
current_vertex_attrib_0: Cell<(f32, f32, f32, f32)>,
|
current_vertex_attrib_0: Cell<(f32, f32, f32, f32)>,
|
||||||
#[ignore_heap_size_of = "Because it's small"]
|
#[ignore_heap_size_of = "Because it's small"]
|
||||||
|
@ -189,14 +189,14 @@ impl WebGLRenderingContext {
|
||||||
last_error: Cell::new(None),
|
last_error: Cell::new(None),
|
||||||
texture_unpacking_settings: Cell::new(CONVERT_COLORSPACE),
|
texture_unpacking_settings: Cell::new(CONVERT_COLORSPACE),
|
||||||
texture_unpacking_alignment: Cell::new(4),
|
texture_unpacking_alignment: Cell::new(4),
|
||||||
bound_framebuffer: MutNullableJS::new(None),
|
bound_framebuffer: MutNullableDom::new(None),
|
||||||
bound_texture_2d: MutNullableJS::new(None),
|
bound_texture_2d: MutNullableDom::new(None),
|
||||||
bound_texture_cube_map: MutNullableJS::new(None),
|
bound_texture_cube_map: MutNullableDom::new(None),
|
||||||
bound_buffer_array: MutNullableJS::new(None),
|
bound_buffer_array: MutNullableDom::new(None),
|
||||||
bound_buffer_element_array: MutNullableJS::new(None),
|
bound_buffer_element_array: MutNullableDom::new(None),
|
||||||
bound_attrib_buffers: DOMRefCell::new(Default::default()),
|
bound_attrib_buffers: DOMRefCell::new(Default::default()),
|
||||||
bound_renderbuffer: MutNullableJS::new(None),
|
bound_renderbuffer: MutNullableDom::new(None),
|
||||||
current_program: MutNullableJS::new(None),
|
current_program: MutNullableDom::new(None),
|
||||||
current_vertex_attrib_0: Cell::new((0f32, 0f32, 0f32, 1f32)),
|
current_vertex_attrib_0: Cell::new((0f32, 0f32, 0f32, 1f32)),
|
||||||
current_scissor: Cell::new((0, 0, size.width, size.height)),
|
current_scissor: Cell::new((0, 0, size.width, size.height)),
|
||||||
current_clear_color: Cell::new((0.0, 0.0, 0.0, 0.0)),
|
current_clear_color: Cell::new((0.0, 0.0, 0.0, 0.0)),
|
||||||
|
|
|
@ -21,7 +21,7 @@ use dom::bindings::inheritance::Castable;
|
||||||
use dom::bindings::num::Finite;
|
use dom::bindings::num::Finite;
|
||||||
use dom::bindings::refcounted::Trusted;
|
use dom::bindings::refcounted::Trusted;
|
||||||
use dom::bindings::reflector::DomObject;
|
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::str::DOMString;
|
||||||
use dom::bindings::structuredclone::StructuredCloneData;
|
use dom::bindings::structuredclone::StructuredCloneData;
|
||||||
use dom::bindings::trace::RootedTraceableBox;
|
use dom::bindings::trace::RootedTraceableBox;
|
||||||
|
@ -176,22 +176,22 @@ pub struct Window {
|
||||||
file_reading_task_source: FileReadingTaskSource,
|
file_reading_task_source: FileReadingTaskSource,
|
||||||
#[ignore_heap_size_of = "task sources are hard"]
|
#[ignore_heap_size_of = "task sources are hard"]
|
||||||
performance_timeline_task_source: PerformanceTimelineTaskSource,
|
performance_timeline_task_source: PerformanceTimelineTaskSource,
|
||||||
navigator: MutNullableJS<Navigator>,
|
navigator: MutNullableDom<Navigator>,
|
||||||
#[ignore_heap_size_of = "Arc"]
|
#[ignore_heap_size_of = "Arc"]
|
||||||
image_cache: Arc<ImageCache>,
|
image_cache: Arc<ImageCache>,
|
||||||
#[ignore_heap_size_of = "channels are hard"]
|
#[ignore_heap_size_of = "channels are hard"]
|
||||||
image_cache_chan: Sender<ImageCacheMsg>,
|
image_cache_chan: Sender<ImageCacheMsg>,
|
||||||
window_proxy: MutNullableJS<WindowProxy>,
|
window_proxy: MutNullableDom<WindowProxy>,
|
||||||
document: MutNullableJS<Document>,
|
document: MutNullableDom<Document>,
|
||||||
location: MutNullableJS<Location>,
|
location: MutNullableDom<Location>,
|
||||||
history: MutNullableJS<History>,
|
history: MutNullableDom<History>,
|
||||||
custom_element_registry: MutNullableJS<CustomElementRegistry>,
|
custom_element_registry: MutNullableDom<CustomElementRegistry>,
|
||||||
performance: MutNullableJS<Performance>,
|
performance: MutNullableDom<Performance>,
|
||||||
navigation_start: Cell<u64>,
|
navigation_start: Cell<u64>,
|
||||||
navigation_start_precise: Cell<f64>,
|
navigation_start_precise: Cell<f64>,
|
||||||
screen: MutNullableJS<Screen>,
|
screen: MutNullableDom<Screen>,
|
||||||
session_storage: MutNullableJS<Storage>,
|
session_storage: MutNullableDom<Storage>,
|
||||||
local_storage: MutNullableJS<Storage>,
|
local_storage: MutNullableDom<Storage>,
|
||||||
status: DOMRefCell<DOMString>,
|
status: DOMRefCell<DOMString>,
|
||||||
|
|
||||||
/// For sending timeline markers. Will be ignored if
|
/// For sending timeline markers. Will be ignored if
|
||||||
|
@ -263,7 +263,7 @@ pub struct Window {
|
||||||
/// All the MediaQueryLists we need to update
|
/// All the MediaQueryLists we need to update
|
||||||
media_query_lists: WeakMediaQueryListVec,
|
media_query_lists: WeakMediaQueryListVec,
|
||||||
|
|
||||||
test_runner: MutNullableJS<TestRunner>,
|
test_runner: MutNullableDom<TestRunner>,
|
||||||
|
|
||||||
/// A handle for communicating messages to the webvr thread, if available.
|
/// A handle for communicating messages to the webvr thread, if available.
|
||||||
#[ignore_heap_size_of = "channels are hard"]
|
#[ignore_heap_size_of = "channels are hard"]
|
||||||
|
@ -287,9 +287,9 @@ pub struct Window {
|
||||||
unminified_js_dir: DOMRefCell<Option<String>>,
|
unminified_js_dir: DOMRefCell<Option<String>>,
|
||||||
|
|
||||||
/// Worklets
|
/// Worklets
|
||||||
test_worklet: MutNullableJS<Worklet>,
|
test_worklet: MutNullableDom<Worklet>,
|
||||||
/// https://drafts.css-houdini.org/css-paint-api-1/#paint-worklet
|
/// https://drafts.css-houdini.org/css-paint-api-1/#paint-worklet
|
||||||
paint_worklet: MutNullableJS<Worklet>,
|
paint_worklet: MutNullableDom<Worklet>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Window {
|
impl Window {
|
||||||
|
|
|
@ -10,7 +10,7 @@ use dom::bindings::codegen::UnionTypes::RequestOrUSVString;
|
||||||
use dom::bindings::error::{Error, ErrorResult, Fallible, report_pending_exception};
|
use dom::bindings::error::{Error, ErrorResult, Fallible, report_pending_exception};
|
||||||
use dom::bindings::inheritance::Castable;
|
use dom::bindings::inheritance::Castable;
|
||||||
use dom::bindings::reflector::DomObject;
|
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::settings_stack::AutoEntryScript;
|
||||||
use dom::bindings::str::DOMString;
|
use dom::bindings::str::DOMString;
|
||||||
use dom::bindings::trace::RootedTraceableBox;
|
use dom::bindings::trace::RootedTraceableBox;
|
||||||
|
@ -77,8 +77,8 @@ pub struct WorkerGlobalScope {
|
||||||
closing: Option<Arc<AtomicBool>>,
|
closing: Option<Arc<AtomicBool>>,
|
||||||
#[ignore_heap_size_of = "Defined in js"]
|
#[ignore_heap_size_of = "Defined in js"]
|
||||||
runtime: Runtime,
|
runtime: Runtime,
|
||||||
location: MutNullableJS<WorkerLocation>,
|
location: MutNullableDom<WorkerLocation>,
|
||||||
navigator: MutNullableJS<WorkerNavigator>,
|
navigator: MutNullableDom<WorkerNavigator>,
|
||||||
|
|
||||||
#[ignore_heap_size_of = "Defined in ipc-channel"]
|
#[ignore_heap_size_of = "Defined in ipc-channel"]
|
||||||
/// Optional `IpcSender` for sending the `DevtoolScriptControlMsg`
|
/// Optional `IpcSender` for sending the `DevtoolScriptControlMsg`
|
||||||
|
@ -91,7 +91,7 @@ pub struct WorkerGlobalScope {
|
||||||
from_devtools_receiver: Receiver<DevtoolScriptControlMsg>,
|
from_devtools_receiver: Receiver<DevtoolScriptControlMsg>,
|
||||||
|
|
||||||
navigation_start_precise: f64,
|
navigation_start_precise: f64,
|
||||||
performance: MutNullableJS<Performance>,
|
performance: MutNullableDom<Performance>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl WorkerGlobalScope {
|
impl WorkerGlobalScope {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
use dom::bindings::codegen::Bindings::WorkerNavigatorBinding;
|
use dom::bindings::codegen::Bindings::WorkerNavigatorBinding;
|
||||||
use dom::bindings::codegen::Bindings::WorkerNavigatorBinding::WorkerNavigatorMethods;
|
use dom::bindings::codegen::Bindings::WorkerNavigatorBinding::WorkerNavigatorMethods;
|
||||||
use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
|
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::bindings::str::DOMString;
|
||||||
use dom::navigatorinfo;
|
use dom::navigatorinfo;
|
||||||
use dom::permissions::Permissions;
|
use dom::permissions::Permissions;
|
||||||
|
@ -16,7 +16,7 @@ use dom_struct::dom_struct;
|
||||||
#[dom_struct]
|
#[dom_struct]
|
||||||
pub struct WorkerNavigator {
|
pub struct WorkerNavigator {
|
||||||
reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
permissions: MutNullableJS<Permissions>,
|
permissions: MutNullableDom<Permissions>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl WorkerNavigator {
|
impl WorkerNavigator {
|
||||||
|
|
|
@ -16,7 +16,7 @@ use dom::bindings::error::{Error, ErrorResult, Fallible};
|
||||||
use dom::bindings::inheritance::Castable;
|
use dom::bindings::inheritance::Castable;
|
||||||
use dom::bindings::refcounted::Trusted;
|
use dom::bindings::refcounted::Trusted;
|
||||||
use dom::bindings::reflector::{DomObject, reflect_dom_object};
|
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::bindings::str::{ByteString, DOMString, USVString, is_token};
|
||||||
use dom::blob::{Blob, BlobImpl};
|
use dom::blob::{Blob, BlobImpl};
|
||||||
use dom::document::{Document, HasBrowsingContext, IsHTMLDocument};
|
use dom::document::{Document, HasBrowsingContext, IsHTMLDocument};
|
||||||
|
@ -129,8 +129,8 @@ pub struct XMLHttpRequest {
|
||||||
status_text: DOMRefCell<ByteString>,
|
status_text: DOMRefCell<ByteString>,
|
||||||
response: DOMRefCell<ByteString>,
|
response: DOMRefCell<ByteString>,
|
||||||
response_type: Cell<XMLHttpRequestResponseType>,
|
response_type: Cell<XMLHttpRequestResponseType>,
|
||||||
response_xml: MutNullableJS<Document>,
|
response_xml: MutNullableDom<Document>,
|
||||||
response_blob: MutNullableJS<Blob>,
|
response_blob: MutNullableDom<Blob>,
|
||||||
#[ignore_heap_size_of = "Defined in rust-mozjs"]
|
#[ignore_heap_size_of = "Defined in rust-mozjs"]
|
||||||
response_json: Heap<JSVal>,
|
response_json: Heap<JSVal>,
|
||||||
#[ignore_heap_size_of = "Defined in hyper"]
|
#[ignore_heap_size_of = "Defined in hyper"]
|
||||||
|
|
|
@ -34,7 +34,7 @@ use dom::bindings::conversions::{ConversionResult, FromJSValConvertible, Stringi
|
||||||
use dom::bindings::inheritance::Castable;
|
use dom::bindings::inheritance::Castable;
|
||||||
use dom::bindings::num::Finite;
|
use dom::bindings::num::Finite;
|
||||||
use dom::bindings::reflector::DomObject;
|
use dom::bindings::reflector::DomObject;
|
||||||
use dom::bindings::root::{Dom, MutNullableJS, Root, RootCollection};
|
use dom::bindings::root::{Dom, MutNullableDom, Root, RootCollection};
|
||||||
use dom::bindings::root::{RootCollectionPtr, RootedReference};
|
use dom::bindings::root::{RootCollectionPtr, RootedReference};
|
||||||
use dom::bindings::str::DOMString;
|
use dom::bindings::str::DOMString;
|
||||||
use dom::bindings::structuredclone::StructuredCloneData;
|
use dom::bindings::structuredclone::StructuredCloneData;
|
||||||
|
@ -458,7 +458,7 @@ pub struct ScriptThread {
|
||||||
js_runtime: Rc<Runtime>,
|
js_runtime: Rc<Runtime>,
|
||||||
|
|
||||||
/// The topmost element over the mouse.
|
/// The topmost element over the mouse.
|
||||||
topmost_mouse_over_target: MutNullableJS<Element>,
|
topmost_mouse_over_target: MutNullableDom<Element>,
|
||||||
|
|
||||||
/// List of pipelines that have been owned and closed by this script thread.
|
/// List of pipelines that have been owned and closed by this script thread.
|
||||||
closed_pipelines: DOMRefCell<HashSet<PipelineId>>,
|
closed_pipelines: DOMRefCell<HashSet<PipelineId>>,
|
||||||
|
@ -846,7 +846,7 @@ impl ScriptThread {
|
||||||
devtools_sender: ipc_devtools_sender,
|
devtools_sender: ipc_devtools_sender,
|
||||||
|
|
||||||
js_runtime: Rc::new(runtime),
|
js_runtime: Rc::new(runtime),
|
||||||
topmost_mouse_over_target: MutNullableJS::new(Default::default()),
|
topmost_mouse_over_target: MutNullableDom::new(Default::default()),
|
||||||
closed_pipelines: DOMRefCell::new(HashSet::new()),
|
closed_pipelines: DOMRefCell::new(HashSet::new()),
|
||||||
|
|
||||||
scheduler_chan: state.scheduler_chan,
|
scheduler_chan: state.scheduler_chan,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue