mirror of
https://github.com/servo/servo.git
synced 2025-06-24 00:54:32 +01:00
Rename WrapperCache to Reflector.
I think the abstraction from the raw JSObject is still probably worthwhile for now.
This commit is contained in:
parent
0a0599ad9b
commit
2cbe2d7ce9
24 changed files with 81 additions and 81 deletions
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::codegen::ClientRectListBinding;
|
||||
use dom::bindings::utils::{WrapperCache, Reflectable, BindingObject};
|
||||
use dom::bindings::utils::{Reflector, Reflectable, BindingObject};
|
||||
use dom::clientrect::ClientRect;
|
||||
use script_task::page_from_context;
|
||||
|
||||
|
@ -12,14 +12,14 @@ use js::jsapi::{JSObject, JSContext};
|
|||
use std::cast;
|
||||
|
||||
pub struct ClientRectList {
|
||||
wrapper: WrapperCache,
|
||||
wrapper: Reflector,
|
||||
rects: ~[@mut ClientRect]
|
||||
}
|
||||
|
||||
impl ClientRectList {
|
||||
pub fn new(rects: ~[@mut ClientRect], cx: *JSContext, scope: *JSObject) -> @mut ClientRectList {
|
||||
let list = @mut ClientRectList {
|
||||
wrapper: WrapperCache::new(),
|
||||
wrapper: Reflector::new(),
|
||||
rects: rects
|
||||
};
|
||||
list.init_wrapper(cx, scope);
|
||||
|
@ -49,7 +49,7 @@ impl ClientRectList {
|
|||
}
|
||||
|
||||
impl Reflectable for ClientRectList {
|
||||
fn get_wrappercache(&mut self) -> &mut WrapperCache {
|
||||
fn get_wrappercache(&mut self) -> &mut Reflector {
|
||||
unsafe {
|
||||
cast::transmute(&self.wrapper)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue