aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2017-09-26 01:30:06 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2017-09-26 09:49:04 +0200
commite2dac78d3600cb4b2b4474f1db4f0fcaadbe24ea (patch)
tree3a0ae2014f80a0e7af0d76e7f7e3d043769293a8 /components/script
parentc52fd0a78041ec22db1c4b391556368cd8b87b02 (diff)
downloadservo-e2dac78d3600cb4b2b4474f1db4f0fcaadbe24ea.tar.gz
servo-e2dac78d3600cb4b2b4474f1db4f0fcaadbe24ea.zip
Rename LayoutJS<T> to LayoutDom<T>
Diffstat (limited to 'components/script')
-rw-r--r--components/script/dom/attr.rs4
-rw-r--r--components/script/dom/bindings/codegen/CodegenRust.py2
-rw-r--r--components/script/dom/bindings/root.rs48
-rw-r--r--components/script/dom/canvasrenderingcontext2d.rs4
-rw-r--r--components/script/dom/characterdata.rs4
-rw-r--r--components/script/dom/document.rs8
-rw-r--r--components/script/dom/element.rs6
-rw-r--r--components/script/dom/htmlbodyelement.rs4
-rw-r--r--components/script/dom/htmlcanvaselement.rs4
-rw-r--r--components/script/dom/htmlfontelement.rs4
-rw-r--r--components/script/dom/htmlhrelement.rs4
-rw-r--r--components/script/dom/htmliframeelement.rs4
-rw-r--r--components/script/dom/htmlimageelement.rs4
-rwxr-xr-xcomponents/script/dom/htmlinputelement.rs8
-rw-r--r--components/script/dom/htmltablecellelement.rs4
-rw-r--r--components/script/dom/htmltableelement.rs4
-rw-r--r--components/script/dom/htmltablerowelement.rs4
-rw-r--r--components/script/dom/htmltablesectionelement.rs4
-rwxr-xr-xcomponents/script/dom/htmltextareaelement.rs4
-rw-r--r--components/script/dom/mod.rs4
-rw-r--r--components/script/dom/node.rs28
-rw-r--r--components/script/dom/svgsvgelement.rs4
-rw-r--r--components/script/dom/webglrenderingcontext.rs4
-rw-r--r--components/script/lib.rs2
24 files changed, 85 insertions, 85 deletions
diff --git a/components/script/dom/attr.rs b/components/script/dom/attr.rs
index d18eed26f65..ea9f1f23a78 100644
--- a/components/script/dom/attr.rs
+++ b/components/script/dom/attr.rs
@@ -7,7 +7,7 @@ use dom::bindings::cell::DOMRefCell;
use dom::bindings::codegen::Bindings::AttrBinding::{self, AttrMethods};
use dom::bindings::inheritance::Castable;
use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::{LayoutJS, MutNullableDom, Root, RootedReference};
+use dom::bindings::root::{LayoutDom, MutNullableDom, Root, RootedReference};
use dom::bindings::str::DOMString;
use dom::customelementregistry::CallbackReaction;
use dom::element::{AttributeMutation, Element};
@@ -256,7 +256,7 @@ pub trait AttrHelpersForLayout {
}
#[allow(unsafe_code)]
-impl AttrHelpersForLayout for LayoutJS<Attr> {
+impl AttrHelpersForLayout for LayoutDom<Attr> {
#[inline]
unsafe fn value_forever(&self) -> &'static AttrValue {
// This transmute is used to cheat the lifetime restriction.
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py
index 3f99ea37a41..888a17a3a8c 100644
--- a/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/components/script/dom/bindings/codegen/CodegenRust.py
@@ -7195,7 +7195,7 @@ class GlobalGenRoots():
imports = [CGGeneric("use dom::types::*;\n"),
CGGeneric("use dom::bindings::conversions::{DerivedFrom, get_dom_class};\n"),
CGGeneric("use dom::bindings::inheritance::Castable;\n"),
- CGGeneric("use dom::bindings::root::{Dom, LayoutJS, Root};\n"),
+ CGGeneric("use dom::bindings::root::{Dom, LayoutDom, Root};\n"),
CGGeneric("use dom::bindings::trace::JSTraceable;\n"),
CGGeneric("use dom::bindings::reflector::DomObject;\n"),
CGGeneric("use js::jsapi::JSTracer;\n\n"),
diff --git a/components/script/dom/bindings/root.rs b/components/script/dom/bindings/root.rs
index dbfe4023d63..f845bd3bd30 100644
--- a/components/script/dom/bindings/root.rs
+++ b/components/script/dom/bindings/root.rs
@@ -68,10 +68,10 @@ impl<T> HeapSizeOf for Dom<T> {
}
impl<T> Dom<T> {
- /// Returns `LayoutJS<T>` containing the same pointer.
- pub unsafe fn to_layout(&self) -> LayoutJS<T> {
+ /// Returns `LayoutDom<T>` containing the same pointer.
+ pub unsafe fn to_layout(&self) -> LayoutDom<T> {
debug_assert!(thread_state::get().is_layout());
- LayoutJS {
+ LayoutDom {
ptr: self.ptr.clone(),
}
}
@@ -124,32 +124,32 @@ unsafe impl<T: DomObject> JSTraceable for Dom<T> {
/// An unrooted reference to a DOM object for use in layout. `Layout*Helpers`
/// traits must be implemented on this.
#[allow_unrooted_interior]
-pub struct LayoutJS<T> {
+pub struct LayoutDom<T> {
ptr: NonZero<*const T>,
}
-impl<T: Castable> LayoutJS<T> {
+impl<T: Castable> LayoutDom<T> {
/// Cast a DOM object root upwards to one of the interfaces it derives from.
- pub fn upcast<U>(&self) -> LayoutJS<U>
+ pub fn upcast<U>(&self) -> LayoutDom<U>
where U: Castable,
T: DerivedFrom<U>
{
debug_assert!(thread_state::get().is_layout());
let ptr: *const T = self.ptr.get();
- LayoutJS {
+ LayoutDom {
ptr: unsafe { NonZero::new_unchecked(ptr as *const U) },
}
}
/// Cast a DOM object downwards to one of the interfaces it might implement.
- pub fn downcast<U>(&self) -> Option<LayoutJS<U>>
+ pub fn downcast<U>(&self) -> Option<LayoutDom<U>>
where U: DerivedFrom<T>
{
debug_assert!(thread_state::get().is_layout());
unsafe {
if (*self.unsafe_get()).is::<U>() {
let ptr: *const T = self.ptr.get();
- Some(LayoutJS {
+ Some(LayoutDom {
ptr: NonZero::new_unchecked(ptr as *const U),
})
} else {
@@ -159,7 +159,7 @@ impl<T: Castable> LayoutJS<T> {
}
}
-impl<T: DomObject> LayoutJS<T> {
+impl<T: DomObject> LayoutDom<T> {
/// Get the reflector.
pub unsafe fn get_jsobject(&self) -> *mut JSObject {
debug_assert!(thread_state::get().is_layout());
@@ -167,7 +167,7 @@ impl<T: DomObject> LayoutJS<T> {
}
}
-impl<T> Copy for LayoutJS<T> {}
+impl<T> Copy for LayoutDom<T> {}
impl<T> PartialEq for Dom<T> {
fn eq(&self, other: &Dom<T>) -> bool {
@@ -177,13 +177,13 @@ impl<T> PartialEq for Dom<T> {
impl<T> Eq for Dom<T> {}
-impl<T> PartialEq for LayoutJS<T> {
- fn eq(&self, other: &LayoutJS<T>) -> bool {
+impl<T> PartialEq for LayoutDom<T> {
+ fn eq(&self, other: &LayoutDom<T>) -> bool {
self.ptr == other.ptr
}
}
-impl<T> Eq for LayoutJS<T> {}
+impl<T> Eq for LayoutDom<T> {}
impl<T> Hash for Dom<T> {
fn hash<H: Hasher>(&self, state: &mut H) {
@@ -191,7 +191,7 @@ impl<T> Hash for Dom<T> {
}
}
-impl<T> Hash for LayoutJS<T> {
+impl<T> Hash for LayoutDom<T> {
fn hash<H: Hasher>(&self, state: &mut H) {
self.ptr.hash(state)
}
@@ -208,23 +208,23 @@ impl <T> Clone for Dom<T> {
}
}
-impl <T> Clone for LayoutJS<T> {
+impl <T> Clone for LayoutDom<T> {
#[inline]
- fn clone(&self) -> LayoutJS<T> {
+ fn clone(&self) -> LayoutDom<T> {
debug_assert!(thread_state::get().is_layout());
- LayoutJS {
+ LayoutDom {
ptr: self.ptr.clone(),
}
}
}
-impl LayoutJS<Node> {
+impl LayoutDom<Node> {
/// Create a new JS-owned value wrapped from an address known to be a
/// `Node` pointer.
- pub unsafe fn from_trusted_node_address(inner: TrustedNodeAddress) -> LayoutJS<Node> {
+ pub unsafe fn from_trusted_node_address(inner: TrustedNodeAddress) -> LayoutDom<Node> {
debug_assert!(thread_state::get().is_layout());
let TrustedNodeAddress(addr) = inner;
- LayoutJS {
+ LayoutDom {
ptr: NonZero::new_unchecked(addr as *const Node),
}
}
@@ -327,10 +327,10 @@ impl<T: DomObject> MutNullableDom<T> {
}
}
- /// Retrieve a copy of the inner optional `Dom<T>` as `LayoutJS<T>`.
+ /// Retrieve a copy of the inner optional `Dom<T>` as `LayoutDom<T>`.
/// For use by layout, which can't use safe types like Temporary.
#[allow(unrooted_must_root)]
- pub unsafe fn get_inner_as_layout(&self) -> Option<LayoutJS<T>> {
+ pub unsafe fn get_inner_as_layout(&self) -> Option<LayoutDom<T>> {
debug_assert!(thread_state::get().is_layout());
ptr::read(self.ptr.get()).map(|js| js.to_layout())
}
@@ -442,7 +442,7 @@ unsafe impl<T: DomObject> JSTraceable for OnceCellJS<T> {
}
}
-impl<T: DomObject> LayoutJS<T> {
+impl<T: DomObject> LayoutDom<T> {
/// Returns an unsafe pointer to the interior of this JS object. This is
/// the only method that be safely accessed from layout. (The fact that
/// this is unsafe is what necessitates the layout wrappers.)
diff --git a/components/script/dom/canvasrenderingcontext2d.rs b/components/script/dom/canvasrenderingcontext2d.rs
index 4eafb0907e8..cf898b06880 100644
--- a/components/script/dom/canvasrenderingcontext2d.rs
+++ b/components/script/dom/canvasrenderingcontext2d.rs
@@ -23,7 +23,7 @@ use dom::bindings::error::{Error, ErrorResult, Fallible};
use dom::bindings::inheritance::Castable;
use dom::bindings::num::Finite;
use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, LayoutJS, Root};
+use dom::bindings::root::{Dom, LayoutDom, Root};
use dom::bindings::str::DOMString;
use dom::canvasgradient::{CanvasGradient, CanvasGradientStyle, ToFillOrStrokeStyle};
use dom::canvaspattern::CanvasPattern;
@@ -585,7 +585,7 @@ pub trait LayoutCanvasRenderingContext2DHelpers {
unsafe fn get_ipc_renderer(&self) -> IpcSender<CanvasMsg>;
}
-impl LayoutCanvasRenderingContext2DHelpers for LayoutJS<CanvasRenderingContext2D> {
+impl LayoutCanvasRenderingContext2DHelpers for LayoutDom<CanvasRenderingContext2D> {
#[allow(unsafe_code)]
unsafe fn get_ipc_renderer(&self) -> IpcSender<CanvasMsg> {
(*self.unsafe_get()).ipc_renderer.clone()
diff --git a/components/script/dom/characterdata.rs b/components/script/dom/characterdata.rs
index 9db97be00f6..38a30e8ef50 100644
--- a/components/script/dom/characterdata.rs
+++ b/components/script/dom/characterdata.rs
@@ -12,7 +12,7 @@ use dom::bindings::codegen::InheritTypes::{CharacterDataTypeId, NodeTypeId};
use dom::bindings::codegen::UnionTypes::NodeOrString;
use dom::bindings::error::{Error, ErrorResult, Fallible};
use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{LayoutJS, Root};
+use dom::bindings::root::{LayoutDom, Root};
use dom::bindings::str::DOMString;
use dom::comment::Comment;
use dom::document::Document;
@@ -253,7 +253,7 @@ pub trait LayoutCharacterDataHelpers {
}
#[allow(unsafe_code)]
-impl LayoutCharacterDataHelpers for LayoutJS<CharacterData> {
+impl LayoutCharacterDataHelpers for LayoutDom<CharacterData> {
#[inline]
unsafe fn data_for_layout(&self) -> &str {
&(*self.unsafe_get()).data.borrow_for_layout()
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs
index 49dfdb4230e..48e4103e76e 100644
--- a/components/script/dom/document.rs
+++ b/components/script/dom/document.rs
@@ -27,7 +27,7 @@ use dom::bindings::inheritance::{Castable, ElementTypeId, HTMLElementTypeId, Nod
use dom::bindings::num::Finite;
use dom::bindings::refcounted::{Trusted, TrustedPromise};
use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::{Dom, LayoutJS, MutNullableDom, Root, RootedReference};
+use dom::bindings::root::{Dom, LayoutDom, MutNullableDom, Root, RootedReference};
use dom::bindings::str::{DOMString, USVString};
use dom::bindings::xmlname::{namespace_from_domstring, validate_and_extract, xml_name_type};
use dom::bindings::xmlname::XMLName::InvalidXMLName;
@@ -2082,7 +2082,7 @@ pub enum DocumentSource {
#[allow(unsafe_code)]
pub trait LayoutDocumentHelpers {
unsafe fn is_html_document_for_layout(&self) -> bool;
- unsafe fn drain_pending_restyles(&self) -> Vec<(LayoutJS<Element>, PendingRestyle)>;
+ unsafe fn drain_pending_restyles(&self) -> Vec<(LayoutDom<Element>, PendingRestyle)>;
unsafe fn needs_paint_from_layout(&self);
unsafe fn will_paint(&self);
unsafe fn quirks_mode(&self) -> QuirksMode;
@@ -2090,7 +2090,7 @@ pub trait LayoutDocumentHelpers {
}
#[allow(unsafe_code)]
-impl LayoutDocumentHelpers for LayoutJS<Document> {
+impl LayoutDocumentHelpers for LayoutDom<Document> {
#[inline]
unsafe fn is_html_document_for_layout(&self) -> bool {
(*self.unsafe_get()).is_html_document
@@ -2098,7 +2098,7 @@ impl LayoutDocumentHelpers for LayoutJS<Document> {
#[inline]
#[allow(unrooted_must_root)]
- unsafe fn drain_pending_restyles(&self) -> Vec<(LayoutJS<Element>, PendingRestyle)> {
+ unsafe fn drain_pending_restyles(&self) -> Vec<(LayoutDom<Element>, PendingRestyle)> {
let mut elements = (*self.unsafe_get()).pending_restyles.borrow_mut_for_layout();
// Elements were in a document when they were adding to this list, but that
// may no longer be true when the next layout occurs.
diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs
index 66c1ac9cbb1..79bbb3b11e3 100644
--- a/components/script/dom/element.rs
+++ b/components/script/dom/element.rs
@@ -24,7 +24,7 @@ use dom::bindings::error::{Error, ErrorResult, Fallible};
use dom::bindings::inheritance::{Castable, ElementTypeId, HTMLElementTypeId, NodeTypeId};
use dom::bindings::refcounted::{Trusted, TrustedPromise};
use dom::bindings::reflector::DomObject;
-use dom::bindings::root::{Dom, LayoutJS, MutNullableDom, Root, RootedReference};
+use dom::bindings::root::{Dom, LayoutDom, MutNullableDom, Root, RootedReference};
use dom::bindings::str::DOMString;
use dom::bindings::xmlname::{namespace_from_domstring, validate_and_extract, xml_name_type};
use dom::bindings::xmlname::XMLName::InvalidXMLName;
@@ -384,7 +384,7 @@ pub trait RawLayoutElementHelpers {
#[inline]
#[allow(unsafe_code)]
pub unsafe fn get_attr_for_layout<'a>(elem: &'a Element, namespace: &Namespace, name: &LocalName)
- -> Option<LayoutJS<Attr>> {
+ -> Option<LayoutDom<Attr>> {
// cast to point to T in RefCell<T> directly
let attrs = elem.attrs.borrow_for_layout();
attrs.iter().find(|attr| {
@@ -453,7 +453,7 @@ pub trait LayoutElementHelpers {
fn has_selector_flags(&self, flags: ElementSelectorFlags) -> bool;
}
-impl LayoutElementHelpers for LayoutJS<Element> {
+impl LayoutElementHelpers for LayoutDom<Element> {
#[allow(unsafe_code)]
#[inline]
unsafe fn has_class_for_layout(&self, name: &Atom, case_sensitivity: CaseSensitivity) -> bool {
diff --git a/components/script/dom/htmlbodyelement.rs b/components/script/dom/htmlbodyelement.rs
index 3eca3fba978..3ec993ca3df 100644
--- a/components/script/dom/htmlbodyelement.rs
+++ b/components/script/dom/htmlbodyelement.rs
@@ -7,7 +7,7 @@ use dom::attr::Attr;
use dom::bindings::codegen::Bindings::HTMLBodyElementBinding::{self, HTMLBodyElementMethods};
use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{LayoutJS, Root};
+use dom::bindings::root::{LayoutDom, Root};
use dom::bindings::str::DOMString;
use dom::document::Document;
use dom::element::{AttributeMutation, Element, RawLayoutElementHelpers};
@@ -88,7 +88,7 @@ pub trait HTMLBodyElementLayoutHelpers {
fn get_background(&self) -> Option<ServoUrl>;
}
-impl HTMLBodyElementLayoutHelpers for LayoutJS<HTMLBodyElement> {
+impl HTMLBodyElementLayoutHelpers for LayoutDom<HTMLBodyElement> {
#[allow(unsafe_code)]
fn get_background_color(&self) -> Option<RGBA> {
unsafe {
diff --git a/components/script/dom/htmlcanvaselement.rs b/components/script/dom/htmlcanvaselement.rs
index 0e376f63b2d..de6fc1b1bd4 100644
--- a/components/script/dom/htmlcanvaselement.rs
+++ b/components/script/dom/htmlcanvaselement.rs
@@ -15,7 +15,7 @@ use dom::bindings::conversions::ConversionResult;
use dom::bindings::error::{Error, Fallible};
use dom::bindings::inheritance::Castable;
use dom::bindings::num::Finite;
-use dom::bindings::root::{Dom, LayoutJS, Root};
+use dom::bindings::root::{Dom, LayoutDom, Root};
use dom::bindings::str::DOMString;
use dom::canvasrenderingcontext2d::{CanvasRenderingContext2D, LayoutCanvasRenderingContext2DHelpers};
use dom::document::Document;
@@ -101,7 +101,7 @@ pub trait LayoutHTMLCanvasElementHelpers {
fn get_height(&self) -> LengthOrPercentageOrAuto;
}
-impl LayoutHTMLCanvasElementHelpers for LayoutJS<HTMLCanvasElement> {
+impl LayoutHTMLCanvasElementHelpers for LayoutDom<HTMLCanvasElement> {
#[allow(unsafe_code)]
fn data(&self) -> HTMLCanvasData {
unsafe {
diff --git a/components/script/dom/htmlfontelement.rs b/components/script/dom/htmlfontelement.rs
index 77417b89997..e2f9eaeec21 100644
--- a/components/script/dom/htmlfontelement.rs
+++ b/components/script/dom/htmlfontelement.rs
@@ -7,7 +7,7 @@ use dom::attr::Attr;
use dom::bindings::codegen::Bindings::HTMLFontElementBinding;
use dom::bindings::codegen::Bindings::HTMLFontElementBinding::HTMLFontElementMethods;
use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{LayoutJS, Root};
+use dom::bindings::root::{LayoutDom, Root};
use dom::bindings::str::DOMString;
use dom::document::Document;
use dom::element::{Element, RawLayoutElementHelpers};
@@ -96,7 +96,7 @@ pub trait HTMLFontElementLayoutHelpers {
fn get_size(&self) -> Option<u32>;
}
-impl HTMLFontElementLayoutHelpers for LayoutJS<HTMLFontElement> {
+impl HTMLFontElementLayoutHelpers for LayoutDom<HTMLFontElement> {
#[allow(unsafe_code)]
fn get_color(&self) -> Option<RGBA> {
unsafe {
diff --git a/components/script/dom/htmlhrelement.rs b/components/script/dom/htmlhrelement.rs
index 38a2f354a6f..e66494e6843 100644
--- a/components/script/dom/htmlhrelement.rs
+++ b/components/script/dom/htmlhrelement.rs
@@ -5,7 +5,7 @@
use cssparser::RGBA;
use dom::bindings::codegen::Bindings::HTMLHRElementBinding::{self, HTMLHRElementMethods};
use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{LayoutJS, Root};
+use dom::bindings::root::{LayoutDom, Root};
use dom::bindings::str::DOMString;
use dom::document::Document;
use dom::element::{Element, RawLayoutElementHelpers};
@@ -63,7 +63,7 @@ pub trait HTMLHRLayoutHelpers {
fn get_width(&self) -> LengthOrPercentageOrAuto;
}
-impl HTMLHRLayoutHelpers for LayoutJS<HTMLHRElement> {
+impl HTMLHRLayoutHelpers for LayoutDom<HTMLHRElement> {
#[allow(unsafe_code)]
fn get_color(&self) -> Option<RGBA> {
unsafe {
diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs
index 8e71609a451..923c0fab2df 100644
--- a/components/script/dom/htmliframeelement.rs
+++ b/components/script/dom/htmliframeelement.rs
@@ -21,7 +21,7 @@ use dom::bindings::error::{Error, ErrorResult, Fallible};
use dom::bindings::inheritance::Castable;
use dom::bindings::refcounted::Trusted;
use dom::bindings::reflector::DomObject;
-use dom::bindings::root::{LayoutJS, MutNullableDom, Root};
+use dom::bindings::root::{LayoutDom, MutNullableDom, Root};
use dom::bindings::str::DOMString;
use dom::customevent::CustomEvent;
use dom::document::Document;
@@ -419,7 +419,7 @@ pub trait HTMLIFrameElementLayoutMethods {
fn get_height(&self) -> LengthOrPercentageOrAuto;
}
-impl HTMLIFrameElementLayoutMethods for LayoutJS<HTMLIFrameElement> {
+impl HTMLIFrameElementLayoutMethods for LayoutDom<HTMLIFrameElement> {
#[inline]
#[allow(unsafe_code)]
fn pipeline_id(&self) -> Option<PipelineId> {
diff --git a/components/script/dom/htmlimageelement.rs b/components/script/dom/htmlimageelement.rs
index 89873ffc4d8..3a71f8bda48 100644
--- a/components/script/dom/htmlimageelement.rs
+++ b/components/script/dom/htmlimageelement.rs
@@ -17,7 +17,7 @@ use dom::bindings::error::Fallible;
use dom::bindings::inheritance::Castable;
use dom::bindings::refcounted::Trusted;
use dom::bindings::reflector::DomObject;
-use dom::bindings::root::{LayoutJS, MutNullableDom, Root};
+use dom::bindings::root::{LayoutDom, MutNullableDom, Root};
use dom::bindings::str::DOMString;
use dom::document::Document;
use dom::element::{AttributeMutation, Element, RawLayoutElementHelpers};
@@ -694,7 +694,7 @@ pub trait LayoutHTMLImageElementHelpers {
fn get_height(&self) -> LengthOrPercentageOrAuto;
}
-impl LayoutHTMLImageElementHelpers for LayoutJS<HTMLImageElement> {
+impl LayoutHTMLImageElementHelpers for LayoutDom<HTMLImageElement> {
#[allow(unsafe_code)]
unsafe fn image(&self) -> Option<Arc<Image>> {
(*self.unsafe_get()).current_request.borrow_for_layout().image.clone()
diff --git a/components/script/dom/htmlinputelement.rs b/components/script/dom/htmlinputelement.rs
index bd714509dda..0520a3a3d4f 100755
--- a/components/script/dom/htmlinputelement.rs
+++ b/components/script/dom/htmlinputelement.rs
@@ -15,7 +15,7 @@ use dom::bindings::codegen::Bindings::MouseEventBinding::MouseEventMethods;
use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
use dom::bindings::error::{Error, ErrorResult};
use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{Dom, LayoutJS, MutNullableDom, Root, RootedReference};
+use dom::bindings::root::{Dom, LayoutDom, MutNullableDom, Root, RootedReference};
use dom::bindings::str::DOMString;
use dom::document::Document;
use dom::element::{AttributeMutation, Element, LayoutElementHelpers, RawLayoutElementHelpers};
@@ -206,15 +206,15 @@ pub trait LayoutHTMLInputElementHelpers {
}
#[allow(unsafe_code)]
-unsafe fn get_raw_textinput_value(input: LayoutJS<HTMLInputElement>) -> DOMString {
+unsafe fn get_raw_textinput_value(input: LayoutDom<HTMLInputElement>) -> DOMString {
(*input.unsafe_get()).textinput.borrow_for_layout().get_content()
}
-impl LayoutHTMLInputElementHelpers for LayoutJS<HTMLInputElement> {
+impl LayoutHTMLInputElementHelpers for LayoutDom<HTMLInputElement> {
#[allow(unsafe_code)]
unsafe fn value_for_layout(self) -> String {
#[allow(unsafe_code)]
- unsafe fn get_raw_attr_value(input: LayoutJS<HTMLInputElement>, default: &str) -> String {
+ unsafe fn get_raw_attr_value(input: LayoutDom<HTMLInputElement>, default: &str) -> String {
let elem = input.upcast::<Element>();
let value = (*elem.unsafe_get())
.get_attr_val_for_layout(&ns!(), &local_name!("value"))
diff --git a/components/script/dom/htmltablecellelement.rs b/components/script/dom/htmltablecellelement.rs
index 6bbdc65079a..3be05003a4a 100644
--- a/components/script/dom/htmltablecellelement.rs
+++ b/components/script/dom/htmltablecellelement.rs
@@ -6,7 +6,7 @@ use cssparser::RGBA;
use dom::bindings::codegen::Bindings::HTMLTableCellElementBinding::HTMLTableCellElementMethods;
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
use dom::bindings::inheritance::Castable;
-use dom::bindings::root::LayoutJS;
+use dom::bindings::root::LayoutDom;
use dom::bindings::str::DOMString;
use dom::document::Document;
use dom::element::{Element, RawLayoutElementHelpers};
@@ -88,7 +88,7 @@ pub trait HTMLTableCellElementLayoutHelpers {
}
#[allow(unsafe_code)]
-impl HTMLTableCellElementLayoutHelpers for LayoutJS<HTMLTableCellElement> {
+impl HTMLTableCellElementLayoutHelpers for LayoutDom<HTMLTableCellElement> {
fn get_background_color(&self) -> Option<RGBA> {
unsafe {
(&*self.upcast::<Element>().unsafe_get())
diff --git a/components/script/dom/htmltableelement.rs b/components/script/dom/htmltableelement.rs
index 25069647f6c..3571dda873d 100644
--- a/components/script/dom/htmltableelement.rs
+++ b/components/script/dom/htmltableelement.rs
@@ -10,7 +10,7 @@ use dom::bindings::codegen::Bindings::HTMLTableElementBinding::HTMLTableElementM
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
use dom::bindings::error::{Error, ErrorResult, Fallible};
use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{Dom, LayoutJS, MutNullableDom, Root, RootedReference};
+use dom::bindings::root::{Dom, LayoutDom, MutNullableDom, Root, RootedReference};
use dom::bindings::str::DOMString;
use dom::document::Document;
use dom::element::{AttributeMutation, Element, RawLayoutElementHelpers};
@@ -379,7 +379,7 @@ pub trait HTMLTableElementLayoutHelpers {
fn get_width(&self) -> LengthOrPercentageOrAuto;
}
-impl HTMLTableElementLayoutHelpers for LayoutJS<HTMLTableElement> {
+impl HTMLTableElementLayoutHelpers for LayoutDom<HTMLTableElement> {
#[allow(unsafe_code)]
fn get_background_color(&self) -> Option<RGBA> {
unsafe {
diff --git a/components/script/dom/htmltablerowelement.rs b/components/script/dom/htmltablerowelement.rs
index 78246d4444c..ded30ae590c 100644
--- a/components/script/dom/htmltablerowelement.rs
+++ b/components/script/dom/htmltablerowelement.rs
@@ -9,7 +9,7 @@ use dom::bindings::codegen::Bindings::HTMLTableSectionElementBinding::HTMLTableS
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
use dom::bindings::error::{ErrorResult, Fallible};
use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{LayoutJS, MutNullableDom, Root, RootedReference};
+use dom::bindings::root::{LayoutDom, MutNullableDom, Root, RootedReference};
use dom::bindings::str::DOMString;
use dom::document::Document;
use dom::element::{Element, RawLayoutElementHelpers};
@@ -142,7 +142,7 @@ pub trait HTMLTableRowElementLayoutHelpers {
}
#[allow(unsafe_code)]
-impl HTMLTableRowElementLayoutHelpers for LayoutJS<HTMLTableRowElement> {
+impl HTMLTableRowElementLayoutHelpers for LayoutDom<HTMLTableRowElement> {
fn get_background_color(&self) -> Option<RGBA> {
unsafe {
(&*self.upcast::<Element>().unsafe_get())
diff --git a/components/script/dom/htmltablesectionelement.rs b/components/script/dom/htmltablesectionelement.rs
index e2165843b0f..ffaaeea0427 100644
--- a/components/script/dom/htmltablesectionelement.rs
+++ b/components/script/dom/htmltablesectionelement.rs
@@ -7,7 +7,7 @@ use dom::bindings::codegen::Bindings::HTMLTableSectionElementBinding::{self, HTM
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
use dom::bindings::error::{ErrorResult, Fallible};
use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{LayoutJS, Root, RootedReference};
+use dom::bindings::root::{LayoutDom, Root, RootedReference};
use dom::bindings::str::DOMString;
use dom::document::Document;
use dom::element::{Element, RawLayoutElementHelpers};
@@ -81,7 +81,7 @@ pub trait HTMLTableSectionElementLayoutHelpers {
}
#[allow(unsafe_code)]
-impl HTMLTableSectionElementLayoutHelpers for LayoutJS<HTMLTableSectionElement> {
+impl HTMLTableSectionElementLayoutHelpers for LayoutDom<HTMLTableSectionElement> {
fn get_background_color(&self) -> Option<RGBA> {
unsafe {
(&*self.upcast::<Element>().unsafe_get())
diff --git a/components/script/dom/htmltextareaelement.rs b/components/script/dom/htmltextareaelement.rs
index 4958d2d3ca9..6531586ca29 100755
--- a/components/script/dom/htmltextareaelement.rs
+++ b/components/script/dom/htmltextareaelement.rs
@@ -9,7 +9,7 @@ use dom::bindings::codegen::Bindings::HTMLTextAreaElementBinding;
use dom::bindings::codegen::Bindings::HTMLTextAreaElementBinding::HTMLTextAreaElementMethods;
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{LayoutJS, MutNullableDom, Root};
+use dom::bindings::root::{LayoutDom, MutNullableDom, Root};
use dom::bindings::str::DOMString;
use dom::document::Document;
use dom::element::{AttributeMutation, Element};
@@ -57,7 +57,7 @@ pub trait LayoutHTMLTextAreaElementHelpers {
fn get_rows(self) -> u32;
}
-impl LayoutHTMLTextAreaElementHelpers for LayoutJS<HTMLTextAreaElement> {
+impl LayoutHTMLTextAreaElementHelpers for LayoutDom<HTMLTextAreaElement> {
#[allow(unrooted_must_root)]
#[allow(unsafe_code)]
unsafe fn get_value_for_layout(self) -> String {
diff --git a/components/script/dom/mod.rs b/components/script/dom/mod.rs
index b14cca5f820..8df3660a3f9 100644
--- a/components/script/dom/mod.rs
+++ b/components/script/dom/mod.rs
@@ -195,11 +195,11 @@
//! =================================
//!
//! Layout code can access the DOM through the
-//! [`LayoutJS`](bindings/root/struct.LayoutJS.html) smart pointer. This does not
+//! [`LayoutDom`](bindings/root/struct.LayoutDom.html) smart pointer. This does not
//! keep the DOM object alive; we ensure that no DOM code (Garbage Collection
//! in particular) runs while the layout thread is accessing the DOM.
//!
-//! Methods accessible to layout are implemented on `LayoutJS<Foo>` using
+//! Methods accessible to layout are implemented on `LayoutDom<Foo>` using
//! `LayoutFooHelpers` traits.
#[macro_use]
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs
index 2ce11daeb0f..d036e846e57 100644
--- a/components/script/dom/node.rs
+++ b/components/script/dom/node.rs
@@ -23,7 +23,7 @@ use dom::bindings::inheritance::{Castable, CharacterDataTypeId, ElementTypeId};
use dom::bindings::inheritance::{EventTargetTypeId, HTMLElementTypeId, NodeTypeId};
use dom::bindings::inheritance::{SVGElementTypeId, SVGGraphicsElementTypeId};
use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::{Dom, LayoutJS, MutNullableDom, Root, RootedReference};
+use dom::bindings::root::{Dom, LayoutDom, MutNullableDom, Root, RootedReference};
use dom::bindings::str::{DOMString, USVString};
use dom::bindings::xmlname::namespace_from_domstring;
use dom::characterdata::{CharacterData, LayoutCharacterDataHelpers};
@@ -999,13 +999,13 @@ pub unsafe fn from_untrusted_node_address(_runtime: *mut JSRuntime, candidate: U
pub trait LayoutNodeHelpers {
unsafe fn type_id_for_layout(&self) -> NodeTypeId;
- unsafe fn parent_node_ref(&self) -> Option<LayoutJS<Node>>;
- unsafe fn first_child_ref(&self) -> Option<LayoutJS<Node>>;
- unsafe fn last_child_ref(&self) -> Option<LayoutJS<Node>>;
- unsafe fn prev_sibling_ref(&self) -> Option<LayoutJS<Node>>;
- unsafe fn next_sibling_ref(&self) -> Option<LayoutJS<Node>>;
+ unsafe fn parent_node_ref(&self) -> Option<LayoutDom<Node>>;
+ unsafe fn first_child_ref(&self) -> Option<LayoutDom<Node>>;
+ unsafe fn last_child_ref(&self) -> Option<LayoutDom<Node>>;
+ unsafe fn prev_sibling_ref(&self) -> Option<LayoutDom<Node>>;
+ unsafe fn next_sibling_ref(&self) -> Option<LayoutDom<Node>>;
- unsafe fn owner_doc_for_layout(&self) -> LayoutJS<Document>;
+ unsafe fn owner_doc_for_layout(&self) -> LayoutDom<Document>;
unsafe fn is_element_for_layout(&self) -> bool;
unsafe fn get_flag(&self, flag: NodeFlags) -> bool;
@@ -1027,7 +1027,7 @@ pub trait LayoutNodeHelpers {
fn opaque(&self) -> OpaqueNode;
}
-impl LayoutNodeHelpers for LayoutJS<Node> {
+impl LayoutNodeHelpers for LayoutDom<Node> {
#[inline]
#[allow(unsafe_code)]
unsafe fn type_id_for_layout(&self) -> NodeTypeId {
@@ -1042,37 +1042,37 @@ impl LayoutNodeHelpers for LayoutJS<Node> {
#[inline]
#[allow(unsafe_code)]
- unsafe fn parent_node_ref(&self) -> Option<LayoutJS<Node>> {
+ unsafe fn parent_node_ref(&self) -> Option<LayoutDom<Node>> {
(*self.unsafe_get()).parent_node.get_inner_as_layout()
}
#[inline]
#[allow(unsafe_code)]
- unsafe fn first_child_ref(&self) -> Option<LayoutJS<Node>> {
+ unsafe fn first_child_ref(&self) -> Option<LayoutDom<Node>> {
(*self.unsafe_get()).first_child.get_inner_as_layout()
}
#[inline]
#[allow(unsafe_code)]
- unsafe fn last_child_ref(&self) -> Option<LayoutJS<Node>> {
+ unsafe fn last_child_ref(&self) -> Option<LayoutDom<Node>> {
(*self.unsafe_get()).last_child.get_inner_as_layout()
}
#[inline]
#[allow(unsafe_code)]
- unsafe fn prev_sibling_ref(&self) -> Option<LayoutJS<Node>> {
+ unsafe fn prev_sibling_ref(&self) -> Option<LayoutDom<Node>> {
(*self.unsafe_get()).prev_sibling.get_inner_as_layout()
}
#[inline]
#[allow(unsafe_code)]
- unsafe fn next_sibling_ref(&self) -> Option<LayoutJS<Node>> {
+ unsafe fn next_sibling_ref(&self) -> Option<LayoutDom<Node>> {
(*self.unsafe_get()).next_sibling.get_inner_as_layout()
}
#[inline]
#[allow(unsafe_code)]
- unsafe fn owner_doc_for_layout(&self) -> LayoutJS<Document> {
+ unsafe fn owner_doc_for_layout(&self) -> LayoutDom<Document> {
(*self.unsafe_get()).owner_doc.get_inner_as_layout().unwrap()
}
diff --git a/components/script/dom/svgsvgelement.rs b/components/script/dom/svgsvgelement.rs
index b1ab9ddd50f..e223d7f0b79 100644
--- a/components/script/dom/svgsvgelement.rs
+++ b/components/script/dom/svgsvgelement.rs
@@ -5,7 +5,7 @@
use dom::attr::Attr;
use dom::bindings::codegen::Bindings::SVGSVGElementBinding;
use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{LayoutJS, Root};
+use dom::bindings::root::{LayoutDom, Root};
use dom::bindings::str::DOMString;
use dom::document::Document;
use dom::element::{AttributeMutation, Element, RawLayoutElementHelpers};
@@ -49,7 +49,7 @@ pub trait LayoutSVGSVGElementHelpers {
fn data(&self) -> SVGSVGData;
}
-impl LayoutSVGSVGElementHelpers for LayoutJS<SVGSVGElement> {
+impl LayoutSVGSVGElementHelpers for LayoutDom<SVGSVGElement> {
#[allow(unsafe_code)]
fn data(&self) -> SVGSVGData {
unsafe {
diff --git a/components/script/dom/webglrenderingcontext.rs b/components/script/dom/webglrenderingcontext.rs
index 9f3b9f286e8..6ce1718d799 100644
--- a/components/script/dom/webglrenderingcontext.rs
+++ b/components/script/dom/webglrenderingcontext.rs
@@ -20,7 +20,7 @@ use dom::bindings::conversions::{ConversionResult, FromJSValConvertible, ToJSVal
use dom::bindings::error::{Error, Fallible};
use dom::bindings::inheritance::Castable;
use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, LayoutJS, MutNullableDom, Root};
+use dom::bindings::root::{Dom, LayoutDom, MutNullableDom, Root};
use dom::bindings::str::DOMString;
use dom::event::{Event, EventBubbles, EventCancelable};
use dom::htmlcanvaselement::HTMLCanvasElement;
@@ -3384,7 +3384,7 @@ pub trait LayoutCanvasWebGLRenderingContextHelpers {
unsafe fn canvas_data_source(&self) -> HTMLCanvasDataSource;
}
-impl LayoutCanvasWebGLRenderingContextHelpers for LayoutJS<WebGLRenderingContext> {
+impl LayoutCanvasWebGLRenderingContextHelpers for LayoutDom<WebGLRenderingContext> {
#[allow(unsafe_code)]
unsafe fn canvas_data_source(&self) -> HTMLCanvasDataSource {
HTMLCanvasDataSource::WebGL((*self.unsafe_get()).layout_handle())
diff --git a/components/script/lib.rs b/components/script/lib.rs
index d382e95ced8..6a6a40417e3 100644
--- a/components/script/lib.rs
+++ b/components/script/lib.rs
@@ -141,7 +141,7 @@ mod webdriver_handlers;
pub mod layout_exports {
pub use dom::bindings::inheritance::{CharacterDataTypeId, ElementTypeId};
pub use dom::bindings::inheritance::{HTMLElementTypeId, NodeTypeId};
- pub use dom::bindings::root::LayoutJS;
+ pub use dom::bindings::root::LayoutDom;
pub use dom::characterdata::LayoutCharacterDataHelpers;
pub use dom::document::{Document, LayoutDocumentHelpers, PendingRestyle};
pub use dom::element::{Element, LayoutElementHelpers, RawLayoutElementHelpers};