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
|
@ -7,7 +7,7 @@ use dom::bindings::utils::{DOMString, ErrorResult};
|
|||
use dom::document::AbstractDocument;
|
||||
use dom::element::HTMLIframeElementTypeId;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
use dom::node::{AbstractNode, Node, ScriptView};
|
||||
use dom::node::{AbstractNode, Node};
|
||||
use dom::windowproxy::WindowProxy;
|
||||
|
||||
use extra::url::Url;
|
||||
|
@ -52,7 +52,7 @@ impl HTMLIFrameElement {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode<ScriptView> {
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode {
|
||||
let element = HTMLIFrameElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLIFrameElementBinding::Wrap)
|
||||
}
|
||||
|
@ -83,14 +83,14 @@ impl HTMLIFrameElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Sandbox(&self, _abstract_self: AbstractNode<ScriptView>) -> DOMString {
|
||||
pub fn Sandbox(&self, _abstract_self: AbstractNode) -> DOMString {
|
||||
match self.htmlelement.element.GetAttribute(~"sandbox") {
|
||||
Some(s) => s.to_owned(),
|
||||
None => ~"",
|
||||
}
|
||||
}
|
||||
|
||||
pub fn SetSandbox(&mut self, abstract_self: AbstractNode<ScriptView>, sandbox: DOMString) {
|
||||
pub fn SetSandbox(&mut self, abstract_self: AbstractNode, sandbox: DOMString) {
|
||||
self.htmlelement.element.SetAttribute(abstract_self, ~"sandbox", sandbox);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue