mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
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:
parent
da4cff034b
commit
be69a503fe
96 changed files with 646 additions and 522 deletions
|
@ -6,7 +6,7 @@ use dom::bindings::codegen::CommentBinding;
|
|||
use dom::bindings::utils::{DOMString, Fallible};
|
||||
use dom::characterdata::CharacterData;
|
||||
use dom::document::AbstractDocument;
|
||||
use dom::node::{AbstractNode, ScriptView, CommentNodeTypeId, Node};
|
||||
use dom::node::{AbstractNode, CommentNodeTypeId, Node};
|
||||
use dom::window::Window;
|
||||
|
||||
/// An HTML comment.
|
||||
|
@ -21,12 +21,12 @@ impl Comment {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn new(text: ~str, document: AbstractDocument) -> AbstractNode<ScriptView> {
|
||||
pub fn new(text: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
let node = Comment::new_inherited(text, document);
|
||||
Node::reflect_node(@mut node, document, CommentBinding::Wrap)
|
||||
}
|
||||
|
||||
pub fn Constructor(owner: @mut Window, data: DOMString) -> Fallible<AbstractNode<ScriptView>> {
|
||||
pub fn Constructor(owner: @mut Window, data: DOMString) -> Fallible<AbstractNode> {
|
||||
Ok(Comment::new(data, owner.Document()))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue