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

@ -7,7 +7,7 @@ use dom::bindings::utils::{DOMString, ErrorResult};
use dom::document::AbstractDocument;
use dom::element::HTMLSelectElementTypeId;
use dom::htmlelement::HTMLElement;
use dom::node::{AbstractNode, Node, ScriptView};
use dom::node::{AbstractNode, Node};
use dom::validitystate::ValidityState;
pub struct HTMLSelectElement {
@ -21,7 +21,7 @@ impl HTMLSelectElement {
}
}
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode<ScriptView> {
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
let element = HTMLSelectElement::new_inherited(localName, document);
Node::reflect_node(@mut element, document, HTMLSelectElementBinding::Wrap)
}
@ -44,7 +44,7 @@ impl HTMLSelectElement {
Ok(())
}
pub fn GetForm(&self) -> Option<AbstractNode<ScriptView>> {
pub fn GetForm(&self) -> Option<AbstractNode> {
None
}
@ -92,19 +92,19 @@ impl HTMLSelectElement {
Ok(())
}
pub fn Item(&self, _index: u32) -> Option<AbstractNode<ScriptView>> {
pub fn Item(&self, _index: u32) -> Option<AbstractNode> {
None
}
pub fn NamedItem(&self, _name: DOMString) -> Option<AbstractNode<ScriptView>> {
pub fn NamedItem(&self, _name: DOMString) -> Option<AbstractNode> {
None
}
pub fn IndexedGetter(&self, _index: u32, _found: &mut bool) -> Option<AbstractNode<ScriptView>> {
pub fn IndexedGetter(&self, _index: u32, _found: &mut bool) -> Option<AbstractNode> {
None
}
pub fn IndexedSetter(&mut self, _index: u32, _option: Option<AbstractNode<ScriptView>>) -> ErrorResult {
pub fn IndexedSetter(&mut self, _index: u32, _option: Option<AbstractNode>) -> ErrorResult {
Ok(())
}