aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/htmlframeelement.rs
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2014-04-10 21:29:54 -0400
committerJosh Matthews <josh@joshmatthews.net>2014-05-03 14:18:30 -0400
commit76783b029e5e10da7fd61ab356a8f80a1eaf32e0 (patch)
tree93697ff8906d2661434abc660ae57607b1871b59 /src/components/script/dom/htmlframeelement.rs
parentdfdda0098a3f169a37c100b36d4dd36ec1d815aa (diff)
downloadservo-76783b029e5e10da7fd61ab356a8f80a1eaf32e0.tar.gz
servo-76783b029e5e10da7fd61ab356a8f80a1eaf32e0.zip
Move WebIDL methods to traits implemented by JSRef types.
Diffstat (limited to 'src/components/script/dom/htmlframeelement.rs')
-rw-r--r--src/components/script/dom/htmlframeelement.rs60
1 files changed, 41 insertions, 19 deletions
diff --git a/src/components/script/dom/htmlframeelement.rs b/src/components/script/dom/htmlframeelement.rs
index 180124bf6dd..5dd705b494f 100644
--- a/src/components/script/dom/htmlframeelement.rs
+++ b/src/components/script/dom/htmlframeelement.rs
@@ -41,76 +41,98 @@ impl HTMLFrameElement {
}
}
-impl HTMLFrameElement {
- pub fn Name(&self) -> DOMString {
+pub trait HTMLFrameElementMethods {
+ fn Name(&self) -> DOMString;
+ fn SetName(&mut self, _name: DOMString) -> ErrorResult;
+ fn Scrolling(&self) -> DOMString;
+ fn SetScrolling(&mut self, _scrolling: DOMString) -> ErrorResult;
+ fn Src(&self) -> DOMString;
+ fn SetSrc(&mut self, _src: DOMString) -> ErrorResult;
+ fn FrameBorder(&self) -> DOMString;
+ fn SetFrameBorder(&mut self, _frameborder: DOMString) -> ErrorResult;
+ fn LongDesc(&self) -> DOMString;
+ fn SetLongDesc(&mut self, _longdesc: DOMString) -> ErrorResult;
+ fn NoResize(&self) -> bool;
+ fn SetNoResize(&mut self, _no_resize: bool) -> ErrorResult;
+ fn GetContentDocument(&self) -> Option<Unrooted<Document>>;
+ fn GetContentWindow(&self) -> Option<Unrooted<Window>>;
+ fn MarginHeight(&self) -> DOMString;
+ fn SetMarginHeight(&mut self, _height: DOMString) -> ErrorResult;
+ fn MarginWidth(&self) -> DOMString;
+ fn SetMarginWidth(&mut self, _height: DOMString) -> ErrorResult;
+}
+
+impl<'a> HTMLFrameElementMethods for JSRef<'a, HTMLFrameElement> {
+ fn Name(&self) -> DOMString {
~""
}
- pub fn SetName(&mut self, _name: DOMString) -> ErrorResult {
+ fn SetName(&mut self, _name: DOMString) -> ErrorResult {
Ok(())
}
- pub fn Scrolling(&self) -> DOMString {
+ fn Scrolling(&self) -> DOMString {
~""
}
- pub fn SetScrolling(&mut self, _scrolling: DOMString) -> ErrorResult {
+ fn SetScrolling(&mut self, _scrolling: DOMString) -> ErrorResult {
Ok(())
}
- pub fn Src(&self) -> DOMString {
+ fn Src(&self) -> DOMString {
~""
}
- pub fn SetSrc(&mut self, _src: DOMString) -> ErrorResult {
+ fn SetSrc(&mut self, _src: DOMString) -> ErrorResult {
Ok(())
}
- pub fn FrameBorder(&self) -> DOMString {
+ fn FrameBorder(&self) -> DOMString {
~""
}
- pub fn SetFrameBorder(&mut self, _frameborder: DOMString) -> ErrorResult {
+ fn SetFrameBorder(&mut self, _frameborder: DOMString) -> ErrorResult {
Ok(())
}
- pub fn LongDesc(&self) -> DOMString {
+ fn LongDesc(&self) -> DOMString {
~""
}
- pub fn SetLongDesc(&mut self, _longdesc: DOMString) -> ErrorResult {
+ fn SetLongDesc(&mut self, _longdesc: DOMString) -> ErrorResult {
Ok(())
}
- pub fn NoResize(&self) -> bool {
+ fn NoResize(&self) -> bool {
false
}
- pub fn SetNoResize(&mut self, _no_resize: bool) -> ErrorResult {
+ fn SetNoResize(&mut self, _no_resize: bool) -> ErrorResult {
Ok(())
}
- pub fn GetContentDocument(&self) -> Option<Unrooted<Document>> {
+ fn GetContentDocument(&self) -> Option<Unrooted<Document>> {
None
}
- pub fn GetContentWindow(&self) -> Option<Unrooted<Window>> {
+ fn GetContentWindow(&self) -> Option<Unrooted<Window>> {
None
}
- pub fn MarginHeight(&self) -> DOMString {
+ fn MarginHeight(&self) -> DOMString {
~""
}
- pub fn SetMarginHeight(&mut self, _height: DOMString) -> ErrorResult {
+ fn SetMarginHeight(&mut self, _height: DOMString) -> ErrorResult {
Ok(())
}
- pub fn MarginWidth(&self) -> DOMString {
+ fn MarginWidth(&self) -> DOMString {
~""
}
- pub fn SetMarginWidth(&mut self, _height: DOMString) -> ErrorResult {
+ fn SetMarginWidth(&mut self, _height: DOMString) -> ErrorResult {
Ok(())
}
}
+