script: Eliminate the phantom type in favor of just whitelisting methods

that layout can safely call.

This is simpler. Currently, the set of methods is not safe, but I plan
to lock it down more soon.
This commit is contained in:
Patrick Walton 2013-12-16 20:29:20 -08:00
parent da4cff034b
commit be69a503fe
96 changed files with 646 additions and 522 deletions

View file

@ -5,18 +5,17 @@
use dom::attr::Attr;
use dom::bindings::codegen::AttrListBinding;
use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
use dom::node::{AbstractNode, ScriptView};
use dom::node::{AbstractNode};
use dom::window::Window;
pub struct AttrList {
reflector_: Reflector,
window: @mut Window,
owner: AbstractNode<ScriptView>
owner: AbstractNode,
}
impl AttrList {
pub fn new_inherited(window: @mut Window,
elem: AbstractNode<ScriptView>) -> AttrList {
pub fn new_inherited(window: @mut Window, elem: AbstractNode) -> AttrList {
AttrList {
reflector_: Reflector::new(),
window: window,
@ -24,7 +23,7 @@ impl AttrList {
}
}
pub fn new(window: @mut Window, elem: AbstractNode<ScriptView>) -> @mut AttrList {
pub fn new(window: @mut Window, elem: AbstractNode) -> @mut AttrList {
reflect_dom_object(@mut AttrList::new_inherited(window, elem),
window, AttrListBinding::Wrap)
}