mirror of
https://github.com/servo/servo.git
synced 2025-06-17 04:44:28 +00:00
Make Element.set_attr require an AbstractNode so we can always downcast.
This commit is contained in:
parent
72b6978b24
commit
a410651fba
6 changed files with 42 additions and 19 deletions
|
@ -5,6 +5,7 @@
|
|||
use dom::bindings::utils::{DOMString, null_string, ErrorResult, str};
|
||||
use dom::document::AbstractDocument;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
use dom::node::{AbstractNode, ScriptView};
|
||||
use dom::windowproxy::WindowProxy;
|
||||
use geom::size::Size2D;
|
||||
use geom::rect::Rect;
|
||||
|
@ -79,13 +80,13 @@ impl HTMLIFrameElement {
|
|||
pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) {
|
||||
}
|
||||
|
||||
pub fn Sandbox(&self) -> DOMString {
|
||||
pub fn Sandbox(&self, _abstract_self: AbstractNode<ScriptView>) -> DOMString {
|
||||
self.parent.parent.GetAttribute(&str(~"sandbox"))
|
||||
}
|
||||
|
||||
pub fn SetSandbox(&mut self, sandbox: &DOMString) {
|
||||
pub fn SetSandbox(&mut self, abstract_self: AbstractNode<ScriptView>, sandbox: &DOMString) {
|
||||
let mut rv = Ok(());
|
||||
self.parent.parent.SetAttribute(&str(~"sandbox"), sandbox, &mut rv);
|
||||
self.parent.parent.SetAttribute(abstract_self, &str(~"sandbox"), sandbox, &mut rv);
|
||||
}
|
||||
|
||||
pub fn AfterSetAttr(&mut self, name: &DOMString, value: &DOMString) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue