mirror of
https://github.com/servo/servo.git
synced 2025-06-21 15:49:04 +01:00
Rename WrappableDocument stuff.
This commit is contained in:
parent
6bf740d967
commit
622aa76515
2 changed files with 9 additions and 9 deletions
|
@ -31,8 +31,8 @@ use std::libc;
|
||||||
use std::ascii::StrAsciiExt;
|
use std::ascii::StrAsciiExt;
|
||||||
use std::unstable::raw::Box;
|
use std::unstable::raw::Box;
|
||||||
|
|
||||||
pub trait WrappableDocument {
|
pub trait ReflectableDocument {
|
||||||
fn init_wrapper(@mut self, cx: *JSContext);
|
fn init_reflector(@mut self, cx: *JSContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving(Eq)]
|
#[deriving(Eq)]
|
||||||
|
@ -41,8 +41,8 @@ pub struct AbstractDocument {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl AbstractDocument {
|
impl AbstractDocument {
|
||||||
pub fn as_abstract<T: WrappableDocument>(cx: *JSContext, doc: @mut T) -> AbstractDocument {
|
pub fn as_abstract<T: ReflectableDocument>(cx: *JSContext, doc: @mut T) -> AbstractDocument {
|
||||||
doc.init_wrapper(cx);
|
doc.init_reflector(cx);
|
||||||
AbstractDocument {
|
AbstractDocument {
|
||||||
document: unsafe { cast::transmute(doc) }
|
document: unsafe { cast::transmute(doc) }
|
||||||
}
|
}
|
||||||
|
@ -125,8 +125,8 @@ impl Document {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl WrappableDocument for Document {
|
impl ReflectableDocument for Document {
|
||||||
fn init_wrapper(@mut self, cx: *JSContext) {
|
fn init_reflector(@mut self, cx: *JSContext) {
|
||||||
self.wrap_object_shared(cx, ptr::null()); //XXXjdm a proper scope would be nice
|
self.wrap_object_shared(cx, ptr::null()); //XXXjdm a proper scope would be nice
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
use dom::bindings::codegen::HTMLDocumentBinding;
|
use dom::bindings::codegen::HTMLDocumentBinding;
|
||||||
use dom::bindings::utils::{DOMString, ErrorResult, Fallible, Traceable};
|
use dom::bindings::utils::{DOMString, ErrorResult, Fallible, Traceable};
|
||||||
use dom::bindings::utils::{Reflectable, BindingObject, Reflector};
|
use dom::bindings::utils::{Reflectable, BindingObject, Reflector};
|
||||||
use dom::document::{AbstractDocument, Document, WrappableDocument, HTML};
|
use dom::document::{AbstractDocument, Document, ReflectableDocument, HTML};
|
||||||
use dom::element::HTMLHeadElementTypeId;
|
use dom::element::HTMLHeadElementTypeId;
|
||||||
use dom::htmlcollection::HTMLCollection;
|
use dom::htmlcollection::HTMLCollection;
|
||||||
use dom::node::{AbstractNode, ScriptView, ElementNodeTypeId};
|
use dom::node::{AbstractNode, ScriptView, ElementNodeTypeId};
|
||||||
|
@ -42,8 +42,8 @@ impl HTMLDocument {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl WrappableDocument for HTMLDocument {
|
impl ReflectableDocument for HTMLDocument {
|
||||||
fn init_wrapper(@mut self, cx: *JSContext) {
|
fn init_reflector(@mut self, cx: *JSContext) {
|
||||||
self.wrap_object_shared(cx, ptr::null()); //XXXjdm a proper scope would be nice
|
self.wrap_object_shared(cx, ptr::null()); //XXXjdm a proper scope would be nice
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue