aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/bindings
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/script/dom/bindings')
-rw-r--r--src/components/script/dom/bindings/codegen/CodegenRust.py4
-rw-r--r--src/components/script/dom/bindings/domparser.rs8
-rw-r--r--src/components/script/dom/bindings/element.rs14
-rw-r--r--src/components/script/dom/bindings/node.rs4
-rw-r--r--src/components/script/dom/bindings/utils.rs8
5 files changed, 19 insertions, 19 deletions
diff --git a/src/components/script/dom/bindings/codegen/CodegenRust.py b/src/components/script/dom/bindings/codegen/CodegenRust.py
index 13a03c91c08..38a31aadeed 100644
--- a/src/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/src/components/script/dom/bindings/codegen/CodegenRust.py
@@ -1533,7 +1533,7 @@ for (uint32_t i = 0; i < length; ++i) {
if descriptor.pointerType == '':
wrap = "%s.wrap(cx, ${obj}, ${jsvalPtr} as *mut JSVal)" % result
else:
- wrap = "%s(cx, ${obj}, %s as @mut CacheableWrapper, ${jsvalPtr} as *mut JSVal)" % (wrapMethod, result)
+ wrap = "%s(cx, ${obj}, %s as @mut Reflectable, ${jsvalPtr} as *mut JSVal)" % (wrapMethod, result)
# We don't support prefable stuff in workers.
assert(not descriptor.prefable or not descriptor.workers)
if not descriptor.prefable:
@@ -1555,7 +1555,7 @@ for (uint32_t i = 0; i < length; ++i) {
if descriptor.pointerType == '':
wrap = "(%s.wrap(cx, ${obj}, ${jsvalPtr}) != 0)" % result
else:
- wrap = "if WrapNewBindingObject(cx, ${obj}, %s as @mut CacheableWrapper, ${jsvalPtr}) { 1 } else { 0 };" % result
+ wrap = "if WrapNewBindingObject(cx, ${obj}, %s as @mut Reflectable, ${jsvalPtr}) { 1 } else { 0 };" % result
wrappingCode += wrapAndSetPtr(wrap)
return (wrappingCode, False)
diff --git a/src/components/script/dom/bindings/domparser.rs b/src/components/script/dom/bindings/domparser.rs
index 42e1f5146a0..12b12c524b0 100644
--- a/src/components/script/dom/bindings/domparser.rs
+++ b/src/components/script/dom/bindings/domparser.rs
@@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::DOMParserBinding;
-use dom::bindings::utils::{CacheableWrapper, WrapperCache};
+use dom::bindings::utils::{Reflectable, WrapperCache};
use dom::bindings::utils::{BindingObject, DerivedWrapper};
use dom::domparser::DOMParser;
@@ -12,7 +12,7 @@ use js::glue::{RUST_OBJECT_TO_JSVAL};
use std::cast;
-impl CacheableWrapper for DOMParser {
+impl Reflectable for DOMParser {
fn get_wrappercache(&mut self) -> &mut WrapperCache {
unsafe { cast::transmute(&self.wrapper) }
}
@@ -24,8 +24,8 @@ impl CacheableWrapper for DOMParser {
}
impl BindingObject for DOMParser {
- fn GetParentObject(&self, _cx: *JSContext) -> Option<@mut CacheableWrapper> {
- Some(self.owner as @mut CacheableWrapper)
+ fn GetParentObject(&self, _cx: *JSContext) -> Option<@mut Reflectable> {
+ Some(self.owner as @mut Reflectable)
}
}
diff --git a/src/components/script/dom/bindings/element.rs b/src/components/script/dom/bindings/element.rs
index 98479fa6556..4dd4495756a 100644
--- a/src/components/script/dom/bindings/element.rs
+++ b/src/components/script/dom/bindings/element.rs
@@ -4,14 +4,14 @@
use dom::types::*;
use dom::bindings::codegen::*;
-use dom::bindings::utils::{BindingObject, WrapperCache, CacheableWrapper, Traceable};
+use dom::bindings::utils::{BindingObject, WrapperCache, Reflectable, Traceable};
use dom::node::ScriptView;
use js::jsapi::{JSContext, JSObject, JSTracer};
macro_rules! generate_cacheable_wrapper(
($name: path, $wrap: path) => (
- impl CacheableWrapper for $name {
+ impl Reflectable for $name {
fn get_wrappercache(&mut self) -> &mut WrapperCache {
self.element.get_wrappercache()
}
@@ -26,7 +26,7 @@ macro_rules! generate_cacheable_wrapper(
macro_rules! generate_cacheable_wrapper_htmlelement(
($name: path, $wrap: path) => (
- impl CacheableWrapper for $name {
+ impl Reflectable for $name {
fn get_wrappercache(&mut self) -> &mut WrapperCache {
self.htmlelement.get_wrappercache()
}
@@ -41,7 +41,7 @@ macro_rules! generate_cacheable_wrapper_htmlelement(
macro_rules! generate_cacheable_wrapper_node(
($name: path, $wrap: path) => (
- impl CacheableWrapper for $name {
+ impl Reflectable for $name {
fn get_wrappercache(&mut self) -> &mut WrapperCache {
self.node.get_wrappercache()
}
@@ -57,7 +57,7 @@ macro_rules! generate_cacheable_wrapper_node(
macro_rules! generate_binding_object(
($name: path) => (
impl BindingObject for $name {
- fn GetParentObject(&self, cx: *JSContext) -> Option<@mut CacheableWrapper> {
+ fn GetParentObject(&self, cx: *JSContext) -> Option<@mut Reflectable> {
self.element.GetParentObject(cx)
}
}
@@ -67,7 +67,7 @@ macro_rules! generate_binding_object(
macro_rules! generate_binding_object_htmlelement(
($name: path) => (
impl BindingObject for $name {
- fn GetParentObject(&self, cx: *JSContext) -> Option<@mut CacheableWrapper> {
+ fn GetParentObject(&self, cx: *JSContext) -> Option<@mut Reflectable> {
self.htmlelement.GetParentObject(cx)
}
}
@@ -77,7 +77,7 @@ macro_rules! generate_binding_object_htmlelement(
macro_rules! generate_binding_object_node(
($name: path) => (
impl BindingObject for $name {
- fn GetParentObject(&self, cx: *JSContext) -> Option<@mut CacheableWrapper> {
+ fn GetParentObject(&self, cx: *JSContext) -> Option<@mut Reflectable> {
self.node.GetParentObject(cx)
}
}
diff --git a/src/components/script/dom/bindings/node.rs b/src/components/script/dom/bindings/node.rs
index a453d5d66c8..94f1dccfbd8 100644
--- a/src/components/script/dom/bindings/node.rs
+++ b/src/components/script/dom/bindings/node.rs
@@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::utils::{CacheableWrapper, WrapperCache, Traceable};
+use dom::bindings::utils::{Reflectable, WrapperCache, Traceable};
use dom::element::*;
use dom::types::*;
use dom::node::{AbstractNode, ElementNodeTypeId, TextNodeTypeId, CommentNodeTypeId};
@@ -95,7 +95,7 @@ pub fn create(cx: *JSContext, node: &mut AbstractNode<ScriptView>) -> *JSObject
}
}
-impl CacheableWrapper for AbstractNode<ScriptView> {
+impl Reflectable for AbstractNode<ScriptView> {
fn get_wrappercache(&mut self) -> &mut WrapperCache {
do self.with_mut_base |base| {
unsafe {
diff --git a/src/components/script/dom/bindings/utils.rs b/src/components/script/dom/bindings/utils.rs
index bb405b3a473..ef1cb11bee3 100644
--- a/src/components/script/dom/bindings/utils.rs
+++ b/src/components/script/dom/bindings/utils.rs
@@ -527,7 +527,7 @@ pub fn initialize_global(global: *JSObject) {
}
}
-pub trait CacheableWrapper {
+pub trait Reflectable {
fn get_wrappercache(&mut self) -> &mut WrapperCache;
fn wrap_object_shared(@mut self, cx: *JSContext, scope: *JSObject) -> *JSObject;
}
@@ -558,7 +558,7 @@ impl WrapperCache {
#[fixed_stack_segment]
pub fn WrapNewBindingObject(cx: *JSContext, scope: *JSObject,
- value: @mut CacheableWrapper,
+ value: @mut Reflectable,
vp: *mut JSVal) -> JSBool {
unsafe {
let cache = value.get_wrappercache();
@@ -581,7 +581,7 @@ pub fn WrapNewBindingObject(cx: *JSContext, scope: *JSObject,
}
#[fixed_stack_segment]
-pub fn WrapNativeParent(cx: *JSContext, scope: *JSObject, mut p: Option<@mut CacheableWrapper>) -> *JSObject {
+pub fn WrapNativeParent(cx: *JSContext, scope: *JSObject, mut p: Option<@mut Reflectable>) -> *JSObject {
match p {
Some(ref mut p) => {
let cache = p.get_wrappercache();
@@ -598,7 +598,7 @@ pub fn WrapNativeParent(cx: *JSContext, scope: *JSObject, mut p: Option<@mut Cac
}
pub trait BindingObject {
- fn GetParentObject(&self, cx: *JSContext) -> Option<@mut CacheableWrapper>;
+ fn GetParentObject(&self, cx: *JSContext) -> Option<@mut Reflectable>;
}
#[fixed_stack_segment]