aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/htmltablerowelement.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/script/dom/htmltablerowelement.rs')
-rw-r--r--src/components/script/dom/htmltablerowelement.rs58
1 files changed, 38 insertions, 20 deletions
diff --git a/src/components/script/dom/htmltablerowelement.rs b/src/components/script/dom/htmltablerowelement.rs
index aa46e96524f..053735b5f40 100644
--- a/src/components/script/dom/htmltablerowelement.rs
+++ b/src/components/script/dom/htmltablerowelement.rs
@@ -4,7 +4,7 @@
use dom::bindings::codegen::BindingDeclarations::HTMLTableRowElementBinding;
use dom::bindings::codegen::InheritTypes::HTMLTableRowElementDerived;
-use dom::bindings::js::JS;
+use dom::bindings::js::{JSRef, Temporary};
use dom::bindings::error::ErrorResult;
use dom::document::Document;
use dom::element::HTMLTableRowElementTypeId;
@@ -28,76 +28,94 @@ impl HTMLTableRowElementDerived for EventTarget {
}
impl HTMLTableRowElement {
- pub fn new_inherited(localName: DOMString, document: JS<Document>) -> HTMLTableRowElement {
+ pub fn new_inherited(localName: DOMString, document: &JSRef<Document>) -> HTMLTableRowElement {
HTMLTableRowElement {
htmlelement: HTMLElement::new_inherited(HTMLTableRowElementTypeId, localName, document)
}
}
- pub fn new(localName: DOMString, document: &JS<Document>) -> JS<HTMLTableRowElement> {
- let element = HTMLTableRowElement::new_inherited(localName, document.clone());
+ pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTableRowElement> {
+ let element = HTMLTableRowElement::new_inherited(localName, document);
Node::reflect_node(~element, document, HTMLTableRowElementBinding::Wrap)
}
}
-impl HTMLTableRowElement {
- pub fn RowIndex(&self) -> i32 {
+pub trait HTMLTableRowElementMethods {
+ fn RowIndex(&self) -> i32;
+ fn GetRowIndex(&self) -> i32;
+ fn SectionRowIndex(&self) -> i32;
+ fn GetSectionRowIndex(&self) -> i32;
+ fn DeleteCell(&mut self, _index: i32) -> ErrorResult;
+ fn Align(&self) -> DOMString;
+ fn SetAlign(&self, _align: DOMString) -> ErrorResult;
+ fn Ch(&self) -> DOMString;
+ fn SetCh(&self, _ch: DOMString) -> ErrorResult;
+ fn ChOff(&self) -> DOMString;
+ fn SetChOff(&self, _ch_off: DOMString) -> ErrorResult;
+ fn VAlign(&self) -> DOMString;
+ fn SetVAlign(&self, _v_align: DOMString) -> ErrorResult;
+ fn BgColor(&self) -> DOMString;
+ fn SetBgColor(&self, _bg_color: DOMString) -> ErrorResult;
+}
+
+impl<'a> HTMLTableRowElementMethods for JSRef<'a, HTMLTableRowElement> {
+ fn RowIndex(&self) -> i32 {
0
}
- pub fn GetRowIndex(&self) -> i32 {
+ fn GetRowIndex(&self) -> i32 {
0
}
- pub fn SectionRowIndex(&self) -> i32 {
+ fn SectionRowIndex(&self) -> i32 {
0
}
- pub fn GetSectionRowIndex(&self) -> i32 {
+ fn GetSectionRowIndex(&self) -> i32 {
0
}
- pub fn DeleteCell(&mut self, _index: i32) -> ErrorResult {
+ fn DeleteCell(&mut self, _index: i32) -> ErrorResult {
Ok(())
}
- pub fn Align(&self) -> DOMString {
+ fn Align(&self) -> DOMString {
~""
}
- pub fn SetAlign(&self, _align: DOMString) -> ErrorResult {
+ fn SetAlign(&self, _align: DOMString) -> ErrorResult {
Ok(())
}
- pub fn Ch(&self) -> DOMString {
+ fn Ch(&self) -> DOMString {
~""
}
- pub fn SetCh(&self, _ch: DOMString) -> ErrorResult {
+ fn SetCh(&self, _ch: DOMString) -> ErrorResult {
Ok(())
}
- pub fn ChOff(&self) -> DOMString {
+ fn ChOff(&self) -> DOMString {
~""
}
- pub fn SetChOff(&self, _ch_off: DOMString) -> ErrorResult {
+ fn SetChOff(&self, _ch_off: DOMString) -> ErrorResult {
Ok(())
}
- pub fn VAlign(&self) -> DOMString {
+ fn VAlign(&self) -> DOMString {
~""
}
- pub fn SetVAlign(&self, _v_align: DOMString) -> ErrorResult {
+ fn SetVAlign(&self, _v_align: DOMString) -> ErrorResult {
Ok(())
}
- pub fn BgColor(&self) -> DOMString {
+ fn BgColor(&self) -> DOMString {
~""
}
- pub fn SetBgColor(&self, _bg_color: DOMString) -> ErrorResult {
+ fn SetBgColor(&self, _bg_color: DOMString) -> ErrorResult {
Ok(())
}
}