diff options
Diffstat (limited to 'components/script/dom/webgl_extensions/ext')
-rw-r--r-- | components/script/dom/webgl_extensions/ext/oesvertexarrayobject.rs | 6 | ||||
-rw-r--r-- | components/script/dom/webgl_extensions/ext/webglvertexarrayobjectoes.rs | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/components/script/dom/webgl_extensions/ext/oesvertexarrayobject.rs b/components/script/dom/webgl_extensions/ext/oesvertexarrayobject.rs index b3b5a958997..f7414bcbb1b 100644 --- a/components/script/dom/webgl_extensions/ext/oesvertexarrayobject.rs +++ b/components/script/dom/webgl_extensions/ext/oesvertexarrayobject.rs @@ -6,7 +6,7 @@ use canvas_traits::webgl::{webgl_channel, WebGLCommand, WebGLError}; use dom::bindings::codegen::Bindings::OESVertexArrayObjectBinding::{self, OESVertexArrayObjectMethods}; use dom::bindings::codegen::Bindings::OESVertexArrayObjectBinding::OESVertexArrayObjectConstants; use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object}; -use dom::bindings::root::{JS, MutNullableJS, Root}; +use dom::bindings::root::{Dom, MutNullableJS, Root}; use dom::webglrenderingcontext::WebGLRenderingContext; use dom::webglvertexarrayobjectoes::WebGLVertexArrayObjectOES; use dom_struct::dom_struct; @@ -19,7 +19,7 @@ use super::{WebGLExtension, WebGLExtensions}; #[dom_struct] pub struct OESVertexArrayObject { reflector_: Reflector, - ctx: JS<WebGLRenderingContext>, + ctx: Dom<WebGLRenderingContext>, bound_vao: MutNullableJS<WebGLVertexArrayObjectOES>, } @@ -27,7 +27,7 @@ impl OESVertexArrayObject { fn new_inherited(ctx: &WebGLRenderingContext) -> OESVertexArrayObject { Self { reflector_: Reflector::new(), - ctx: JS::from_ref(ctx), + ctx: Dom::from_ref(ctx), bound_vao: MutNullableJS::new(None) } } diff --git a/components/script/dom/webgl_extensions/ext/webglvertexarrayobjectoes.rs b/components/script/dom/webgl_extensions/ext/webglvertexarrayobjectoes.rs index eeca0a24707..ccd103e07a2 100644 --- a/components/script/dom/webgl_extensions/ext/webglvertexarrayobjectoes.rs +++ b/components/script/dom/webgl_extensions/ext/webglvertexarrayobjectoes.rs @@ -8,7 +8,7 @@ use core::iter::FromIterator; use dom::bindings::cell::DOMRefCell; use dom::bindings::codegen::Bindings::WebGLVertexArrayObjectOESBinding; use dom::bindings::reflector::reflect_dom_object; -use dom::bindings::root::{JS, MutNullableJS, Root}; +use dom::bindings::root::{Dom, MutNullableJS, Root}; use dom::globalscope::GlobalScope; use dom::webglbuffer::WebGLBuffer; use dom::webglobject::WebGLObject; @@ -22,7 +22,7 @@ pub struct WebGLVertexArrayObjectOES { id: WebGLVertexArrayId, ever_bound: Cell<bool>, is_deleted: Cell<bool>, - bound_attrib_buffers: DOMRefCell<HashMap<u32, JS<WebGLBuffer>>>, + bound_attrib_buffers: DOMRefCell<HashMap<u32, Dom<WebGLBuffer>>>, bound_buffer_element_array: MutNullableJS<WebGLBuffer>, } @@ -64,7 +64,7 @@ impl WebGLVertexArrayObjectOES { self.ever_bound.set(true); } - pub fn borrow_bound_attrib_buffers(&self) -> Ref<HashMap<u32, JS<WebGLBuffer>>> { + pub fn borrow_bound_attrib_buffers(&self) -> Ref<HashMap<u32, Dom<WebGLBuffer>>> { self.bound_attrib_buffers.borrow() } @@ -73,7 +73,7 @@ impl WebGLVertexArrayObjectOES { } pub fn set_bound_attrib_buffers<'a, T>(&self, iter: T) where T: Iterator<Item=(u32, &'a WebGLBuffer)> { - *self.bound_attrib_buffers.borrow_mut() = HashMap::from_iter(iter.map(|(k,v)| (k, JS::from_ref(v)))); + *self.bound_attrib_buffers.borrow_mut() = HashMap::from_iter(iter.map(|(k,v)| (k, Dom::from_ref(v)))); } pub fn bound_buffer_element_array(&self) -> Option<Root<WebGLBuffer>> { |