bindings: Return errors in Result rather than setting an out parameter

Fixes #909.
This commit is contained in:
Keegan McAllister 2013-09-18 15:23:03 -07:00
parent 4b0680a136
commit 73c1a12f30
73 changed files with 891 additions and 550 deletions

View file

@ -2925,8 +2925,6 @@ class CGCallGenerator(CGThing):
# Return values that go in outparams go here # Return values that go in outparams go here
if resultOutParam: if resultOutParam:
args.append(CGGeneric("result")) args.append(CGGeneric("result"))
if isFallible:
args.append(CGGeneric("&mut rv"))
needsCx = (typeNeedsCx(returnType, True) or needsCx = (typeNeedsCx(returnType, True) or
any(typeNeedsCx(a.type) for (a, _) in arguments) or any(typeNeedsCx(a.type) for (a, _) in arguments) or
@ -2944,21 +2942,29 @@ class CGCallGenerator(CGThing):
else: else:
call = CGWrapper(call, pre="(*%s)." % object) call = CGWrapper(call, pre="(*%s)." % object)
call = CGList([call, CGWrapper(args, pre="(", post=");")]) call = CGList([call, CGWrapper(args, pre="(", post=");")])
if result is not None:
if declareResult: if isFallible:
result = CGWrapper(result, pre="let mut result: ", post=";") self.cgRoot.prepend(CGWrapper(result if result is not None else CGGeneric("()"),
self.cgRoot.prepend(result) pre="let mut result_fallible: Result<", post=",Error>;"))
if not resultOutParam:
call = CGWrapper(call, pre="result = ") if result is not None and declareResult:
result = CGWrapper(result, pre="let mut result: ", post=";")
self.cgRoot.prepend(result)
if isFallible:
call = CGWrapper(call, pre="result_fallible = ")
elif result is not None and not resultOutParam:
call = CGWrapper(call, pre="result = ")
call = CGWrapper(call) call = CGWrapper(call)
self.cgRoot.append(call) self.cgRoot.append(call)
if isFallible: if isFallible:
self.cgRoot.prepend(CGGeneric("let mut rv: ErrorResult = Ok(());")) self.cgRoot.append(CGGeneric("if (result_fallible.is_err()) {"))
self.cgRoot.append(CGGeneric("if (rv.is_err()) {"))
self.cgRoot.append(CGIndenter(errorReport)) self.cgRoot.append(CGIndenter(errorReport))
self.cgRoot.append(CGGeneric("}")) self.cgRoot.append(CGGeneric("}"))
if result is not None and not resultOutParam:
self.cgRoot.append(CGGeneric("result = result_fallible.unwrap();"))
def define(self): def define(self):
return self.cgRoot.define() return self.cgRoot.define()

View file

@ -752,7 +752,9 @@ pub enum Error {
InvalidCharacter, InvalidCharacter,
} }
pub type ErrorResult = Result<(), Error>; pub type Fallible<T> = Result<T, Error>;
pub type ErrorResult = Fallible<()>;
pub struct EnumEntry { pub struct EnumEntry {
value: &'static str, value: &'static str,

View file

@ -4,7 +4,7 @@
//! DOM bindings for `CharacterData`. //! DOM bindings for `CharacterData`.
use dom::bindings::utils::{DOMString, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult, Fallible};
use dom::bindings::utils::{BindingObject, CacheableWrapper, WrapperCache}; use dom::bindings::utils::{BindingObject, CacheableWrapper, WrapperCache};
use dom::node::{Node, NodeTypeId, ScriptView}; use dom::node::{Node, NodeTypeId, ScriptView};
use js::jsapi::{JSObject, JSContext}; use js::jsapi::{JSObject, JSContext};
@ -26,31 +26,33 @@ impl CharacterData {
Some(self.data.clone()) Some(self.data.clone())
} }
pub fn SetData(&mut self, arg: &DOMString, _rv: &mut ErrorResult) { pub fn SetData(&mut self, arg: &DOMString) -> ErrorResult {
self.data = arg.get_ref().clone(); self.data = arg.get_ref().clone();
Ok(())
} }
pub fn Length(&self) -> u32 { pub fn Length(&self) -> u32 {
self.data.len() as u32 self.data.len() as u32
} }
pub fn SubstringData(&self, offset: u32, count: u32, _rv: &mut ErrorResult) -> DOMString { pub fn SubstringData(&self, offset: u32, count: u32) -> Fallible<DOMString> {
Some(self.data.slice(offset as uint, count as uint).to_str()) Ok(Some(self.data.slice(offset as uint, count as uint).to_str()))
} }
pub fn AppendData(&mut self, arg: &DOMString, _rv: &mut ErrorResult) { pub fn AppendData(&mut self, arg: &DOMString) -> ErrorResult {
self.data.push_str(arg.get_ref().clone()); self.data.push_str(arg.get_ref().clone());
Ok(())
} }
pub fn InsertData(&mut self, _offset: u32, _arg: &DOMString, _rv: &mut ErrorResult) { pub fn InsertData(&mut self, _offset: u32, _arg: &DOMString) -> ErrorResult {
fail!("CharacterData::InsertData() is unimplemented") fail!("CharacterData::InsertData() is unimplemented")
} }
pub fn DeleteData(&mut self, _offset: u32, _count: u32, _rv: &mut ErrorResult) { pub fn DeleteData(&mut self, _offset: u32, _count: u32) -> ErrorResult {
fail!("CharacterData::DeleteData() is unimplemented") fail!("CharacterData::DeleteData() is unimplemented")
} }
pub fn ReplaceData(&mut self, _offset: u32, _count: u32, _arg: &DOMString, _rv: &mut ErrorResult) { pub fn ReplaceData(&mut self, _offset: u32, _count: u32, _arg: &DOMString) -> ErrorResult {
fail!("CharacterData::ReplaceData() is unimplemented") fail!("CharacterData::ReplaceData() is unimplemented")
} }
} }

View file

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::utils::{DOMString, ErrorResult, null_str_as_empty}; use dom::bindings::utils::{DOMString, Fallible, null_str_as_empty};
use dom::characterdata::CharacterData; use dom::characterdata::CharacterData;
use dom::node::{AbstractNode, ScriptView, CommentNodeTypeId, Node}; use dom::node::{AbstractNode, ScriptView, CommentNodeTypeId, Node};
use dom::window::Window; use dom::window::Window;
@ -20,11 +20,11 @@ impl Comment {
} }
} }
pub fn Constructor(owner: @mut Window, data: &DOMString, _rv: &mut ErrorResult) -> AbstractNode<ScriptView> { pub fn Constructor(owner: @mut Window, data: &DOMString) -> Fallible<AbstractNode<ScriptView>> {
let s = null_str_as_empty(data); let s = null_str_as_empty(data);
unsafe { unsafe {
let compartment = (*owner.page).js_info.get_ref().js_compartment; let compartment = (*owner.page).js_info.get_ref().js_compartment;
Node::as_abstract_node(compartment.cx.ptr, @Comment::new(s)) Ok(Node::as_abstract_node(compartment.cx.ptr, @Comment::new(s)))
} }
} }
} }

View file

@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::DocumentBinding; use dom::bindings::codegen::DocumentBinding;
use dom::bindings::utils::{DOMString, WrapperCache, ErrorResult}; use dom::bindings::utils::{DOMString, WrapperCache, ErrorResult, Fallible};
use dom::bindings::utils::{BindingObject, CacheableWrapper, DerivedWrapper}; use dom::bindings::utils::{BindingObject, CacheableWrapper, DerivedWrapper};
use dom::bindings::utils::{is_valid_element_name, InvalidCharacter, Traceable, null_str_as_empty}; use dom::bindings::utils::{is_valid_element_name, InvalidCharacter, Traceable, null_str_as_empty};
use dom::element::{Element}; use dom::element::{Element};
@ -104,14 +104,14 @@ impl Document {
} }
} }
pub fn Constructor(owner: @mut Window, _rv: &mut ErrorResult) -> AbstractDocument { pub fn Constructor(owner: @mut Window) -> Fallible<AbstractDocument> {
let root = @HTMLHtmlElement { let root = @HTMLHtmlElement {
parent: HTMLElement::new(HTMLHtmlElementTypeId, ~"html") parent: HTMLElement::new(HTMLHtmlElementTypeId, ~"html")
}; };
let cx = owner.page.js_info.get_ref().js_compartment.cx.ptr; let cx = owner.page.js_info.get_ref().js_compartment.cx.ptr;
let root = unsafe { Node::as_abstract_node(cx, root) }; let root = unsafe { Node::as_abstract_node(cx, root) };
AbstractDocument::as_abstract(cx, @mut Document::new(root, None, XML)) Ok(AbstractDocument::as_abstract(cx, @mut Document::new(root, None, XML)))
} }
} }
@ -242,19 +242,17 @@ impl Document {
None None
} }
pub fn CreateElement(&self, local_name: &DOMString, rv: &mut ErrorResult) -> AbstractNode<ScriptView> { pub fn CreateElement(&self, local_name: &DOMString) -> Fallible<AbstractNode<ScriptView>> {
let cx = self.get_cx(); let cx = self.get_cx();
let local_name = null_str_as_empty(local_name); let local_name = null_str_as_empty(local_name);
if !is_valid_element_name(local_name) { if !is_valid_element_name(local_name) {
*rv = Err(InvalidCharacter); return Err(InvalidCharacter);
// FIXME #909: what to return here?
fail!("invalid character");
} }
let local_name = local_name.to_ascii_lower(); let local_name = local_name.to_ascii_lower();
build_element_from_tag(cx, local_name) Ok(build_element_from_tag(cx, local_name))
} }
pub fn CreateElementNS(&self, _namespace: &DOMString, _qualified_name: &DOMString, _rv: &mut ErrorResult) -> AbstractNode<ScriptView> { pub fn CreateElementNS(&self, _namespace: &DOMString, _qualified_name: &DOMString) -> Fallible<AbstractNode<ScriptView>> {
fail!("stub") fail!("stub")
} }
@ -263,7 +261,7 @@ impl Document {
unsafe { Node::as_abstract_node(cx, @Text::new(null_str_as_empty(data))) } unsafe { Node::as_abstract_node(cx, @Text::new(null_str_as_empty(data))) }
} }
pub fn CreateEvent(&self, _interface: &DOMString, _rv: &mut ErrorResult) -> @mut Event { pub fn CreateEvent(&self, _interface: &DOMString) -> Fallible<@mut Event> {
fail!("stub") fail!("stub")
} }
@ -312,7 +310,7 @@ impl Document {
Some(title) Some(title)
} }
pub fn SetTitle(&self, title: &DOMString, _rv: &mut ErrorResult) { pub fn SetTitle(&self, title: &DOMString) -> ErrorResult {
match self.doctype { match self.doctype {
SVG => { SVG => {
fail!("no SVG document yet") fail!("no SVG document yet")
@ -349,6 +347,7 @@ impl Document {
}; };
} }
} }
Ok(())
} }
pub fn Dir(&self) -> DOMString { pub fn Dir(&self) -> DOMString {
@ -366,8 +365,8 @@ impl Document {
None None
} }
pub fn HasFocus(&self, _rv: &mut ErrorResult) -> bool { pub fn HasFocus(&self) -> Fallible<bool> {
false Ok(false)
} }
pub fn GetCurrentScript(&self) -> Option<AbstractNode<ScriptView>> { pub fn GetCurrentScript(&self) -> Option<AbstractNode<ScriptView>> {
@ -381,8 +380,8 @@ impl Document {
false false
} }
pub fn GetMozFullScreenElement(&self, _rv: &mut ErrorResult) -> Option<AbstractNode<ScriptView>> { pub fn GetMozFullScreenElement(&self) -> Fallible<Option<AbstractNode<ScriptView>>> {
None Ok(None)
} }
pub fn GetMozPointerLockElement(&self) -> Option<AbstractNode<ScriptView>> { pub fn GetMozPointerLockElement(&self) -> Option<AbstractNode<ScriptView>> {
@ -430,8 +429,8 @@ impl Document {
None None
} }
pub fn QuerySelector(&self, _selectors: &DOMString, _rv: &mut ErrorResult) -> Option<AbstractNode<ScriptView>> { pub fn QuerySelector(&self, _selectors: &DOMString) -> Fallible<Option<AbstractNode<ScriptView>>> {
None Ok(None)
} }
pub fn GetElementsByName(&self, name: &DOMString) -> @mut HTMLCollection { pub fn GetElementsByName(&self, name: &DOMString) -> @mut HTMLCollection {

View file

@ -4,7 +4,7 @@
use dom::bindings::codegen::DOMParserBinding; use dom::bindings::codegen::DOMParserBinding;
use dom::bindings::codegen::DOMParserBinding::SupportedTypeValues::{Text_html, Text_xml}; use dom::bindings::codegen::DOMParserBinding::SupportedTypeValues::{Text_html, Text_xml};
use dom::bindings::utils::{DOMString, ErrorResult, WrapperCache, CacheableWrapper}; use dom::bindings::utils::{DOMString, Fallible, WrapperCache, CacheableWrapper};
use dom::document::{AbstractDocument, Document, XML}; use dom::document::{AbstractDocument, Document, XML};
use dom::element::HTMLHtmlElementTypeId; use dom::element::HTMLHtmlElementTypeId;
use dom::htmldocument::HTMLDocument; use dom::htmldocument::HTMLDocument;
@ -33,15 +33,14 @@ impl DOMParser {
parser parser
} }
pub fn Constructor(owner: @mut Window, _rv: &mut ErrorResult) -> @mut DOMParser { pub fn Constructor(owner: @mut Window) -> Fallible<@mut DOMParser> {
DOMParser::new(owner) Ok(DOMParser::new(owner))
} }
pub fn ParseFromString(&self, pub fn ParseFromString(&self,
_s: &DOMString, _s: &DOMString,
ty: DOMParserBinding::SupportedType, ty: DOMParserBinding::SupportedType)
_rv: &mut ErrorResult) -> Fallible<AbstractDocument> {
-> AbstractDocument {
unsafe { unsafe {
let root = @HTMLHtmlElement { let root = @HTMLHtmlElement {
parent: HTMLElement::new(HTMLHtmlElementTypeId, ~"html") parent: HTMLElement::new(HTMLHtmlElementTypeId, ~"html")
@ -52,10 +51,10 @@ impl DOMParser {
match ty { match ty {
Text_html => { Text_html => {
HTMLDocument::new(root, None) Ok(HTMLDocument::new(root, None))
} }
Text_xml => { Text_xml => {
AbstractDocument::as_abstract(cx, @mut Document::new(root, None, XML)) Ok(AbstractDocument::as_abstract(cx, @mut Document::new(root, None, XML)))
} }
_ => { _ => {
fail!("unsupported document type") fail!("unsupported document type")

View file

@ -4,7 +4,7 @@
//! Element nodes. //! Element nodes.
use dom::bindings::utils::{BindingObject, CacheableWrapper, DOMString, ErrorResult, WrapperCache}; use dom::bindings::utils::{BindingObject, CacheableWrapper, DOMString, ErrorResult, Fallible, WrapperCache};
use dom::bindings::utils::{null_str_as_empty, null_str_as_empty_ref}; use dom::bindings::utils::{null_str_as_empty, null_str_as_empty_ref};
use dom::htmlcollection::HTMLCollection; use dom::htmlcollection::HTMLCollection;
use dom::clientrect::ClientRect; use dom::clientrect::ClientRect;
@ -219,20 +219,21 @@ impl Element {
pub fn SetAttribute(&mut self, pub fn SetAttribute(&mut self,
abstract_self: AbstractNode<ScriptView>, abstract_self: AbstractNode<ScriptView>,
name: &DOMString, name: &DOMString,
value: &DOMString, value: &DOMString) -> ErrorResult {
_rv: &mut ErrorResult) {
self.set_attr(abstract_self, name, value); self.set_attr(abstract_self, name, value);
Ok(())
} }
pub fn SetAttributeNS(&self, _namespace: &DOMString, _localname: &DOMString, _value: &DOMString, _rv: &mut ErrorResult) { pub fn SetAttributeNS(&self, _namespace: &DOMString, _localname: &DOMString, _value: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn RemoveAttribute(&self, _name: &DOMString, _rv: &mut ErrorResult) -> bool { pub fn RemoveAttribute(&self, _name: &DOMString) -> ErrorResult {
false Ok(())
} }
pub fn RemoveAttributeNS(&self, _namespace: &DOMString, _localname: &DOMString, _rv: &mut ErrorResult) -> bool { pub fn RemoveAttributeNS(&self, _namespace: &DOMString, _localname: &DOMString) -> ErrorResult {
false Ok(())
} }
pub fn HasAttribute(&self, _name: &DOMString) -> bool { pub fn HasAttribute(&self, _name: &DOMString) -> bool {
@ -248,9 +249,9 @@ impl Element {
HTMLCollection::new(~[], cx, scope) HTMLCollection::new(~[], cx, scope)
} }
pub fn GetElementsByTagNameNS(&self, _namespace: &DOMString, _localname: &DOMString, _rv: &mut ErrorResult) -> @mut HTMLCollection { pub fn GetElementsByTagNameNS(&self, _namespace: &DOMString, _localname: &DOMString) -> Fallible<@mut HTMLCollection> {
let (scope, cx) = self.get_scope_and_cx(); let (scope, cx) = self.get_scope_and_cx();
HTMLCollection::new(~[], cx, scope) Ok(HTMLCollection::new(~[], cx, scope))
} }
pub fn GetElementsByClassName(&self, _names: &DOMString) -> @mut HTMLCollection { pub fn GetElementsByClassName(&self, _names: &DOMString) -> @mut HTMLCollection {
@ -258,8 +259,8 @@ impl Element {
HTMLCollection::new(~[], cx, scope) HTMLCollection::new(~[], cx, scope)
} }
pub fn MozMatchesSelector(&self, _selector: &DOMString, _rv: &mut ErrorResult) -> bool { pub fn MozMatchesSelector(&self, _selector: &DOMString) -> Fallible<bool> {
false Ok(false)
} }
pub fn SetCapture(&self, _retargetToElement: bool) { pub fn SetCapture(&self, _retargetToElement: bool) {
@ -388,25 +389,28 @@ impl Element {
0 0
} }
pub fn GetInnerHTML(&self, _rv: &mut ErrorResult) -> DOMString { pub fn GetInnerHTML(&self) -> Fallible<DOMString> {
None Ok(None)
} }
pub fn SetInnerHTML(&mut self, _value: &DOMString, _rv: &mut ErrorResult) { pub fn SetInnerHTML(&mut self, _value: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn GetOuterHTML(&self, _rv: &mut ErrorResult) -> DOMString { pub fn GetOuterHTML(&self) -> Fallible<DOMString> {
None Ok(None)
} }
pub fn SetOuterHTML(&mut self, _value: &DOMString, _rv: &mut ErrorResult) { pub fn SetOuterHTML(&mut self, _value: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn InsertAdjacentHTML(&mut self, _position: &DOMString, _text: &DOMString, _rv: &mut ErrorResult) { pub fn InsertAdjacentHTML(&mut self, _position: &DOMString, _text: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn QuerySelector(&self, _selectors: &DOMString, _rv: &mut ErrorResult) -> Option<AbstractNode<ScriptView>> { pub fn QuerySelector(&self, _selectors: &DOMString) -> Fallible<Option<AbstractNode<ScriptView>>> {
None Ok(None)
} }
} }

View file

@ -6,7 +6,7 @@ use dom::eventtarget::EventTarget;
use dom::window::Window; use dom::window::Window;
use dom::bindings::codegen::EventBinding; use dom::bindings::codegen::EventBinding;
use dom::bindings::utils::{CacheableWrapper, BindingObject, DerivedWrapper}; use dom::bindings::utils::{CacheableWrapper, BindingObject, DerivedWrapper};
use dom::bindings::utils::{DOMString, ErrorResult, WrapperCache}; use dom::bindings::utils::{DOMString, ErrorResult, Fallible, WrapperCache};
use geom::point::Point2D; use geom::point::Point2D;
use js::glue::RUST_OBJECT_TO_JSVAL; use js::glue::RUST_OBJECT_TO_JSVAL;
@ -95,11 +95,11 @@ impl Event {
pub fn InitEvent(&mut self, pub fn InitEvent(&mut self,
type_: &DOMString, type_: &DOMString,
bubbles: bool, bubbles: bool,
cancelable: bool, cancelable: bool) -> ErrorResult {
_rv: &mut ErrorResult) {
self.type_ = (*type_).clone(); self.type_ = (*type_).clone();
self.cancelable = cancelable; self.cancelable = cancelable;
self.bubbles = bubbles; self.bubbles = bubbles;
Ok(())
} }
pub fn IsTrusted(&self) -> bool { pub fn IsTrusted(&self) -> bool {
@ -108,9 +108,8 @@ impl Event {
pub fn Constructor(_global: @mut Window, pub fn Constructor(_global: @mut Window,
type_: &DOMString, type_: &DOMString,
_init: &EventBinding::EventInit, _init: &EventBinding::EventInit) -> Fallible<@mut Event> {
_rv: &mut ErrorResult) -> @mut Event { Ok(@mut Event::new(type_))
@mut Event::new(type_)
} }
} }

View file

@ -14,90 +14,103 @@ impl HTMLAnchorElement {
None None
} }
pub fn SetHref(&mut self, _href: &DOMString, _rv: &mut ErrorResult) { pub fn SetHref(&mut self, _href: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Target(&self) -> DOMString { pub fn Target(&self) -> DOMString {
None None
} }
pub fn SetTarget(&self, _target: &DOMString, _rv: &mut ErrorResult) { pub fn SetTarget(&self, _target: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Download(&self) -> DOMString { pub fn Download(&self) -> DOMString {
None None
} }
pub fn SetDownload(&self, _download: &DOMString, _rv: &mut ErrorResult) { pub fn SetDownload(&self, _download: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Ping(&self) -> DOMString { pub fn Ping(&self) -> DOMString {
None None
} }
pub fn SetPing(&self, _ping: &DOMString, _rv: &mut ErrorResult) { pub fn SetPing(&self, _ping: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Rel(&self) -> DOMString { pub fn Rel(&self) -> DOMString {
None None
} }
pub fn SetRel(&self, _rel: &DOMString, _rv: &mut ErrorResult) { pub fn SetRel(&self, _rel: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Hreflang(&self) -> DOMString { pub fn Hreflang(&self) -> DOMString {
None None
} }
pub fn SetHreflang(&self, _href_lang: &DOMString, _rv: &mut ErrorResult) { pub fn SetHreflang(&self, _href_lang: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Type(&self) -> DOMString { pub fn Type(&self) -> DOMString {
None None
} }
pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) { pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Text(&self) -> DOMString { pub fn Text(&self) -> DOMString {
None None
} }
pub fn SetText(&mut self, _text: &DOMString, _rv: &mut ErrorResult) { pub fn SetText(&mut self, _text: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Coords(&self) -> DOMString { pub fn Coords(&self) -> DOMString {
None None
} }
pub fn SetCoords(&mut self, _coords: &DOMString, _rv: &mut ErrorResult) { pub fn SetCoords(&mut self, _coords: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Charset(&self) -> DOMString { pub fn Charset(&self) -> DOMString {
None None
} }
pub fn SetCharset(&mut self, _charset: &DOMString, _rv: &mut ErrorResult) { pub fn SetCharset(&mut self, _charset: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Name(&self) -> DOMString { pub fn Name(&self) -> DOMString {
None None
} }
pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) { pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Rev(&self) -> DOMString { pub fn Rev(&self) -> DOMString {
None None
} }
pub fn SetRev(&mut self, _rev: &DOMString, _rv: &mut ErrorResult) { pub fn SetRev(&mut self, _rev: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Shape(&self) -> DOMString { pub fn Shape(&self) -> DOMString {
None None
} }
pub fn SetShape(&mut self, _shape: &DOMString, _rv: &mut ErrorResult) { pub fn SetShape(&mut self, _shape: &DOMString) -> ErrorResult {
Ok(())
} }
} }

View file

@ -14,76 +14,87 @@ impl HTMLAppletElement {
None None
} }
pub fn SetAlign(&mut self, _align: &DOMString, _rv: &mut ErrorResult) { pub fn SetAlign(&mut self, _align: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Alt(&self) -> DOMString { pub fn Alt(&self) -> DOMString {
None None
} }
pub fn SetAlt(&self, _alt: &DOMString, _rv: &mut ErrorResult) { pub fn SetAlt(&self, _alt: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Archive(&self) -> DOMString { pub fn Archive(&self) -> DOMString {
None None
} }
pub fn SetArchive(&self, _archive: &DOMString, _rv: &mut ErrorResult) { pub fn SetArchive(&self, _archive: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Code(&self) -> DOMString { pub fn Code(&self) -> DOMString {
None None
} }
pub fn SetCode(&self, _code: &DOMString, _rv: &mut ErrorResult) { pub fn SetCode(&self, _code: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn CodeBase(&self) -> DOMString { pub fn CodeBase(&self) -> DOMString {
None None
} }
pub fn SetCodeBase(&self, _code_base: &DOMString, _rv: &mut ErrorResult) { pub fn SetCodeBase(&self, _code_base: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Height(&self) -> DOMString { pub fn Height(&self) -> DOMString {
None None
} }
pub fn SetHeight(&self, _height: &DOMString, _rv: &mut ErrorResult) { pub fn SetHeight(&self, _height: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Hspace(&self) -> u32 { pub fn Hspace(&self) -> u32 {
0 0
} }
pub fn SetHspace(&mut self, _hspace: u32, _rv: &mut ErrorResult) { pub fn SetHspace(&mut self, _hspace: u32) -> ErrorResult {
Ok(())
} }
pub fn Name(&self) -> DOMString { pub fn Name(&self) -> DOMString {
None None
} }
pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) { pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Object(&self) -> DOMString { pub fn Object(&self) -> DOMString {
None None
} }
pub fn SetObject(&mut self, _object: &DOMString, _rv: &mut ErrorResult) { pub fn SetObject(&mut self, _object: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Vspace(&self) -> u32 { pub fn Vspace(&self) -> u32 {
0 0
} }
pub fn SetVspace(&mut self, _vspace: u32, _rv: &mut ErrorResult) { pub fn SetVspace(&mut self, _vspace: u32) -> ErrorResult {
Ok(())
} }
pub fn Width(&self) -> DOMString { pub fn Width(&self) -> DOMString {
None None
} }
pub fn SetWidth(&mut self, _width: &DOMString, _rv: &mut ErrorResult) { pub fn SetWidth(&mut self, _width: &DOMString) -> ErrorResult {
Ok(())
} }
} }

View file

@ -14,55 +14,63 @@ impl HTMLAreaElement {
None None
} }
pub fn SetAlt(&self, _alt: &DOMString, _rv: &mut ErrorResult) { pub fn SetAlt(&self, _alt: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Coords(&self) -> DOMString { pub fn Coords(&self) -> DOMString {
None None
} }
pub fn SetCoords(&self, _coords: &DOMString, _rv: &mut ErrorResult) { pub fn SetCoords(&self, _coords: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Shape(&self) -> DOMString { pub fn Shape(&self) -> DOMString {
None None
} }
pub fn SetShape(&self, _shape: &DOMString, _rv: &mut ErrorResult) { pub fn SetShape(&self, _shape: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Href(&self) -> DOMString { pub fn Href(&self) -> DOMString {
None None
} }
pub fn SetHref(&self, _href: &DOMString, _rv: &mut ErrorResult) { pub fn SetHref(&self, _href: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Target(&self) -> DOMString { pub fn Target(&self) -> DOMString {
None None
} }
pub fn SetTarget(&self, _target: &DOMString, _rv: &mut ErrorResult) { pub fn SetTarget(&self, _target: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Download(&self) -> DOMString { pub fn Download(&self) -> DOMString {
None None
} }
pub fn SetDownload(&self, _download: &DOMString, _rv: &mut ErrorResult) { pub fn SetDownload(&self, _download: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Ping(&self) -> DOMString { pub fn Ping(&self) -> DOMString {
None None
} }
pub fn SetPing(&self, _ping: &DOMString, _rv: &mut ErrorResult) { pub fn SetPing(&self, _ping: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn NoHref(&self) -> bool { pub fn NoHref(&self) -> bool {
false false
} }
pub fn SetNoHref(&mut self, _no_href: bool, _rv: &mut ErrorResult) { pub fn SetNoHref(&mut self, _no_href: bool) -> ErrorResult {
Ok(())
} }
} }

View file

@ -14,13 +14,15 @@ impl HTMLBaseElement {
None None
} }
pub fn SetHref(&self, _href: &DOMString, _rv: &mut ErrorResult) { pub fn SetHref(&self, _href: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Target(&self) -> DOMString { pub fn Target(&self) -> DOMString {
None None
} }
pub fn SetTarget(&self, _target: &DOMString, _rv: &mut ErrorResult) { pub fn SetTarget(&self, _target: &DOMString) -> ErrorResult {
Ok(())
} }
} }

View file

@ -14,41 +14,47 @@ impl HTMLBodyElement {
None None
} }
pub fn SetText(&mut self, _text: &DOMString, _rv: &mut ErrorResult) { pub fn SetText(&mut self, _text: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Link(&self) -> DOMString { pub fn Link(&self) -> DOMString {
None None
} }
pub fn SetLink(&self, _link: &DOMString, _rv: &mut ErrorResult) { pub fn SetLink(&self, _link: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn VLink(&self) -> DOMString { pub fn VLink(&self) -> DOMString {
None None
} }
pub fn SetVLink(&self, _v_link: &DOMString, _rv: &mut ErrorResult) { pub fn SetVLink(&self, _v_link: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn ALink(&self) -> DOMString { pub fn ALink(&self) -> DOMString {
None None
} }
pub fn SetALink(&self, _a_link: &DOMString, _rv: &mut ErrorResult) { pub fn SetALink(&self, _a_link: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn BgColor(&self) -> DOMString { pub fn BgColor(&self) -> DOMString {
None None
} }
pub fn SetBgColor(&self, _bg_color: &DOMString, _rv: &mut ErrorResult) { pub fn SetBgColor(&self, _bg_color: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Background(&self) -> DOMString { pub fn Background(&self) -> DOMString {
None None
} }
pub fn SetBackground(&self, _background: &DOMString, _rv: &mut ErrorResult) { pub fn SetBackground(&self, _background: &DOMString) -> ErrorResult {
Ok(())
} }
} }

View file

@ -14,6 +14,7 @@ impl HTMLBRElement {
None None
} }
pub fn SetClear(&mut self, _text: &DOMString, _rv: &mut ErrorResult) { pub fn SetClear(&mut self, _text: &DOMString) -> ErrorResult {
Ok(())
} }
} }

View file

@ -16,14 +16,16 @@ impl HTMLButtonElement {
false false
} }
pub fn SetAutofocus(&mut self, _autofocus: bool, _rv: &mut ErrorResult) { pub fn SetAutofocus(&mut self, _autofocus: bool) -> ErrorResult {
Ok(())
} }
pub fn Disabled(&self) -> bool { pub fn Disabled(&self) -> bool {
false false
} }
pub fn SetDisabled(&mut self, _disabled: bool, _rv: &mut ErrorResult) { pub fn SetDisabled(&mut self, _disabled: bool) -> ErrorResult {
Ok(())
} }
pub fn GetForm(&self) -> Option<AbstractNode<ScriptView>> { pub fn GetForm(&self) -> Option<AbstractNode<ScriptView>> {
@ -34,56 +36,64 @@ impl HTMLButtonElement {
None None
} }
pub fn SetFormAction(&mut self, _formaction: &DOMString, _rv: &mut ErrorResult) { pub fn SetFormAction(&mut self, _formaction: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn FormEnctype(&self) -> DOMString { pub fn FormEnctype(&self) -> DOMString {
None None
} }
pub fn SetFormEnctype(&mut self, _formenctype: &DOMString, _rv: &mut ErrorResult) { pub fn SetFormEnctype(&mut self, _formenctype: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn FormMethod(&self) -> DOMString { pub fn FormMethod(&self) -> DOMString {
None None
} }
pub fn SetFormMethod(&mut self, _formmethod: &DOMString, _rv: &mut ErrorResult) { pub fn SetFormMethod(&mut self, _formmethod: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn FormNoValidate(&self) -> bool { pub fn FormNoValidate(&self) -> bool {
false false
} }
pub fn SetFormNoValidate(&mut self, _novalidate: bool, _rv: &mut ErrorResult) { pub fn SetFormNoValidate(&mut self, _novalidate: bool) -> ErrorResult {
Ok(())
} }
pub fn FormTarget(&self) -> DOMString { pub fn FormTarget(&self) -> DOMString {
None None
} }
pub fn SetFormTarget(&mut self, _formtarget: &DOMString, _rv: &mut ErrorResult) { pub fn SetFormTarget(&mut self, _formtarget: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Name(&self) -> DOMString { pub fn Name(&self) -> DOMString {
None None
} }
pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) { pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Type(&self) -> DOMString { pub fn Type(&self) -> DOMString {
None None
} }
pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) { pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Value(&self) -> DOMString { pub fn Value(&self) -> DOMString {
None None
} }
pub fn SetValue(&mut self, _value: &DOMString, _rv: &mut ErrorResult) { pub fn SetValue(&mut self, _value: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn WillValidate(&self) -> bool { pub fn WillValidate(&self) -> bool {
@ -104,7 +114,8 @@ impl HTMLButtonElement {
None None
} }
pub fn SetValidationMessage(&mut self, _message: &DOMString, _rv: &mut ErrorResult) { pub fn SetValidationMessage(&mut self, _message: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn CheckValidity(&self) -> bool { pub fn CheckValidity(&self) -> bool {
@ -113,4 +124,4 @@ impl HTMLButtonElement {
pub fn SetCustomValidity(&mut self, _error: &DOMString) { pub fn SetCustomValidity(&mut self, _error: &DOMString) {
} }
} }

View file

@ -14,13 +14,15 @@ impl HTMLCanvasElement {
0 0
} }
pub fn SetWidth(&mut self, _width: u32, _rv: &mut ErrorResult) { pub fn SetWidth(&mut self, _width: u32) -> ErrorResult {
Ok(())
} }
pub fn Height(&self) -> u32 { pub fn Height(&self) -> u32 {
0 0
} }
pub fn SetHeight(&mut self, _height: u32, _rv: &mut ErrorResult) { pub fn SetHeight(&mut self, _height: u32) -> ErrorResult {
Ok(())
} }
} }

View file

@ -4,7 +4,7 @@
use dom::bindings::codegen::HTMLCollectionBinding; use dom::bindings::codegen::HTMLCollectionBinding;
use dom::bindings::utils::{CacheableWrapper, BindingObject, WrapperCache}; use dom::bindings::utils::{CacheableWrapper, BindingObject, WrapperCache};
use dom::bindings::utils::{DOMString, ErrorResult}; use dom::bindings::utils::{DOMString, Fallible};
use dom::node::{AbstractNode, ScriptView}; use dom::node::{AbstractNode, ScriptView};
use script_task::page_from_context; use script_task::page_from_context;
@ -44,9 +44,8 @@ impl HTMLCollection {
} }
} }
pub fn NamedItem(&self, _cx: *JSContext, _name: &DOMString, rv: &mut ErrorResult) -> *JSObject { pub fn NamedItem(&self, _cx: *JSContext, _name: &DOMString) -> Fallible<*JSObject> {
*rv = Ok(()); Ok(ptr::null())
ptr::null()
} }
pub fn IndexedGetter(&self, index: u32, found: &mut bool) -> Option<AbstractNode<ScriptView>> { pub fn IndexedGetter(&self, index: u32, found: &mut bool) -> Option<AbstractNode<ScriptView>> {
@ -54,8 +53,8 @@ impl HTMLCollection {
self.Item(index) self.Item(index)
} }
pub fn NamedGetter(&self, _cx: *JSContext, _name: &DOMString, _found: &mut bool, _rv: &mut ErrorResult) -> *JSObject { pub fn NamedGetter(&self, _cx: *JSContext, _name: &DOMString, _found: &mut bool) -> Fallible<*JSObject> {
ptr::null() Ok(ptr::null())
} }
} }

View file

@ -14,6 +14,7 @@ impl HTMLDataElement {
None None
} }
pub fn SetValue(&mut self, _value: &DOMString, _rv: &mut ErrorResult) { pub fn SetValue(&mut self, _value: &DOMString) -> ErrorResult {
Ok(())
} }
} }

View file

@ -14,6 +14,7 @@ impl HTMLDirectoryElement {
false false
} }
pub fn SetCompact(&mut self, _compact: bool, _rv: &mut ErrorResult) { pub fn SetCompact(&mut self, _compact: bool) -> ErrorResult {
Ok(())
} }
} }

View file

@ -14,6 +14,7 @@ impl HTMLDivElement {
None None
} }
pub fn SetAlign(&mut self, _align: &DOMString, _rv: &mut ErrorResult) { pub fn SetAlign(&mut self, _align: &DOMString) -> ErrorResult {
Ok(())
} }
} }

View file

@ -14,13 +14,15 @@ impl HTMLDListElement {
false false
} }
pub fn SetCompact(&mut self, _compact: bool, _rv: &mut ErrorResult) { pub fn SetCompact(&mut self, _compact: bool) -> ErrorResult {
Ok(())
} }
pub fn Type(&self) -> DOMString { pub fn Type(&self) -> DOMString {
None None
} }
pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) { pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
Ok(())
} }
} }

View file

@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::HTMLDocumentBinding; use dom::bindings::codegen::HTMLDocumentBinding;
use dom::bindings::utils::{DOMString, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult, Fallible};
use dom::bindings::utils::{CacheableWrapper, BindingObject, WrapperCache}; use dom::bindings::utils::{CacheableWrapper, BindingObject, WrapperCache};
use dom::document::{AbstractDocument, Document, WrappableDocument, HTML}; use dom::document::{AbstractDocument, Document, WrappableDocument, HTML};
use dom::element::HTMLHeadElementTypeId; use dom::element::HTMLHeadElementTypeId;
@ -49,22 +49,24 @@ impl WrappableDocument for HTMLDocument {
} }
impl HTMLDocument { impl HTMLDocument {
pub fn NamedGetter(&self, _cx: *JSContext, _name: &DOMString, _found: &mut bool, _rv: &mut ErrorResult) -> *JSObject { pub fn NamedGetter(&self, _cx: *JSContext, _name: &DOMString, _found: &mut bool) -> Fallible<*JSObject> {
ptr::null() Ok(ptr::null())
} }
pub fn GetDomain(&self, _rv: &mut ErrorResult) -> DOMString { pub fn GetDomain(&self) -> Fallible<DOMString> {
None Ok(None)
} }
pub fn SetDomain(&self, _domain: &DOMString, _rv: &mut ErrorResult) { pub fn SetDomain(&self, _domain: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn GetCookie(&self, _rv: &mut ErrorResult) -> DOMString { pub fn GetCookie(&self) -> Fallible<DOMString> {
None Ok(None)
} }
pub fn SetCookie(&self, _cookie: &DOMString, _rv: &mut ErrorResult) { pub fn SetCookie(&self, _cookie: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn GetHead(&self) -> Option<AbstractNode<ScriptView>> { pub fn GetHead(&self) -> Option<AbstractNode<ScriptView>> {
@ -104,38 +106,40 @@ impl HTMLDocument {
self.parent.createHTMLCollection(|elem| eq_slice(elem.tag_name, "script")) self.parent.createHTMLCollection(|elem| eq_slice(elem.tag_name, "script"))
} }
pub fn Close(&self, _rv: &mut ErrorResult) { pub fn Close(&self) -> ErrorResult {
Ok(())
} }
pub fn DesignMode(&self) -> DOMString { pub fn DesignMode(&self) -> DOMString {
None None
} }
pub fn SetDesignMode(&self, _mode: &DOMString, _rv: &mut ErrorResult) { pub fn SetDesignMode(&self, _mode: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn ExecCommand(&self, _command_id: &DOMString, _show_ui: bool, _value: &DOMString, _rv: &mut ErrorResult) -> bool { pub fn ExecCommand(&self, _command_id: &DOMString, _show_ui: bool, _value: &DOMString) -> Fallible<bool> {
false Ok(false)
} }
pub fn QueryCommandEnabled(&self, _command_id: &DOMString, _rv: &mut ErrorResult) -> bool { pub fn QueryCommandEnabled(&self, _command_id: &DOMString) -> Fallible<bool> {
false Ok(false)
} }
pub fn QueryCommandIndeterm(&self, _command_id: &DOMString, _rv: &mut ErrorResult) -> bool { pub fn QueryCommandIndeterm(&self, _command_id: &DOMString) -> Fallible<bool> {
false Ok(false)
} }
pub fn QueryCommandState(&self, _command_id: &DOMString, _rv: &mut ErrorResult) -> bool { pub fn QueryCommandState(&self, _command_id: &DOMString) -> Fallible<bool> {
false Ok(false)
} }
pub fn QueryCommandSupported(&self, _command_id: &DOMString) -> bool { pub fn QueryCommandSupported(&self, _command_id: &DOMString) -> bool {
false false
} }
pub fn QueryCommandValue(&self, _command_id: &DOMString, _rv: &mut ErrorResult) -> DOMString { pub fn QueryCommandValue(&self, _command_id: &DOMString) -> Fallible<DOMString> {
None Ok(None)
} }
pub fn FgColor(&self) -> DOMString { pub fn FgColor(&self) -> DOMString {
@ -186,8 +190,8 @@ impl HTMLDocument {
pub fn Clear(&self) { pub fn Clear(&self) {
} }
pub fn GetAll(&self, _cx: *JSContext, _rv: &mut ErrorResult) -> *libc::c_void { pub fn GetAll(&self, _cx: *JSContext) -> Fallible<*libc::c_void> {
ptr::null() Ok(ptr::null())
} }
} }

View file

@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::HTMLElementBinding; use dom::bindings::codegen::HTMLElementBinding;
use dom::bindings::utils::{DOMString, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult, Fallible};
use dom::bindings::utils::{CacheableWrapper, BindingObject, WrapperCache}; use dom::bindings::utils::{CacheableWrapper, BindingObject, WrapperCache};
use dom::element::{Element, ElementTypeId}; use dom::element::{Element, ElementTypeId};
use dom::node::{AbstractNode, ScriptView}; use dom::node::{AbstractNode, ScriptView};
@ -41,21 +41,24 @@ impl HTMLElement {
None None
} }
pub fn SetDir(&mut self, _dir: &DOMString, _rv: &mut ErrorResult) { pub fn SetDir(&mut self, _dir: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn GetItemValue(&self, _cx: *JSContext, _rv: &mut ErrorResult) -> JSVal { pub fn GetItemValue(&self, _cx: *JSContext) -> Fallible<JSVal> {
JSVAL_NULL Ok(JSVAL_NULL)
} }
pub fn SetItemValue(&mut self, _cx: *JSContext, _val: JSVal, _rv: &mut ErrorResult) { pub fn SetItemValue(&mut self, _cx: *JSContext, _val: JSVal) -> ErrorResult {
Ok(())
} }
pub fn Hidden(&self) -> bool { pub fn Hidden(&self) -> bool {
false false
} }
pub fn SetHidden(&mut self, _hidden: bool, _rv: &mut ErrorResult) { pub fn SetHidden(&mut self, _hidden: bool) -> ErrorResult {
Ok(())
} }
pub fn Click(&self) { pub fn Click(&self) {
@ -65,20 +68,24 @@ impl HTMLElement {
0 0
} }
pub fn SetTabIndex(&mut self, _index: i32, _rv: &mut ErrorResult) { pub fn SetTabIndex(&mut self, _index: i32) -> ErrorResult {
Ok(())
} }
pub fn Focus(&self, _rv: &mut ErrorResult) { pub fn Focus(&self) -> ErrorResult {
Ok(())
} }
pub fn Blur(&self, _rv: &mut ErrorResult) { pub fn Blur(&self) -> ErrorResult {
Ok(())
} }
pub fn AccessKey(&self) -> DOMString { pub fn AccessKey(&self) -> DOMString {
None None
} }
pub fn SetAccessKey(&self, _key: &DOMString, _rv: &mut ErrorResult) { pub fn SetAccessKey(&self, _key: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn AccessKeyLabel(&self) -> DOMString { pub fn AccessKeyLabel(&self) -> DOMString {
@ -89,14 +96,16 @@ impl HTMLElement {
false false
} }
pub fn SetDraggable(&mut self, _draggable: bool, _rv: &mut ErrorResult) { pub fn SetDraggable(&mut self, _draggable: bool) -> ErrorResult {
Ok(())
} }
pub fn ContentEditable(&self) -> DOMString { pub fn ContentEditable(&self) -> DOMString {
None None
} }
pub fn SetContentEditable(&mut self, _val: &DOMString, _rv: &mut ErrorResult) { pub fn SetContentEditable(&mut self, _val: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn IsContentEditable(&self) -> bool { pub fn IsContentEditable(&self) -> bool {
@ -107,7 +116,8 @@ impl HTMLElement {
false false
} }
pub fn SetSpellcheck(&self, _val: bool, _rv: &mut ErrorResult) { pub fn SetSpellcheck(&self, _val: bool) -> ErrorResult {
Ok(())
} }
pub fn ClassName(&self) -> DOMString { pub fn ClassName(&self) -> DOMString {

View file

@ -15,42 +15,48 @@ impl HTMLEmbedElement {
None None
} }
pub fn SetSrc(&mut self, _src: &DOMString, _rv: &mut ErrorResult) { pub fn SetSrc(&mut self, _src: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Type(&self) -> DOMString { pub fn Type(&self) -> DOMString {
None None
} }
pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) { pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Width(&self) -> DOMString { pub fn Width(&self) -> DOMString {
None None
} }
pub fn SetWidth(&mut self, _width: &DOMString, _rv: &mut ErrorResult) { pub fn SetWidth(&mut self, _width: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Height(&self) -> DOMString { pub fn Height(&self) -> DOMString {
None None
} }
pub fn SetHeight(&mut self, _height: &DOMString, _rv: &mut ErrorResult) { pub fn SetHeight(&mut self, _height: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Align(&self) -> DOMString { pub fn Align(&self) -> DOMString {
None None
} }
pub fn SetAlign(&mut self, _type: &DOMString, _rv: &mut ErrorResult) { pub fn SetAlign(&mut self, _type: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Name(&self) -> DOMString { pub fn Name(&self) -> DOMString {
None None
} }
pub fn SetName(&mut self, _type: &DOMString, _rv: &mut ErrorResult) { pub fn SetName(&mut self, _type: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn GetSVGDocument(&self) -> Option<AbstractDocument> { pub fn GetSVGDocument(&self) -> Option<AbstractDocument> {

View file

@ -19,7 +19,8 @@ impl HTMLFieldSetElement {
false false
} }
pub fn SetDisabled(&mut self, _disabled: bool, _rv: &mut ErrorResult) { pub fn SetDisabled(&mut self, _disabled: bool) -> ErrorResult {
Ok(())
} }
pub fn GetForm(&self) -> Option<AbstractNode<ScriptView>> { pub fn GetForm(&self) -> Option<AbstractNode<ScriptView>> {
@ -30,7 +31,8 @@ impl HTMLFieldSetElement {
None None
} }
pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) { pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Type(&self) -> DOMString { pub fn Type(&self) -> DOMString {
@ -69,4 +71,4 @@ impl HTMLFieldSetElement {
pub fn SetCustomValidity(&mut self, _error: &DOMString) { pub fn SetCustomValidity(&mut self, _error: &DOMString) {
} }
} }

View file

@ -14,20 +14,23 @@ impl HTMLFontElement {
None None
} }
pub fn SetColor(&mut self, _color: &DOMString, _rv: &mut ErrorResult) { pub fn SetColor(&mut self, _color: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Face(&self) -> DOMString { pub fn Face(&self) -> DOMString {
None None
} }
pub fn SetFace(&mut self, _face: &DOMString, _rv: &mut ErrorResult) { pub fn SetFace(&mut self, _face: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Size(&self) -> DOMString { pub fn Size(&self) -> DOMString {
None None
} }
pub fn SetSize(&mut self, _size: &DOMString, _rv: &mut ErrorResult) { pub fn SetSize(&mut self, _size: &DOMString) -> ErrorResult {
Ok(())
} }
} }

View file

@ -28,63 +28,72 @@ impl HTMLFormElement {
None None
} }
pub fn SetAcceptCharset(&mut self, _accept_charset: &DOMString, _rv: &mut ErrorResult) { pub fn SetAcceptCharset(&mut self, _accept_charset: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Action(&self) -> DOMString { pub fn Action(&self) -> DOMString {
None None
} }
pub fn SetAction(&mut self, _action: &DOMString, _rv: &mut ErrorResult) { pub fn SetAction(&mut self, _action: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Autocomplete(&self) -> DOMString { pub fn Autocomplete(&self) -> DOMString {
None None
} }
pub fn SetAutocomplete(&mut self, _autocomplete: &DOMString, _rv: &mut ErrorResult) { pub fn SetAutocomplete(&mut self, _autocomplete: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Enctype(&self) -> DOMString { pub fn Enctype(&self) -> DOMString {
None None
} }
pub fn SetEnctype(&mut self, _enctype: &DOMString, _rv: &mut ErrorResult) { pub fn SetEnctype(&mut self, _enctype: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Encoding(&self) -> DOMString { pub fn Encoding(&self) -> DOMString {
None None
} }
pub fn SetEncoding(&mut self, _encoding: &DOMString, _rv: &mut ErrorResult) { pub fn SetEncoding(&mut self, _encoding: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Method(&self) -> DOMString { pub fn Method(&self) -> DOMString {
None None
} }
pub fn SetMethod(&mut self, _method: &DOMString, _rv: &mut ErrorResult) { pub fn SetMethod(&mut self, _method: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Name(&self) -> DOMString { pub fn Name(&self) -> DOMString {
None None
} }
pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) { pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn NoValidate(&self) -> bool { pub fn NoValidate(&self) -> bool {
false false
} }
pub fn SetNoValidate(&mut self, _no_validate: bool, _rv: &mut ErrorResult) { pub fn SetNoValidate(&mut self, _no_validate: bool) -> ErrorResult {
Ok(())
} }
pub fn Target(&self) -> DOMString { pub fn Target(&self) -> DOMString {
None None
} }
pub fn SetTarget(&mut self, _target: &DOMString, _rv: &mut ErrorResult) { pub fn SetTarget(&mut self, _target: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Elements(&self) -> @mut HTMLCollection { pub fn Elements(&self) -> @mut HTMLCollection {
@ -96,7 +105,8 @@ impl HTMLFormElement {
0 0
} }
pub fn Submit(&self, _rv: &mut ErrorResult) { pub fn Submit(&self) -> ErrorResult {
Ok(())
} }
pub fn Reset(&self) { pub fn Reset(&self) {

View file

@ -16,42 +16,48 @@ impl HTMLFrameElement {
None None
} }
pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) { pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Scrolling(&self) -> DOMString { pub fn Scrolling(&self) -> DOMString {
None None
} }
pub fn SetScrolling(&mut self, _scrolling: &DOMString, _rv: &mut ErrorResult) { pub fn SetScrolling(&mut self, _scrolling: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Src(&self) -> DOMString { pub fn Src(&self) -> DOMString {
None None
} }
pub fn SetSrc(&mut self, _src: &DOMString, _rv: &mut ErrorResult) { pub fn SetSrc(&mut self, _src: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn FrameBorder(&self) -> DOMString { pub fn FrameBorder(&self) -> DOMString {
None None
} }
pub fn SetFrameBorder(&mut self, _frameborder: &DOMString, _rv: &mut ErrorResult) { pub fn SetFrameBorder(&mut self, _frameborder: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn LongDesc(&self) -> DOMString { pub fn LongDesc(&self) -> DOMString {
None None
} }
pub fn SetLongDesc(&mut self, _longdesc: &DOMString, _rv: &mut ErrorResult) { pub fn SetLongDesc(&mut self, _longdesc: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn NoResize(&self) -> bool { pub fn NoResize(&self) -> bool {
false false
} }
pub fn SetNoResize(&mut self, _no_resize: bool, _rv: &mut ErrorResult) { pub fn SetNoResize(&mut self, _no_resize: bool) -> ErrorResult {
Ok(())
} }
pub fn GetContentDocument(&self) -> Option<AbstractDocument> { pub fn GetContentDocument(&self) -> Option<AbstractDocument> {
@ -66,13 +72,15 @@ impl HTMLFrameElement {
None None
} }
pub fn SetMarginHeight(&mut self, _height: &DOMString, _rv: &mut ErrorResult) { pub fn SetMarginHeight(&mut self, _height: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn MarginWidth(&self) -> DOMString { pub fn MarginWidth(&self) -> DOMString {
None None
} }
pub fn SetMarginWidth(&mut self, _height: &DOMString, _rv: &mut ErrorResult) { pub fn SetMarginWidth(&mut self, _height: &DOMString) -> ErrorResult {
Ok(())
} }
} }

View file

@ -14,13 +14,15 @@ impl HTMLFrameSetElement {
None None
} }
pub fn SetCols(&mut self, _cols: &DOMString, _rv: &mut ErrorResult) { pub fn SetCols(&mut self, _cols: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Rows(&self) -> DOMString { pub fn Rows(&self) -> DOMString {
None None
} }
pub fn SetRows(&mut self, _rows: &DOMString, _rv: &mut ErrorResult) { pub fn SetRows(&mut self, _rows: &DOMString) -> ErrorResult {
Ok(())
} }
} }

View file

@ -14,34 +14,39 @@ impl HTMLHRElement {
None None
} }
pub fn SetAlign(&mut self, _align: &DOMString, _rv: &mut ErrorResult) { pub fn SetAlign(&mut self, _align: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Color(&self) -> DOMString { pub fn Color(&self) -> DOMString {
None None
} }
pub fn SetColor(&mut self, _color: &DOMString, _rv: &mut ErrorResult) { pub fn SetColor(&mut self, _color: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn NoShade(&self) -> bool { pub fn NoShade(&self) -> bool {
false false
} }
pub fn SetNoShade(&self, _no_shade: bool, _rv: &mut ErrorResult) { pub fn SetNoShade(&self, _no_shade: bool) -> ErrorResult {
Ok(())
} }
pub fn Size(&self) -> DOMString { pub fn Size(&self) -> DOMString {
None None
} }
pub fn SetSize(&mut self, _size: &DOMString, _rv: &mut ErrorResult) { pub fn SetSize(&mut self, _size: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Width(&self) -> DOMString { pub fn Width(&self) -> DOMString {
None None
} }
pub fn SetWidth(&mut self, _width: &DOMString, _rv: &mut ErrorResult) { pub fn SetWidth(&mut self, _width: &DOMString) -> ErrorResult {
Ok(())
} }
} }

View file

@ -14,6 +14,7 @@ impl HTMLHtmlElement {
None None
} }
pub fn SetVersion(&mut self, _version: &DOMString, _rv: &mut ErrorResult) { pub fn SetVersion(&mut self, _version: &DOMString) -> ErrorResult {
Ok(())
} }
} }

View file

@ -63,21 +63,24 @@ impl HTMLIFrameElement {
None None
} }
pub fn SetSrc(&mut self, _src: &DOMString, _rv: &mut ErrorResult) { pub fn SetSrc(&mut self, _src: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Srcdoc(&self) -> DOMString { pub fn Srcdoc(&self) -> DOMString {
None None
} }
pub fn SetSrcdoc(&mut self, _srcdoc: &DOMString, _rv: &mut ErrorResult) { pub fn SetSrcdoc(&mut self, _srcdoc: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Name(&self) -> DOMString { pub fn Name(&self) -> DOMString {
None None
} }
pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) { pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Sandbox(&self, _abstract_self: AbstractNode<ScriptView>) -> DOMString { pub fn Sandbox(&self, _abstract_self: AbstractNode<ScriptView>) -> DOMString {
@ -85,8 +88,7 @@ impl HTMLIFrameElement {
} }
pub fn SetSandbox(&mut self, abstract_self: AbstractNode<ScriptView>, sandbox: &DOMString) { pub fn SetSandbox(&mut self, abstract_self: AbstractNode<ScriptView>, sandbox: &DOMString) {
let mut rv = Ok(()); self.parent.parent.SetAttribute(abstract_self, &Some(~"sandbox"), sandbox);
self.parent.parent.SetAttribute(abstract_self, &Some(~"sandbox"), sandbox, &mut rv);
} }
pub fn AfterSetAttr(&mut self, name: &DOMString, value: &DOMString) { pub fn AfterSetAttr(&mut self, name: &DOMString, value: &DOMString) {
@ -113,21 +115,24 @@ impl HTMLIFrameElement {
false false
} }
pub fn SetAllowFullscreen(&mut self, _allow: bool, _rv: &mut ErrorResult) { pub fn SetAllowFullscreen(&mut self, _allow: bool) -> ErrorResult {
Ok(())
} }
pub fn Width(&self) -> DOMString { pub fn Width(&self) -> DOMString {
None None
} }
pub fn SetWidth(&mut self, _width: &DOMString, _rv: &mut ErrorResult) { pub fn SetWidth(&mut self, _width: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Height(&self) -> DOMString { pub fn Height(&self) -> DOMString {
None None
} }
pub fn SetHeight(&mut self, _height: &DOMString, _rv: &mut ErrorResult) { pub fn SetHeight(&mut self, _height: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn GetContentDocument(&self) -> Option<AbstractDocument> { pub fn GetContentDocument(&self) -> Option<AbstractDocument> {
@ -142,42 +147,48 @@ impl HTMLIFrameElement {
None None
} }
pub fn SetAlign(&mut self, _align: &DOMString, _rv: &mut ErrorResult) { pub fn SetAlign(&mut self, _align: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Scrolling(&self) -> DOMString { pub fn Scrolling(&self) -> DOMString {
None None
} }
pub fn SetScrolling(&mut self, _scrolling: &DOMString, _rv: &mut ErrorResult) { pub fn SetScrolling(&mut self, _scrolling: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn FrameBorder(&self) -> DOMString { pub fn FrameBorder(&self) -> DOMString {
None None
} }
pub fn SetFrameBorder(&mut self, _frameborder: &DOMString, _rv: &mut ErrorResult) { pub fn SetFrameBorder(&mut self, _frameborder: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn LongDesc(&self) -> DOMString { pub fn LongDesc(&self) -> DOMString {
None None
} }
pub fn SetLongDesc(&mut self, _longdesc: &DOMString, _rv: &mut ErrorResult) { pub fn SetLongDesc(&mut self, _longdesc: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn MarginHeight(&self) -> DOMString { pub fn MarginHeight(&self) -> DOMString {
None None
} }
pub fn SetMarginHeight(&mut self, _marginheight: &DOMString, _rv: &mut ErrorResult) { pub fn SetMarginHeight(&mut self, _marginheight: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn MarginWidth(&self) -> DOMString { pub fn MarginWidth(&self) -> DOMString {
None None
} }
pub fn SetMarginWidth(&mut self, _marginwidth: &DOMString, _rv: &mut ErrorResult) { pub fn SetMarginWidth(&mut self, _marginwidth: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn GetSVGDocument(&self) -> Option<AbstractDocument> { pub fn GetSVGDocument(&self) -> Option<AbstractDocument> {

View file

@ -58,7 +58,8 @@ impl HTMLImageElement {
None None
} }
pub fn SetAlt(&mut self, _alt: &DOMString, _rv: &mut ErrorResult) { pub fn SetAlt(&mut self, _alt: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Src(&self, _abstract_self: AbstractNode<ScriptView>) -> DOMString { pub fn Src(&self, _abstract_self: AbstractNode<ScriptView>) -> DOMString {
@ -67,33 +68,36 @@ impl HTMLImageElement {
pub fn SetSrc(&mut self, pub fn SetSrc(&mut self,
abstract_self: AbstractNode<ScriptView>, abstract_self: AbstractNode<ScriptView>,
src: &DOMString, src: &DOMString) -> ErrorResult {
_rv: &mut ErrorResult) {
let node = &mut self.parent.parent; let node = &mut self.parent.parent;
node.set_attr(abstract_self, node.set_attr(abstract_self,
&Some(~"src"), &Some(~"src"),
&Some(null_str_as_empty(src))); &Some(null_str_as_empty(src)));
Ok(())
} }
pub fn CrossOrigin(&self) -> DOMString { pub fn CrossOrigin(&self) -> DOMString {
None None
} }
pub fn SetCrossOrigin(&mut self, _cross_origin: &DOMString, _rv: &mut ErrorResult) { pub fn SetCrossOrigin(&mut self, _cross_origin: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn UseMap(&self) -> DOMString { pub fn UseMap(&self) -> DOMString {
None None
} }
pub fn SetUseMap(&mut self, _use_map: &DOMString, _rv: &mut ErrorResult) { pub fn SetUseMap(&mut self, _use_map: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn IsMap(&self) -> bool { pub fn IsMap(&self) -> bool {
false false
} }
pub fn SetIsMap(&self, _is_map: bool, _rv: &mut ErrorResult) { pub fn SetIsMap(&self, _is_map: bool) -> ErrorResult {
Ok(())
} }
pub fn Width(&self, abstract_self: AbstractNode<ScriptView>) -> u32 { pub fn Width(&self, abstract_self: AbstractNode<ScriptView>) -> u32 {
@ -125,12 +129,12 @@ impl HTMLImageElement {
pub fn SetWidth(&mut self, pub fn SetWidth(&mut self,
abstract_self: AbstractNode<ScriptView>, abstract_self: AbstractNode<ScriptView>,
width: u32, width: u32) -> ErrorResult {
_rv: &mut ErrorResult) {
let node = &mut self.parent.parent; let node = &mut self.parent.parent;
node.set_attr(abstract_self, node.set_attr(abstract_self,
&Some(~"width"), &Some(~"width"),
&Some(width.to_str())); &Some(width.to_str()));
Ok(())
} }
pub fn Height(&self, abstract_self: AbstractNode<ScriptView>) -> u32 { pub fn Height(&self, abstract_self: AbstractNode<ScriptView>) -> u32 {
@ -162,12 +166,12 @@ impl HTMLImageElement {
pub fn SetHeight(&mut self, pub fn SetHeight(&mut self,
abstract_self: AbstractNode<ScriptView>, abstract_self: AbstractNode<ScriptView>,
height: u32, height: u32) -> ErrorResult {
_rv: &mut ErrorResult) {
let node = &mut self.parent.parent; let node = &mut self.parent.parent;
node.set_attr(abstract_self, node.set_attr(abstract_self,
&Some(~"height"), &Some(~"height"),
&Some(height.to_str())); &Some(height.to_str()));
Ok(())
} }
pub fn NaturalWidth(&self) -> u32 { pub fn NaturalWidth(&self) -> u32 {
@ -186,41 +190,47 @@ impl HTMLImageElement {
None None
} }
pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) { pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Align(&self) -> DOMString { pub fn Align(&self) -> DOMString {
None None
} }
pub fn SetAlign(&mut self, _align: &DOMString, _rv: &mut ErrorResult) { pub fn SetAlign(&mut self, _align: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Hspace(&self) -> u32 { pub fn Hspace(&self) -> u32 {
0 0
} }
pub fn SetHspace(&mut self, _hspace: u32, _rv: &mut ErrorResult) { pub fn SetHspace(&mut self, _hspace: u32) -> ErrorResult {
Ok(())
} }
pub fn Vspace(&self) -> u32 { pub fn Vspace(&self) -> u32 {
0 0
} }
pub fn SetVspace(&mut self, _vspace: u32, _rv: &mut ErrorResult) { pub fn SetVspace(&mut self, _vspace: u32) -> ErrorResult {
Ok(())
} }
pub fn LongDesc(&self) -> DOMString { pub fn LongDesc(&self) -> DOMString {
None None
} }
pub fn SetLongDesc(&mut self, _longdesc: &DOMString, _rv: &mut ErrorResult) { pub fn SetLongDesc(&mut self, _longdesc: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Border(&self) -> DOMString { pub fn Border(&self) -> DOMString {
None None
} }
pub fn SetBorder(&mut self, _border: &DOMString, _rv: &mut ErrorResult) { pub fn SetBorder(&mut self, _border: &DOMString) -> ErrorResult {
Ok(())
} }
} }

View file

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::utils::{DOMString, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult, Fallible};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLInputElement { pub struct HTMLInputElement {
@ -14,35 +14,40 @@ impl HTMLInputElement {
None None
} }
pub fn SetAccept(&mut self, _accept: &DOMString, _rv: &mut ErrorResult) { pub fn SetAccept(&mut self, _accept: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Alt(&self) -> DOMString { pub fn Alt(&self) -> DOMString {
None None
} }
pub fn SetAlt(&mut self, _alt: &DOMString, _rv: &mut ErrorResult) { pub fn SetAlt(&mut self, _alt: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Autocomplete(&self) -> DOMString { pub fn Autocomplete(&self) -> DOMString {
None None
} }
pub fn SetAutocomplete(&mut self, _autocomple: &DOMString, _rv: &mut ErrorResult) { pub fn SetAutocomplete(&mut self, _autocomple: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Autofocus(&self) -> bool { pub fn Autofocus(&self) -> bool {
false false
} }
pub fn SetAutofocus(&mut self, _autofocus: bool, _rv: &mut ErrorResult) { pub fn SetAutofocus(&mut self, _autofocus: bool) -> ErrorResult {
Ok(())
} }
pub fn DefaultChecked(&self) -> bool { pub fn DefaultChecked(&self) -> bool {
false false
} }
pub fn SetDefaultChecked(&mut self, _default_checked: bool, _rv: &mut ErrorResult) { pub fn SetDefaultChecked(&mut self, _default_checked: bool) -> ErrorResult {
Ok(())
} }
pub fn Checked(&self) -> bool { pub fn Checked(&self) -> bool {
@ -56,49 +61,56 @@ impl HTMLInputElement {
false false
} }
pub fn SetDisabled(&mut self, _disabled: bool, _rv: &mut ErrorResult) { pub fn SetDisabled(&mut self, _disabled: bool) -> ErrorResult {
Ok(())
} }
pub fn FormAction(&self) -> DOMString { pub fn FormAction(&self) -> DOMString {
None None
} }
pub fn SetFormAction(&mut self, _form_action: &DOMString, _rv: &mut ErrorResult) { pub fn SetFormAction(&mut self, _form_action: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn FormEnctype(&self) -> DOMString { pub fn FormEnctype(&self) -> DOMString {
None None
} }
pub fn SetFormEnctype(&mut self, _form_enctype: &DOMString, _rv: &mut ErrorResult) { pub fn SetFormEnctype(&mut self, _form_enctype: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn FormMethod(&self) -> DOMString { pub fn FormMethod(&self) -> DOMString {
None None
} }
pub fn SetFormMethod(&mut self, _form_method: &DOMString, _rv: &mut ErrorResult) { pub fn SetFormMethod(&mut self, _form_method: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn FormNoValidate(&self) -> bool { pub fn FormNoValidate(&self) -> bool {
false false
} }
pub fn SetFormNoValidate(&mut self, _form_no_validate: bool, _rv: &mut ErrorResult) { pub fn SetFormNoValidate(&mut self, _form_no_validate: bool) -> ErrorResult {
Ok(())
} }
pub fn FormTarget(&self) -> DOMString { pub fn FormTarget(&self) -> DOMString {
None None
} }
pub fn SetFormTarget(&mut self, _form_target: &DOMString, _rv: &mut ErrorResult) { pub fn SetFormTarget(&mut self, _form_target: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Height(&self) -> u32 { pub fn Height(&self) -> u32 {
0 0
} }
pub fn SetHeight(&mut self, _height: u32, _rv: &mut ErrorResult) { pub fn SetHeight(&mut self, _height: u32) -> ErrorResult {
Ok(())
} }
pub fn Indeterminate(&self) -> bool { pub fn Indeterminate(&self) -> bool {
@ -112,112 +124,128 @@ impl HTMLInputElement {
None None
} }
pub fn SetInputMode(&mut self, _input_mode: &DOMString, _rv: &mut ErrorResult) { pub fn SetInputMode(&mut self, _input_mode: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Max(&self) -> DOMString { pub fn Max(&self) -> DOMString {
None None
} }
pub fn SetMax(&mut self, _max: &DOMString, _rv: &mut ErrorResult) { pub fn SetMax(&mut self, _max: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn MaxLength(&self) -> i32 { pub fn MaxLength(&self) -> i32 {
0 0
} }
pub fn SetMaxLength(&mut self, _max_length: i32, _rv: &mut ErrorResult) { pub fn SetMaxLength(&mut self, _max_length: i32) -> ErrorResult {
Ok(())
} }
pub fn Min(&self) -> DOMString { pub fn Min(&self) -> DOMString {
None None
} }
pub fn SetMin(&mut self, _min: &DOMString, _rv: &mut ErrorResult) { pub fn SetMin(&mut self, _min: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Multiple(&self) -> bool { pub fn Multiple(&self) -> bool {
false false
} }
pub fn SetMultiple(&mut self, _multiple: bool, _rv: &mut ErrorResult) { pub fn SetMultiple(&mut self, _multiple: bool) -> ErrorResult {
Ok(())
} }
pub fn Name(&self) -> DOMString { pub fn Name(&self) -> DOMString {
None None
} }
pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) { pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Pattern(&self) -> DOMString { pub fn Pattern(&self) -> DOMString {
None None
} }
pub fn SetPattern(&mut self, _pattern: &DOMString, _rv: &mut ErrorResult) { pub fn SetPattern(&mut self, _pattern: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Placeholder(&self) -> DOMString { pub fn Placeholder(&self) -> DOMString {
None None
} }
pub fn SetPlaceholder(&mut self, _placeholder: &DOMString, _rv: &mut ErrorResult) { pub fn SetPlaceholder(&mut self, _placeholder: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn ReadOnly(&self) -> bool { pub fn ReadOnly(&self) -> bool {
false false
} }
pub fn SetReadOnly(&mut self, _read_only: bool, _rv: &mut ErrorResult) { pub fn SetReadOnly(&mut self, _read_only: bool) -> ErrorResult {
Ok(())
} }
pub fn Required(&self) -> bool { pub fn Required(&self) -> bool {
false false
} }
pub fn SetRequired(&mut self, _required: bool, _rv: &mut ErrorResult) { pub fn SetRequired(&mut self, _required: bool) -> ErrorResult {
Ok(())
} }
pub fn Size(&self) -> u32 { pub fn Size(&self) -> u32 {
0 0
} }
pub fn SetSize(&mut self, _size: u32, _rv: &mut ErrorResult) { pub fn SetSize(&mut self, _size: u32) -> ErrorResult {
Ok(())
} }
pub fn Src(&self) -> DOMString { pub fn Src(&self) -> DOMString {
None None
} }
pub fn SetSrc(&mut self, _src: &DOMString, _rv: &mut ErrorResult) { pub fn SetSrc(&mut self, _src: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Step(&self) -> DOMString { pub fn Step(&self) -> DOMString {
None None
} }
pub fn SetStep(&mut self, _step: &DOMString, _rv: &mut ErrorResult) { pub fn SetStep(&mut self, _step: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Type(&self) -> DOMString { pub fn Type(&self) -> DOMString {
None None
} }
pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) { pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn DefaultValue(&self) -> DOMString { pub fn DefaultValue(&self) -> DOMString {
None None
} }
pub fn SetDefaultValue(&mut self, _default_value: &DOMString, _rv: &mut ErrorResult) { pub fn SetDefaultValue(&mut self, _default_value: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Value(&self) -> DOMString { pub fn Value(&self) -> DOMString {
None None
} }
pub fn SetValue(&mut self, _value: &DOMString, _rv: &mut ErrorResult) { pub fn SetValue(&mut self, _value: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Width(&self) -> u32 { pub fn Width(&self) -> u32 {
@ -234,8 +262,8 @@ impl HTMLInputElement {
pub fn SetWillValidate(&self, _will_validate: bool) { pub fn SetWillValidate(&self, _will_validate: bool) {
} }
pub fn GetValidationMessage(&self, _rv: &mut ErrorResult) -> DOMString { pub fn GetValidationMessage(&self) -> Fallible<DOMString> {
None Ok(None)
} }
pub fn CheckValidity(&self) -> bool { pub fn CheckValidity(&self) -> bool {
@ -248,38 +276,43 @@ impl HTMLInputElement {
pub fn Select(&self) { pub fn Select(&self) {
} }
pub fn GetSelectionStart(&self, _rv: &mut ErrorResult) -> i32 { pub fn GetSelectionStart(&self) -> Fallible<i32> {
0 Ok(0)
} }
pub fn SetSelectionStart(&mut self, _selection_start: i32, _rv: &mut ErrorResult) { pub fn SetSelectionStart(&mut self, _selection_start: i32) -> ErrorResult {
Ok(())
} }
pub fn GetSelectionEnd(&self, _rv: &mut ErrorResult) -> i32 { pub fn GetSelectionEnd(&self) -> Fallible<i32> {
0 Ok(0)
} }
pub fn SetSelectionEnd(&mut self, _selection_end: i32, _rv: &mut ErrorResult) { pub fn SetSelectionEnd(&mut self, _selection_end: i32) -> ErrorResult {
Ok(())
} }
pub fn GetSelectionDirection(&self, _rv: &mut ErrorResult) -> DOMString { pub fn GetSelectionDirection(&self) -> Fallible<DOMString> {
None Ok(None)
} }
pub fn SetSelectionDirection(&mut self, _selection_direction: &DOMString, _rv: &mut ErrorResult) { pub fn SetSelectionDirection(&mut self, _selection_direction: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Align(&self) -> DOMString { pub fn Align(&self) -> DOMString {
None None
} }
pub fn SetAlign(&mut self, _align: &DOMString, _rv: &mut ErrorResult) { pub fn SetAlign(&mut self, _align: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn UseMap(&self) -> DOMString { pub fn UseMap(&self) -> DOMString {
None None
} }
pub fn SetUseMap(&mut self, _align: &DOMString, _rv: &mut ErrorResult) { pub fn SetUseMap(&mut self, _align: &DOMString) -> ErrorResult {
Ok(())
} }
} }

View file

@ -14,6 +14,7 @@ impl HTMLLegendElement {
None None
} }
pub fn SetAlign(&mut self, _align: &DOMString, _rv: &mut ErrorResult) { pub fn SetAlign(&mut self, _align: &DOMString) -> ErrorResult {
Ok(())
} }
} }

View file

@ -14,13 +14,15 @@ impl HTMLLIElement {
0 0
} }
pub fn SetValue(&mut self, _value: i32, _rv: &mut ErrorResult) { pub fn SetValue(&mut self, _value: i32) -> ErrorResult {
Ok(())
} }
pub fn Type(&self) -> DOMString { pub fn Type(&self) -> DOMString {
None None
} }
pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) { pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
Ok(())
} }
} }

View file

@ -21,62 +21,71 @@ impl HTMLLinkElement {
None None
} }
pub fn SetHref(&mut self, _href: &DOMString, _rv: &mut ErrorResult) { pub fn SetHref(&mut self, _href: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn CrossOrigin(&self) -> DOMString { pub fn CrossOrigin(&self) -> DOMString {
None None
} }
pub fn SetCrossOrigin(&mut self, _cross_origin: &DOMString, _rv: &mut ErrorResult) { pub fn SetCrossOrigin(&mut self, _cross_origin: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Rel(&self) -> DOMString { pub fn Rel(&self) -> DOMString {
None None
} }
pub fn SetRel(&mut self, _rel: &DOMString, _rv: &mut ErrorResult) { pub fn SetRel(&mut self, _rel: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Media(&self) -> DOMString { pub fn Media(&self) -> DOMString {
None None
} }
pub fn SetMedia(&mut self, _media: &DOMString, _rv: &mut ErrorResult) { pub fn SetMedia(&mut self, _media: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Hreflang(&self) -> DOMString { pub fn Hreflang(&self) -> DOMString {
None None
} }
pub fn SetHreflang(&mut self, _href: &DOMString, _rv: &mut ErrorResult) { pub fn SetHreflang(&mut self, _href: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Type(&self) -> DOMString { pub fn Type(&self) -> DOMString {
None None
} }
pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) { pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Charset(&self) -> DOMString { pub fn Charset(&self) -> DOMString {
None None
} }
pub fn SetCharset(&mut self, _charset: &DOMString, _rv: &mut ErrorResult) { pub fn SetCharset(&mut self, _charset: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Rev(&self) -> DOMString { pub fn Rev(&self) -> DOMString {
None None
} }
pub fn SetRev(&mut self, _rev: &DOMString, _rv: &mut ErrorResult) { pub fn SetRev(&mut self, _rev: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Target(&self) -> DOMString { pub fn Target(&self) -> DOMString {
None None
} }
pub fn SetTarget(&mut self, _target: &DOMString, _rv: &mut ErrorResult) { pub fn SetTarget(&mut self, _target: &DOMString) -> ErrorResult {
Ok(())
} }
} }

View file

@ -16,7 +16,8 @@ impl HTMLMapElement {
None None
} }
pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) { pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
Ok(())
} }
fn get_scope_and_cx(&self) -> (*JSObject, *JSContext) { fn get_scope_and_cx(&self) -> (*JSObject, *JSContext) {

View file

@ -23,7 +23,8 @@ impl HTMLMediaElement {
None None
} }
pub fn SetSrc(&mut self, _src: &DOMString, _rv: &mut ErrorResult) { pub fn SetSrc(&mut self, _src: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn CurrentSrc(&self) -> DOMString { pub fn CurrentSrc(&self) -> DOMString {
@ -34,14 +35,16 @@ impl HTMLMediaElement {
None None
} }
pub fn SetCrossOrigin(&mut self, _cross_origin: &DOMString, _rv: &mut ErrorResult) { pub fn SetCrossOrigin(&mut self, _cross_origin: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Preload(&self) -> DOMString { pub fn Preload(&self) -> DOMString {
None None
} }
pub fn SetPreload(&mut self, _preload: &DOMString, _rv: &mut ErrorResult) { pub fn SetPreload(&mut self, _preload: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Load(&self) { pub fn Load(&self) {
@ -63,7 +66,8 @@ impl HTMLMediaElement {
0f64 0f64
} }
pub fn SetCurrentTime(&mut self, _current_time: f64, _rv: &mut ErrorResult) { pub fn SetCurrentTime(&mut self, _current_time: f64) -> ErrorResult {
Ok(())
} }
pub fn GetDuration(&self) -> f64 { pub fn GetDuration(&self) -> f64 {
@ -78,14 +82,16 @@ impl HTMLMediaElement {
0f64 0f64
} }
pub fn SetDefaultPlaybackRate(&mut self, _default_playback_rate: f64, _rv: &mut ErrorResult) { pub fn SetDefaultPlaybackRate(&mut self, _default_playback_rate: f64) -> ErrorResult {
Ok(())
} }
pub fn PlaybackRate(&self) -> f64 { pub fn PlaybackRate(&self) -> f64 {
0f64 0f64
} }
pub fn SetPlaybackRate(&mut self, _playback_rate: f64, _rv: &mut ErrorResult) { pub fn SetPlaybackRate(&mut self, _playback_rate: f64) -> ErrorResult {
Ok(())
} }
pub fn Ended(&self) -> bool { pub fn Ended(&self) -> bool {
@ -96,34 +102,40 @@ impl HTMLMediaElement {
false false
} }
pub fn SetAutoplay(&mut self, _autoplay: bool, _rv: &mut ErrorResult) { pub fn SetAutoplay(&mut self, _autoplay: bool) -> ErrorResult {
Ok(())
} }
pub fn Loop(&self) -> bool { pub fn Loop(&self) -> bool {
false false
} }
pub fn SetLoop(&mut self, _loop: bool, _rv: &mut ErrorResult) { pub fn SetLoop(&mut self, _loop: bool) -> ErrorResult {
Ok(())
} }
pub fn Play(&self, _rv: &mut ErrorResult) { pub fn Play(&self) -> ErrorResult {
Ok(())
} }
pub fn Pause(&self, _rv: &mut ErrorResult) { pub fn Pause(&self) -> ErrorResult {
Ok(())
} }
pub fn Controls(&self) -> bool { pub fn Controls(&self) -> bool {
false false
} }
pub fn SetControls(&mut self, _controls: bool, _rv: &mut ErrorResult) { pub fn SetControls(&mut self, _controls: bool) -> ErrorResult {
Ok(())
} }
pub fn Volume(&self) -> f64 { pub fn Volume(&self) -> f64 {
0f64 0f64
} }
pub fn SetVolume(&mut self, _volume: f64, _rv: &mut ErrorResult) { pub fn SetVolume(&mut self, _volume: f64) -> ErrorResult {
Ok(())
} }
pub fn Muted(&self) -> bool { pub fn Muted(&self) -> bool {
@ -137,6 +149,7 @@ impl HTMLMediaElement {
false false
} }
pub fn SetDefaultMuted(&mut self, _default_muted: bool, _rv: &mut ErrorResult) { pub fn SetDefaultMuted(&mut self, _default_muted: bool) -> ErrorResult {
Ok(())
} }
} }

View file

@ -14,27 +14,31 @@ impl HTMLMetaElement {
None None
} }
pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) { pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn HttpEquiv(&self) -> DOMString { pub fn HttpEquiv(&self) -> DOMString {
None None
} }
pub fn SetHttpEquiv(&mut self, _http_equiv: &DOMString, _rv: &mut ErrorResult) { pub fn SetHttpEquiv(&mut self, _http_equiv: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Content(&self) -> DOMString { pub fn Content(&self) -> DOMString {
None None
} }
pub fn SetContent(&mut self, _content: &DOMString, _rv: &mut ErrorResult) { pub fn SetContent(&mut self, _content: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Scheme(&self) -> DOMString { pub fn Scheme(&self) -> DOMString {
None None
} }
pub fn SetScheme(&mut self, _scheme: &DOMString, _rv: &mut ErrorResult) { pub fn SetScheme(&mut self, _scheme: &DOMString) -> ErrorResult {
Ok(())
} }
} }

View file

@ -14,41 +14,47 @@ impl HTMLMeterElement {
0.0 0.0
} }
pub fn SetValue(&mut self, _value: f64, _rv: &mut ErrorResult) { pub fn SetValue(&mut self, _value: f64) -> ErrorResult {
Ok(())
} }
pub fn Min(&self) -> f64 { pub fn Min(&self) -> f64 {
0.0 0.0
} }
pub fn SetMin(&mut self, _min: f64, _rv: &mut ErrorResult) { pub fn SetMin(&mut self, _min: f64) -> ErrorResult {
Ok(())
} }
pub fn Max(&self) -> f64 { pub fn Max(&self) -> f64 {
0.0 0.0
} }
pub fn SetMax(&mut self, _max: f64, _rv: &mut ErrorResult) { pub fn SetMax(&mut self, _max: f64) -> ErrorResult {
Ok(())
} }
pub fn Low(&self) -> f64 { pub fn Low(&self) -> f64 {
0.0 0.0
} }
pub fn SetLow(&mut self, _low: f64, _rv: &mut ErrorResult) { pub fn SetLow(&mut self, _low: f64) -> ErrorResult {
Ok(())
} }
pub fn High(&self) -> f64 { pub fn High(&self) -> f64 {
0.0 0.0
} }
pub fn SetHigh(&mut self, _high: f64, _rv: &mut ErrorResult) { pub fn SetHigh(&mut self, _high: f64) -> ErrorResult {
Ok(())
} }
pub fn Optimum(&self) -> f64 { pub fn Optimum(&self) -> f64 {
0.0 0.0
} }
pub fn SetOptimum(&mut self, _optimum: f64, _rv: &mut ErrorResult) { pub fn SetOptimum(&mut self, _optimum: f64) -> ErrorResult {
Ok(())
} }
} }

View file

@ -14,13 +14,15 @@ impl HTMLModElement {
None None
} }
pub fn SetCite(&mut self, _cite: &DOMString, _rv: &mut ErrorResult) { pub fn SetCite(&mut self, _cite: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn DateTime(&self) -> DOMString { pub fn DateTime(&self) -> DOMString {
None None
} }
pub fn SetDateTime(&mut self, _datetime: &DOMString, _rv: &mut ErrorResult) { pub fn SetDateTime(&mut self, _datetime: &DOMString) -> ErrorResult {
Ok(())
} }
} }

View file

@ -18,28 +18,32 @@ impl HTMLObjectElement {
None None
} }
pub fn SetData(&mut self, _data: &DOMString, _rv: &mut ErrorResult) { pub fn SetData(&mut self, _data: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Type(&self) -> DOMString { pub fn Type(&self) -> DOMString {
None None
} }
pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) { pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Name(&self) -> DOMString { pub fn Name(&self) -> DOMString {
None None
} }
pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) { pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn UseMap(&self) -> DOMString { pub fn UseMap(&self) -> DOMString {
None None
} }
pub fn SetUseMap(&mut self, _use_map: &DOMString, _rv: &mut ErrorResult) { pub fn SetUseMap(&mut self, _use_map: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn GetForm(&self) -> Option<AbstractNode<ScriptView>> { pub fn GetForm(&self) -> Option<AbstractNode<ScriptView>> {
@ -50,14 +54,16 @@ impl HTMLObjectElement {
None None
} }
pub fn SetWidth(&mut self, _width: &DOMString, _rv: &mut ErrorResult) { pub fn SetWidth(&mut self, _width: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Height(&self) -> DOMString { pub fn Height(&self) -> DOMString {
None None
} }
pub fn SetHeight(&mut self, _height: &DOMString, _rv: &mut ErrorResult) { pub fn SetHeight(&mut self, _height: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn GetContentDocument(&self) -> Option<AbstractDocument> { pub fn GetContentDocument(&self) -> Option<AbstractDocument> {
@ -91,73 +97,83 @@ impl HTMLObjectElement {
None None
} }
pub fn SetAlign(&mut self, _align: &DOMString, _rv: &mut ErrorResult) { pub fn SetAlign(&mut self, _align: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Archive(&self) -> DOMString { pub fn Archive(&self) -> DOMString {
None None
} }
pub fn SetArchive(&mut self, _archive: &DOMString, _rv: &mut ErrorResult) { pub fn SetArchive(&mut self, _archive: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Code(&self) -> DOMString { pub fn Code(&self) -> DOMString {
None None
} }
pub fn SetCode(&mut self, _code: &DOMString, _rv: &mut ErrorResult) { pub fn SetCode(&mut self, _code: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Declare(&self) -> bool { pub fn Declare(&self) -> bool {
false false
} }
pub fn SetDeclare(&mut self, _declare: bool, _rv: &mut ErrorResult) { pub fn SetDeclare(&mut self, _declare: bool) -> ErrorResult {
Ok(())
} }
pub fn Hspace(&self) -> u32 { pub fn Hspace(&self) -> u32 {
0 0
} }
pub fn SetHspace(&mut self, _hspace: u32, _rv: &mut ErrorResult) { pub fn SetHspace(&mut self, _hspace: u32) -> ErrorResult {
Ok(())
} }
pub fn Standby(&self) -> DOMString { pub fn Standby(&self) -> DOMString {
None None
} }
pub fn SetStandby(&mut self, _standby: &DOMString, _rv: &mut ErrorResult) { pub fn SetStandby(&mut self, _standby: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Vspace(&self) -> u32 { pub fn Vspace(&self) -> u32 {
0 0
} }
pub fn SetVspace(&mut self, _vspace: u32, _rv: &mut ErrorResult) { pub fn SetVspace(&mut self, _vspace: u32) -> ErrorResult {
Ok(())
} }
pub fn CodeBase(&self) -> DOMString { pub fn CodeBase(&self) -> DOMString {
None None
} }
pub fn SetCodeBase(&mut self, _codebase: &DOMString, _rv: &mut ErrorResult) { pub fn SetCodeBase(&mut self, _codebase: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn CodeType(&self) -> DOMString { pub fn CodeType(&self) -> DOMString {
None None
} }
pub fn SetCodeType(&mut self, _codetype: &DOMString, _rv: &mut ErrorResult) { pub fn SetCodeType(&mut self, _codetype: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Border(&self) -> DOMString { pub fn Border(&self) -> DOMString {
None None
} }
pub fn SetBorder(&mut self, _border: &DOMString, _rv: &mut ErrorResult) { pub fn SetBorder(&mut self, _border: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn GetSVGDocument(&self) -> Option<AbstractDocument> { pub fn GetSVGDocument(&self) -> Option<AbstractDocument> {
None None
} }
} }

View file

@ -14,27 +14,31 @@ impl HTMLOListElement {
false false
} }
pub fn SetReversed(&self, _reversed: bool, _rv: &mut ErrorResult) { pub fn SetReversed(&self, _reversed: bool) -> ErrorResult {
Ok(())
} }
pub fn Start(&self) -> i32 { pub fn Start(&self) -> i32 {
0 0
} }
pub fn SetStart(&mut self, _start: i32, _rv: &mut ErrorResult) { pub fn SetStart(&mut self, _start: i32) -> ErrorResult {
Ok(())
} }
pub fn Type(&self) -> DOMString { pub fn Type(&self) -> DOMString {
None None
} }
pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) { pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Compact(&self) -> bool { pub fn Compact(&self) -> bool {
false false
} }
pub fn SetCompact(&self, _compact: bool, _rv: &mut ErrorResult) { pub fn SetCompact(&self, _compact: bool) -> ErrorResult {
Ok(())
} }
} }

View file

@ -14,13 +14,15 @@ impl HTMLOptGroupElement {
false false
} }
pub fn SetDisabled(&mut self, _disabled: bool, _rv: &mut ErrorResult) { pub fn SetDisabled(&mut self, _disabled: bool) -> ErrorResult {
Ok(())
} }
pub fn Label(&self) -> DOMString { pub fn Label(&self) -> DOMString {
None None
} }
pub fn SetLabel(&mut self, _label: &DOMString, _rv: &mut ErrorResult) { pub fn SetLabel(&mut self, _label: &DOMString) -> ErrorResult {
Ok(())
} }
} }

View file

@ -15,7 +15,8 @@ impl HTMLOptionElement {
false false
} }
pub fn SetDisabled(&mut self, _disabled: bool, _rv: &mut ErrorResult) { pub fn SetDisabled(&mut self, _disabled: bool) -> ErrorResult {
Ok(())
} }
pub fn GetForm(&self) -> Option<AbstractNode<ScriptView>> { pub fn GetForm(&self) -> Option<AbstractNode<ScriptView>> {
@ -26,38 +27,43 @@ impl HTMLOptionElement {
None None
} }
pub fn SetLabel(&mut self, _label: &DOMString, _rv: &mut ErrorResult) { pub fn SetLabel(&mut self, _label: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn DefaultSelected(&self) -> bool { pub fn DefaultSelected(&self) -> bool {
false false
} }
pub fn SetDefaultSelected(&mut self, _default_selected: bool, _rv: &mut ErrorResult) { pub fn SetDefaultSelected(&mut self, _default_selected: bool) -> ErrorResult {
Ok(())
} }
pub fn Selected(&self) -> bool { pub fn Selected(&self) -> bool {
false false
} }
pub fn SetSelected(&mut self, _selected: bool, _rv: &mut ErrorResult) { pub fn SetSelected(&mut self, _selected: bool) -> ErrorResult {
Ok(())
} }
pub fn Value(&self) -> DOMString { pub fn Value(&self) -> DOMString {
None None
} }
pub fn SetValue(&mut self, _value: &DOMString, _rv: &mut ErrorResult) { pub fn SetValue(&mut self, _value: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Text(&self) -> DOMString { pub fn Text(&self) -> DOMString {
None None
} }
pub fn SetText(&mut self, _text: &DOMString, _rv: &mut ErrorResult) { pub fn SetText(&mut self, _text: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Index(&self) -> i32 { pub fn Index(&self) -> i32 {
0 0
} }
} }

View file

@ -20,7 +20,8 @@ impl HTMLOutputElement {
None None
} }
pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) { pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Type(&self) -> DOMString { pub fn Type(&self) -> DOMString {
@ -31,14 +32,16 @@ impl HTMLOutputElement {
None None
} }
pub fn SetDefaultValue(&mut self, _value: &DOMString, _rv: &mut ErrorResult) { pub fn SetDefaultValue(&mut self, _value: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Value(&self) -> DOMString { pub fn Value(&self) -> DOMString {
None None
} }
pub fn SetValue(&mut self, _value: &DOMString, _rv: &mut ErrorResult) { pub fn SetValue(&mut self, _value: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn WillValidate(&self) -> bool { pub fn WillValidate(&self) -> bool {
@ -59,7 +62,8 @@ impl HTMLOutputElement {
None None
} }
pub fn SetValidationMessage(&mut self, _message: &DOMString, _rv: &mut ErrorResult) { pub fn SetValidationMessage(&mut self, _message: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn CheckValidity(&self) -> bool { pub fn CheckValidity(&self) -> bool {

View file

@ -14,6 +14,7 @@ impl HTMLParagraphElement {
None None
} }
pub fn SetAlign(&mut self, _align: &DOMString, _rv: &mut ErrorResult) { pub fn SetAlign(&mut self, _align: &DOMString) -> ErrorResult {
Ok(())
} }
} }

View file

@ -14,27 +14,31 @@ impl HTMLParamElement {
None None
} }
pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) { pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Value(&self) -> DOMString { pub fn Value(&self) -> DOMString {
None None
} }
pub fn SetValue(&mut self, _value: &DOMString, _rv: &mut ErrorResult) { pub fn SetValue(&mut self, _value: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Type(&self) -> DOMString { pub fn Type(&self) -> DOMString {
None None
} }
pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) { pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn ValueType(&self) -> DOMString { pub fn ValueType(&self) -> DOMString {
None None
} }
pub fn SetValueType(&mut self, _value_type: &DOMString, _rv: &mut ErrorResult) { pub fn SetValueType(&mut self, _value_type: &DOMString) -> ErrorResult {
Ok(())
} }
} }

View file

@ -14,6 +14,7 @@ impl HTMLPreElement {
0 0
} }
pub fn SetWidth(&mut self, _width: i32, _rv: &mut ErrorResult) { pub fn SetWidth(&mut self, _width: i32) -> ErrorResult {
Ok(())
} }
} }

View file

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::utils::{ErrorResult}; use dom::bindings::utils::{ErrorResult, Fallible};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLProgressElement { pub struct HTMLProgressElement {
@ -14,21 +14,23 @@ impl HTMLProgressElement {
0f64 0f64
} }
pub fn SetValue(&mut self, _value: f64, _rv: &mut ErrorResult) { pub fn SetValue(&mut self, _value: f64) -> ErrorResult {
Ok(())
} }
pub fn Max(&self) -> f64 { pub fn Max(&self) -> f64 {
0f64 0f64
} }
pub fn SetMax(&mut self, _max: f64, _rv: &mut ErrorResult) { pub fn SetMax(&mut self, _max: f64) -> ErrorResult {
Ok(())
} }
pub fn Position(&self) -> f64 { pub fn Position(&self) -> f64 {
0f64 0f64
} }
pub fn GetPositiom(&self, _rv: &mut ErrorResult) -> f64 { pub fn GetPositiom(&self) -> Fallible<f64> {
0f64 Ok(0f64)
} }
} }

View file

@ -14,6 +14,7 @@ impl HTMLQuoteElement {
None None
} }
pub fn SetCite(&self, _cite: &DOMString, _rv: &mut ErrorResult) { pub fn SetCite(&self, _cite: &DOMString) -> ErrorResult {
Ok(())
} }
} }

View file

@ -14,62 +14,71 @@ impl HTMLScriptElement {
None None
} }
pub fn SetSrc(&mut self, _src: &DOMString, _rv: &mut ErrorResult) { pub fn SetSrc(&mut self, _src: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Type(&self) -> DOMString { pub fn Type(&self) -> DOMString {
None None
} }
pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) { pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Charset(&self) -> DOMString { pub fn Charset(&self) -> DOMString {
None None
} }
pub fn SetCharset(&mut self, _charset: &DOMString, _rv: &mut ErrorResult) { pub fn SetCharset(&mut self, _charset: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Async(&self) -> bool { pub fn Async(&self) -> bool {
false false
} }
pub fn SetAsync(&self, _async: bool, _rv: &mut ErrorResult) { pub fn SetAsync(&self, _async: bool) -> ErrorResult {
Ok(())
} }
pub fn Defer(&self) -> bool { pub fn Defer(&self) -> bool {
false false
} }
pub fn SetDefer(&self, _defer: bool, _rv: &mut ErrorResult) { pub fn SetDefer(&self, _defer: bool) -> ErrorResult {
Ok(())
} }
pub fn CrossOrigin(&self) -> DOMString { pub fn CrossOrigin(&self) -> DOMString {
None None
} }
pub fn SetCrossOrigin(&mut self, _cross_origin: &DOMString, _rv: &mut ErrorResult) { pub fn SetCrossOrigin(&mut self, _cross_origin: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Text(&self) -> DOMString { pub fn Text(&self) -> DOMString {
None None
} }
pub fn SetText(&mut self, _text: &DOMString, _rv: &mut ErrorResult) { pub fn SetText(&mut self, _text: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Event(&self) -> DOMString { pub fn Event(&self) -> DOMString {
None None
} }
pub fn SetEvent(&mut self, _event: &DOMString, _rv: &mut ErrorResult) { pub fn SetEvent(&mut self, _event: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn HtmlFor(&self) -> DOMString { pub fn HtmlFor(&self) -> DOMString {
None None
} }
pub fn SetHtmlFor(&mut self, _html_for: &DOMString, _rv: &mut ErrorResult) { pub fn SetHtmlFor(&mut self, _html_for: &DOMString) -> ErrorResult {
Ok(())
} }
} }

View file

@ -16,14 +16,16 @@ impl HTMLSelectElement {
false false
} }
pub fn SetAutofocus(&mut self, _autofocus: bool, _rv: &mut ErrorResult) { pub fn SetAutofocus(&mut self, _autofocus: bool) -> ErrorResult {
Ok(())
} }
pub fn Disabled(&self) -> bool { pub fn Disabled(&self) -> bool {
false false
} }
pub fn SetDisabled(&mut self, _disabled: bool, _rv: &mut ErrorResult) { pub fn SetDisabled(&mut self, _disabled: bool) -> ErrorResult {
Ok(())
} }
pub fn GetForm(&self) -> Option<AbstractNode<ScriptView>> { pub fn GetForm(&self) -> Option<AbstractNode<ScriptView>> {
@ -34,28 +36,32 @@ impl HTMLSelectElement {
false false
} }
pub fn SetMultiple(&mut self, _multiple: bool, _rv: &mut ErrorResult) { pub fn SetMultiple(&mut self, _multiple: bool) -> ErrorResult {
Ok(())
} }
pub fn Name(&self) -> DOMString { pub fn Name(&self) -> DOMString {
None None
} }
pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) { pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Required(&self) -> bool { pub fn Required(&self) -> bool {
false false
} }
pub fn SetRequired(&mut self, _multiple: bool, _rv: &mut ErrorResult) { pub fn SetRequired(&mut self, _multiple: bool) -> ErrorResult {
Ok(())
} }
pub fn Size(&self) -> u32 { pub fn Size(&self) -> u32 {
0 0
} }
pub fn SetSize(&mut self, _size: u32, _rv: &mut ErrorResult) { pub fn SetSize(&mut self, _size: u32) -> ErrorResult {
Ok(())
} }
pub fn Type(&self) -> DOMString { pub fn Type(&self) -> DOMString {
@ -66,7 +72,8 @@ impl HTMLSelectElement {
0 0
} }
pub fn SetLength(&mut self, _length: u32, _rv: &mut ErrorResult) { pub fn SetLength(&mut self, _length: u32) -> ErrorResult {
Ok(())
} }
pub fn Item(&self, _index: u32) -> Option<AbstractNode<ScriptView>> { pub fn Item(&self, _index: u32) -> Option<AbstractNode<ScriptView>> {
@ -81,7 +88,8 @@ impl HTMLSelectElement {
None None
} }
pub fn IndexedSetter(&mut self, _index: u32, _option: Option<AbstractNode<ScriptView>>, _rv: &mut ErrorResult) { pub fn IndexedSetter(&mut self, _index: u32, _option: Option<AbstractNode<ScriptView>>) -> ErrorResult {
Ok(())
} }
pub fn Remove_(&self) { pub fn Remove_(&self) {
@ -94,7 +102,8 @@ impl HTMLSelectElement {
0 0
} }
pub fn SetSelectedIndex(&mut self, _index: i32, _rv: &mut ErrorResult) { pub fn SetSelectedIndex(&mut self, _index: i32) -> ErrorResult {
Ok(())
} }
pub fn Value(&self) -> DOMString { pub fn Value(&self) -> DOMString {
@ -122,7 +131,8 @@ impl HTMLSelectElement {
None None
} }
pub fn SetValidationMessage(&mut self, _message: &DOMString, _rv: &mut ErrorResult) { pub fn SetValidationMessage(&mut self, _message: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn CheckValidity(&self) -> bool { pub fn CheckValidity(&self) -> bool {
@ -131,4 +141,4 @@ impl HTMLSelectElement {
pub fn SetCustomValidity(&mut self, _error: &DOMString) { pub fn SetCustomValidity(&mut self, _error: &DOMString) {
} }
} }

View file

@ -14,20 +14,23 @@ impl HTMLSourceElement {
None None
} }
pub fn SetSrc(&mut self, _src: &DOMString, _rv: &mut ErrorResult) { pub fn SetSrc(&mut self, _src: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Type(&self) -> DOMString { pub fn Type(&self) -> DOMString {
None None
} }
pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) { pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Media(&self) -> DOMString { pub fn Media(&self) -> DOMString {
None None
} }
pub fn SetMedia(&mut self, _media: &DOMString, _rv: &mut ErrorResult) { pub fn SetMedia(&mut self, _media: &DOMString) -> ErrorResult {
Ok(())
} }
} }

View file

@ -21,20 +21,23 @@ impl HTMLStyleElement {
None None
} }
pub fn SetMedia(&mut self, _media: &DOMString, _rv: &mut ErrorResult) { pub fn SetMedia(&mut self, _media: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Type(&self) -> DOMString { pub fn Type(&self) -> DOMString {
None None
} }
pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) { pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Scoped(&self) -> bool { pub fn Scoped(&self) -> bool {
false false
} }
pub fn SetScoped(&self, _scoped: bool, _rv: &mut ErrorResult) { pub fn SetScoped(&self, _scoped: bool) -> ErrorResult {
Ok(())
} }
} }

View file

@ -14,6 +14,7 @@ impl HTMLTableCaptionElement {
None None
} }
pub fn SetAlign(&mut self, _align: &DOMString, _rv: &mut ErrorResult) { pub fn SetAlign(&mut self, _align: &DOMString) -> ErrorResult {
Ok(())
} }
} }

View file

@ -14,104 +14,119 @@ impl HTMLTableCellElement {
0 0
} }
pub fn SetColSpan(&self, _col_span: u32, _rv: &mut ErrorResult) { pub fn SetColSpan(&self, _col_span: u32) -> ErrorResult {
Ok(())
} }
pub fn RowSpan(&self) -> u32 { pub fn RowSpan(&self) -> u32 {
0 0
} }
pub fn SetRowSpan(&self, _col_span: u32, _rv: &mut ErrorResult) { pub fn SetRowSpan(&self, _col_span: u32) -> ErrorResult {
Ok(())
} }
pub fn Headers(&self) -> DOMString { pub fn Headers(&self) -> DOMString {
None None
} }
pub fn SetHeaders(&self, _headers: &DOMString, _rv: &mut ErrorResult) { pub fn SetHeaders(&self, _headers: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn CellIndex(&self) -> i32 { pub fn CellIndex(&self) -> i32 {
0 0
} }
pub fn GetCellIndex(&self, _cell_index: i32, _rv: &mut ErrorResult) { pub fn GetCellIndex(&self, _cell_index: i32) -> ErrorResult {
Ok(())
} }
pub fn Abbr(&self) -> DOMString { pub fn Abbr(&self) -> DOMString {
None None
} }
pub fn SetAbbr(&self, _abbr: &DOMString, _rv: &mut ErrorResult) { pub fn SetAbbr(&self, _abbr: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Scope(&self) -> DOMString { pub fn Scope(&self) -> DOMString {
None None
} }
pub fn SetScope(&self, _abbr: &DOMString, _rv: &mut ErrorResult) { pub fn SetScope(&self, _abbr: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Align(&self) -> DOMString { pub fn Align(&self) -> DOMString {
None None
} }
pub fn SetAlign(&self, _align: &DOMString, _rv: &mut ErrorResult) { pub fn SetAlign(&self, _align: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Axis(&self) -> DOMString { pub fn Axis(&self) -> DOMString {
None None
} }
pub fn SetAxis(&self, _axis: &DOMString, _rv: &mut ErrorResult) { pub fn SetAxis(&self, _axis: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Height(&self) -> DOMString { pub fn Height(&self) -> DOMString {
None None
} }
pub fn SetHeight(&self, _height: &DOMString, _rv: &mut ErrorResult) { pub fn SetHeight(&self, _height: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Width(&self) -> DOMString { pub fn Width(&self) -> DOMString {
None None
} }
pub fn SetWidth(&self, _width: &DOMString, _rv: &mut ErrorResult) { pub fn SetWidth(&self, _width: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Ch(&self) -> DOMString { pub fn Ch(&self) -> DOMString {
None None
} }
pub fn SetCh(&self, _ch: &DOMString, _rv: &mut ErrorResult) { pub fn SetCh(&self, _ch: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn ChOff(&self) -> DOMString { pub fn ChOff(&self) -> DOMString {
None None
} }
pub fn SetChOff(&self, _ch_off: &DOMString, _rv: &mut ErrorResult) { pub fn SetChOff(&self, _ch_off: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn NoWrap(&self) -> bool { pub fn NoWrap(&self) -> bool {
false false
} }
pub fn SetNoWrap(&self, _no_wrap: bool, _rv: &mut ErrorResult) { pub fn SetNoWrap(&self, _no_wrap: bool) -> ErrorResult {
Ok(())
} }
pub fn VAlign(&self) -> DOMString { pub fn VAlign(&self) -> DOMString {
None None
} }
pub fn SetVAlign(&self, _valign: &DOMString, _rv: &mut ErrorResult) { pub fn SetVAlign(&self, _valign: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn BgColor(&self) -> DOMString { pub fn BgColor(&self) -> DOMString {
None None
} }
pub fn SetBgColor(&self, _bg_color: &DOMString, _rv: &mut ErrorResult) { pub fn SetBgColor(&self, _bg_color: &DOMString) -> ErrorResult {
Ok(())
} }
} }

View file

@ -14,41 +14,47 @@ impl HTMLTableColElement {
0 0
} }
pub fn SetSpan(&mut self, _span: u32, _rv: &mut ErrorResult) { pub fn SetSpan(&mut self, _span: u32) -> ErrorResult {
Ok(())
} }
pub fn Align(&self) -> DOMString { pub fn Align(&self) -> DOMString {
None None
} }
pub fn SetAlign(&mut self, _align: &DOMString, _rv: &mut ErrorResult) { pub fn SetAlign(&mut self, _align: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Ch(&self) -> DOMString { pub fn Ch(&self) -> DOMString {
None None
} }
pub fn SetCh(&mut self, _ch: &DOMString, _rv: &mut ErrorResult) { pub fn SetCh(&mut self, _ch: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn ChOff(&self) -> DOMString { pub fn ChOff(&self) -> DOMString {
None None
} }
pub fn SetChOff(&mut self, _ch_off: &DOMString, _rv: &mut ErrorResult) { pub fn SetChOff(&mut self, _ch_off: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn VAlign(&self) -> DOMString { pub fn VAlign(&self) -> DOMString {
None None
} }
pub fn SetVAlign(&mut self, _v_align: &DOMString, _rv: &mut ErrorResult) { pub fn SetVAlign(&mut self, _v_align: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Width(&self) -> DOMString { pub fn Width(&self) -> DOMString {
None None
} }
pub fn SetWidth(&mut self, _width: &DOMString, _rv: &mut ErrorResult) { pub fn SetWidth(&mut self, _width: &DOMString) -> ErrorResult {
Ok(())
} }
} }

View file

@ -20,7 +20,8 @@ impl HTMLTableElement {
pub fn DeleteTFoot(&self) { pub fn DeleteTFoot(&self) {
} }
pub fn DeleteRow(&mut self, _index: i32, _rv: &mut ErrorResult) { pub fn DeleteRow(&mut self, _index: i32) -> ErrorResult {
Ok(())
} }
pub fn Sortable(&self) -> bool { pub fn Sortable(&self) -> bool {
@ -37,62 +38,71 @@ impl HTMLTableElement {
None None
} }
pub fn SetAlign(&self, _align: &DOMString, _rv: &mut ErrorResult) { pub fn SetAlign(&self, _align: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Border(&self) -> DOMString { pub fn Border(&self) -> DOMString {
None None
} }
pub fn SetBorder(&self, _border: &DOMString, _rv: &mut ErrorResult) { pub fn SetBorder(&self, _border: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Frame(&self) -> DOMString { pub fn Frame(&self) -> DOMString {
None None
} }
pub fn SetFrame(&self, _frame: &DOMString, _rv: &mut ErrorResult) { pub fn SetFrame(&self, _frame: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Rules(&self) -> DOMString { pub fn Rules(&self) -> DOMString {
None None
} }
pub fn SetRules(&self, _rules: &DOMString, _rv: &mut ErrorResult) { pub fn SetRules(&self, _rules: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Summary(&self) -> DOMString { pub fn Summary(&self) -> DOMString {
None None
} }
pub fn SetSummary(&self, _summary: &DOMString, _rv: &mut ErrorResult) { pub fn SetSummary(&self, _summary: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Width(&self) -> DOMString { pub fn Width(&self) -> DOMString {
None None
} }
pub fn SetWidth(&self, _width: &DOMString, _rv: &mut ErrorResult) { pub fn SetWidth(&self, _width: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn BgColor(&self) -> DOMString { pub fn BgColor(&self) -> DOMString {
None None
} }
pub fn SetBgColor(&self, _bg_color: &DOMString, _rv: &mut ErrorResult) { pub fn SetBgColor(&self, _bg_color: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn CellPadding(&self) -> DOMString { pub fn CellPadding(&self) -> DOMString {
None None
} }
pub fn SetCellPadding(&self, _cell_padding: &DOMString, _rv: &mut ErrorResult) { pub fn SetCellPadding(&self, _cell_padding: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn CellSpacing(&self) -> DOMString { pub fn CellSpacing(&self) -> DOMString {
None None
} }
pub fn SetCellSpacing(&self, _cell_spacing: &DOMString, _rv: &mut ErrorResult) { pub fn SetCellSpacing(&self, _cell_spacing: &DOMString) -> ErrorResult {
Ok(())
} }
} }

View file

@ -26,41 +26,47 @@ impl HTMLTableRowElement {
0 0
} }
pub fn DeleteCell(&mut self, _index: i32, _rv: &mut ErrorResult) { pub fn DeleteCell(&mut self, _index: i32) -> ErrorResult {
Ok(())
} }
pub fn Align(&self) -> DOMString { pub fn Align(&self) -> DOMString {
None None
} }
pub fn SetAlign(&self, _align: &DOMString, _rv: &mut ErrorResult) { pub fn SetAlign(&self, _align: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Ch(&self) -> DOMString { pub fn Ch(&self) -> DOMString {
None None
} }
pub fn SetCh(&self, _ch: &DOMString, _rv: &mut ErrorResult) { pub fn SetCh(&self, _ch: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn ChOff(&self) -> DOMString { pub fn ChOff(&self) -> DOMString {
None None
} }
pub fn SetChOff(&self, _ch_off: &DOMString, _rv: &mut ErrorResult) { pub fn SetChOff(&self, _ch_off: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn VAlign(&self) -> DOMString { pub fn VAlign(&self) -> DOMString {
None None
} }
pub fn SetVAlign(&self, _v_align: &DOMString, _rv: &mut ErrorResult) { pub fn SetVAlign(&self, _v_align: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn BgColor(&self) -> DOMString { pub fn BgColor(&self) -> DOMString {
None None
} }
pub fn SetBgColor(&self, _bg_color: &DOMString, _rv: &mut ErrorResult) { pub fn SetBgColor(&self, _bg_color: &DOMString) -> ErrorResult {
Ok(())
} }
} }

View file

@ -10,34 +10,39 @@ pub struct HTMLTableSectionElement {
} }
impl HTMLTableSectionElement { impl HTMLTableSectionElement {
pub fn DeleteRow(&mut self, _index: i32, _rv: &mut ErrorResult) { pub fn DeleteRow(&mut self, _index: i32) -> ErrorResult {
Ok(())
} }
pub fn Align(&self) -> DOMString { pub fn Align(&self) -> DOMString {
None None
} }
pub fn SetAlign(&mut self, _align: &DOMString, _rv: &mut ErrorResult) { pub fn SetAlign(&mut self, _align: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Ch(&self) -> DOMString { pub fn Ch(&self) -> DOMString {
None None
} }
pub fn SetCh(&mut self, _ch: &DOMString, _rv: &mut ErrorResult) { pub fn SetCh(&mut self, _ch: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn ChOff(&self) -> DOMString { pub fn ChOff(&self) -> DOMString {
None None
} }
pub fn SetChOff(&mut self, _ch_off: &DOMString, _rv: &mut ErrorResult) { pub fn SetChOff(&mut self, _ch_off: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn VAlign(&self) -> DOMString { pub fn VAlign(&self) -> DOMString {
None None
} }
pub fn SetVAlign(&mut self, _v_align: &DOMString, _rv: &mut ErrorResult) { pub fn SetVAlign(&mut self, _v_align: &DOMString) -> ErrorResult {
Ok(())
} }
} }

View file

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::utils::{DOMString, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult, Fallible};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLTextAreaElement { pub struct HTMLTextAreaElement {
@ -14,70 +14,80 @@ impl HTMLTextAreaElement {
false false
} }
pub fn SetAutofocus(&mut self, _autofocus: bool, _rv: &mut ErrorResult) { pub fn SetAutofocus(&mut self, _autofocus: bool) -> ErrorResult {
Ok(())
} }
pub fn Cols(&self) -> u32 { pub fn Cols(&self) -> u32 {
0 0
} }
pub fn SetCols(&self, _cols: u32, _rv: &mut ErrorResult) { pub fn SetCols(&self, _cols: u32) -> ErrorResult {
Ok(())
} }
pub fn Disabled(&self) -> bool { pub fn Disabled(&self) -> bool {
false false
} }
pub fn SetDisabled(&mut self, _disabled: bool, _rv: &mut ErrorResult) { pub fn SetDisabled(&mut self, _disabled: bool) -> ErrorResult {
Ok(())
} }
pub fn MaxLength(&self) -> i32 { pub fn MaxLength(&self) -> i32 {
0 0
} }
pub fn SetMaxLength(&self, _max_length: i32, _rv: &mut ErrorResult) { pub fn SetMaxLength(&self, _max_length: i32) -> ErrorResult {
Ok(())
} }
pub fn Name(&self) -> DOMString { pub fn Name(&self) -> DOMString {
None None
} }
pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) { pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Placeholder(&self) -> DOMString { pub fn Placeholder(&self) -> DOMString {
None None
} }
pub fn SetPlaceholder(&mut self, _placeholder: &DOMString, _rv: &mut ErrorResult) { pub fn SetPlaceholder(&mut self, _placeholder: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn ReadOnly(&self) -> bool { pub fn ReadOnly(&self) -> bool {
false false
} }
pub fn SetReadOnly(&mut self, _read_only: bool, _rv: &mut ErrorResult) { pub fn SetReadOnly(&mut self, _read_only: bool) -> ErrorResult {
Ok(())
} }
pub fn Required(&self) -> bool { pub fn Required(&self) -> bool {
false false
} }
pub fn SetRequired(&mut self, _required: bool, _rv: &mut ErrorResult) { pub fn SetRequired(&mut self, _required: bool) -> ErrorResult {
Ok(())
} }
pub fn Rows(&self) -> u32 { pub fn Rows(&self) -> u32 {
0 0
} }
pub fn SetRows(&self, _rows: u32, _rv: &mut ErrorResult) { pub fn SetRows(&self, _rows: u32) -> ErrorResult {
Ok(())
} }
pub fn Wrap(&self) -> DOMString { pub fn Wrap(&self) -> DOMString {
None None
} }
pub fn SetWrap(&mut self, _wrap: &DOMString, _rv: &mut ErrorResult) { pub fn SetWrap(&mut self, _wrap: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Type(&self) -> DOMString { pub fn Type(&self) -> DOMString {
@ -91,7 +101,8 @@ impl HTMLTextAreaElement {
None None
} }
pub fn SetDefaultValue(&mut self, _default_value: &DOMString, _rv: &mut ErrorResult) { pub fn SetDefaultValue(&mut self, _default_value: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Value(&self) -> DOMString { pub fn Value(&self) -> DOMString {
@ -105,14 +116,16 @@ impl HTMLTextAreaElement {
0 0
} }
pub fn SetTextLength(&self, _text_length: u32, _rv: &mut ErrorResult) { pub fn SetTextLength(&self, _text_length: u32) -> ErrorResult {
Ok(())
} }
pub fn WillValidate(&self) -> bool { pub fn WillValidate(&self) -> bool {
false false
} }
pub fn SetWillValidate(&mut self, _will_validate: bool, _rv: &mut ErrorResult) { pub fn SetWillValidate(&mut self, _will_validate: bool) -> ErrorResult {
Ok(())
} }
pub fn ValidationMessage(&self) -> DOMString { pub fn ValidationMessage(&self) -> DOMString {
@ -129,25 +142,28 @@ impl HTMLTextAreaElement {
pub fn Select(&self) { pub fn Select(&self) {
} }
pub fn GetSelectionStart(&self, _rv: &mut ErrorResult) -> u32 { pub fn GetSelectionStart(&self) -> Fallible<u32> {
0 Ok(0)
} }
pub fn SetSelectionStart(&self, _selection_start: u32, _rv: &mut ErrorResult) { pub fn SetSelectionStart(&self, _selection_start: u32) -> ErrorResult {
Ok(())
} }
pub fn GetSelectionEnd(&self, _rv: &mut ErrorResult) -> u32 { pub fn GetSelectionEnd(&self) -> Fallible<u32> {
0 Ok(0)
} }
pub fn SetSelectionEnd(&self, _selection_end: u32, _rv: &mut ErrorResult) { pub fn SetSelectionEnd(&self, _selection_end: u32) -> ErrorResult {
Ok(())
} }
pub fn GetSelectionDirection(&self, _rv: &mut ErrorResult) -> DOMString { pub fn GetSelectionDirection(&self) -> Fallible<DOMString> {
None Ok(None)
} }
pub fn SetSelectionDirection(&self, _selection_direction: &DOMString, _rv: &mut ErrorResult) { pub fn SetSelectionDirection(&self, _selection_direction: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn SetRangeText(&self, _replacement: &DOMString) { pub fn SetRangeText(&self, _replacement: &DOMString) {

View file

@ -14,6 +14,7 @@ impl HTMLTimeElement {
None None
} }
pub fn SetDateTime(&mut self, _dateTime: &DOMString, _rv: &mut ErrorResult) { pub fn SetDateTime(&mut self, _dateTime: &DOMString) -> ErrorResult {
Ok(())
} }
} }

View file

@ -14,6 +14,7 @@ impl HTMLTitleElement {
None None
} }
pub fn SetText(&mut self, _text: &DOMString, _rv: &mut ErrorResult) { pub fn SetText(&mut self, _text: &DOMString) -> ErrorResult {
Ok(())
} }
} }

View file

@ -14,35 +14,40 @@ impl HTMLTrackElement {
None None
} }
pub fn SetKind(&mut self, _kind: &DOMString, _rv: &mut ErrorResult) { pub fn SetKind(&mut self, _kind: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Src(&self) -> DOMString { pub fn Src(&self) -> DOMString {
None None
} }
pub fn SetSrc(&mut self, _src: &DOMString, _rv: &mut ErrorResult) { pub fn SetSrc(&mut self, _src: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Srclang(&self) -> DOMString { pub fn Srclang(&self) -> DOMString {
None None
} }
pub fn SetSrclang(&mut self, _srclang: &DOMString, _rv: &mut ErrorResult) { pub fn SetSrclang(&mut self, _srclang: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Label(&self) -> DOMString { pub fn Label(&self) -> DOMString {
None None
} }
pub fn SetLabel(&mut self, _label: &DOMString, _rv: &mut ErrorResult) { pub fn SetLabel(&mut self, _label: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn Default(&self) -> bool { pub fn Default(&self) -> bool {
false false
} }
pub fn SetDefault(&mut self, _default: bool, _rv: &mut ErrorResult) { pub fn SetDefault(&mut self, _default: bool) -> ErrorResult {
Ok(())
} }
pub fn ReadyState(&self) -> u16 { pub fn ReadyState(&self) -> u16 {

View file

@ -14,13 +14,15 @@ impl HTMLUListElement {
false false
} }
pub fn SetCompact(&mut self, _compact: bool, _rv: &mut ErrorResult) { pub fn SetCompact(&mut self, _compact: bool) -> ErrorResult {
Ok(())
} }
pub fn Type(&self) -> DOMString { pub fn Type(&self) -> DOMString {
None None
} }
pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) { pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
Ok(())
} }
} }

View file

@ -14,14 +14,16 @@ impl HTMLVideoElement {
0 0
} }
pub fn SetWidth(&mut self, _width: u32, _rv: &ErrorResult) { pub fn SetWidth(&mut self, _width: u32) -> ErrorResult {
Ok(())
} }
pub fn Height(&self) -> u32 { pub fn Height(&self) -> u32 {
0 0
} }
pub fn SetHeight(&mut self, _height: u32, _rv: &ErrorResult) { pub fn SetHeight(&mut self, _height: u32) -> ErrorResult {
Ok(())
} }
pub fn VideoWidth(&self) -> u32 { pub fn VideoWidth(&self) -> u32 {
@ -36,6 +38,7 @@ impl HTMLVideoElement {
None None
} }
pub fn SetPoster(&mut self, _poster: &DOMString, _rv: &ErrorResult) { pub fn SetPoster(&mut self, _poster: &DOMString) -> ErrorResult {
Ok(())
} }
} }

View file

@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::MouseEventBinding; use dom::bindings::codegen::MouseEventBinding;
use dom::bindings::utils::{ErrorResult, DOMString}; use dom::bindings::utils::{ErrorResult, Fallible, DOMString};
use dom::bindings::utils::{CacheableWrapper, WrapperCache, BindingObject, DerivedWrapper}; use dom::bindings::utils::{CacheableWrapper, WrapperCache, BindingObject, DerivedWrapper};
use dom::eventtarget::EventTarget; use dom::eventtarget::EventTarget;
use dom::uievent::UIEvent; use dom::uievent::UIEvent;
@ -54,12 +54,11 @@ impl MouseEvent {
pub fn Constructor(_owner: @mut Window, pub fn Constructor(_owner: @mut Window,
type_: &DOMString, type_: &DOMString,
init: &MouseEventBinding::MouseEventInit, init: &MouseEventBinding::MouseEventInit) -> Fallible<@mut MouseEvent> {
_rv: &mut ErrorResult) -> @mut MouseEvent { Ok(@mut MouseEvent::new(type_, init.bubbles, init.cancelable, init.view, init.detail,
@mut MouseEvent::new(type_, init.bubbles, init.cancelable, init.view, init.detail, init.screenX, init.screenY, init.clientX, init.clientY,
init.screenX, init.screenY, init.clientX, init.clientY, init.ctrlKey, init.shiftKey, init.altKey, init.metaKey,
init.ctrlKey, init.shiftKey, init.altKey, init.metaKey, init.button, init.buttons, init.relatedTarget))
init.button, init.buttons, init.relatedTarget)
} }
pub fn ScreenX(&self) -> i32 { pub fn ScreenX(&self) -> i32 {
@ -127,8 +126,7 @@ impl MouseEvent {
shiftKeyArg: bool, shiftKeyArg: bool,
metaKeyArg: bool, metaKeyArg: bool,
buttonArg: u16, buttonArg: u16,
relatedTargetArg: Option<@mut EventTarget>, relatedTargetArg: Option<@mut EventTarget>) -> ErrorResult {
_rv: &mut ErrorResult) {
self.parent.InitUIEvent(typeArg, canBubbleArg, cancelableArg, viewArg, detailArg); self.parent.InitUIEvent(typeArg, canBubbleArg, cancelableArg, viewArg, detailArg);
self.screen_x = screenXArg; self.screen_x = screenXArg;
self.screen_y = screenYArg; self.screen_y = screenYArg;
@ -140,6 +138,7 @@ impl MouseEvent {
self.meta_key = metaKeyArg; self.meta_key = metaKeyArg;
self.button = buttonArg; self.button = buttonArg;
self.related_target = relatedTargetArg; self.related_target = relatedTargetArg;
Ok(())
} }
} }

View file

@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::utils::{WrapperCache, BindingObject, CacheableWrapper}; use dom::bindings::utils::{WrapperCache, BindingObject, CacheableWrapper};
use dom::bindings::utils::{DOMString, ErrorResult}; use dom::bindings::utils::{DOMString, Fallible};
use dom::bindings::codegen::NavigatorBinding; use dom::bindings::codegen::NavigatorBinding;
use script_task::{page_from_context}; use script_task::{page_from_context};
@ -46,12 +46,12 @@ impl Navigator {
false false
} }
pub fn GetBuildID(&self, _rv: &mut ErrorResult) -> DOMString { pub fn GetBuildID(&self) -> Fallible<DOMString> {
None Ok(None)
} }
pub fn JavaEnabled(&self, _rv: &mut ErrorResult) -> bool { pub fn JavaEnabled(&self) -> Fallible<bool> {
false Ok(false)
} }
pub fn TaintEnabled(&self) -> bool { pub fn TaintEnabled(&self) -> bool {
@ -62,20 +62,20 @@ impl Navigator {
Some(~"Netscape") // Like Gecko/Webkit Some(~"Netscape") // Like Gecko/Webkit
} }
pub fn GetAppCodeName(&self, _rv: &mut ErrorResult) -> DOMString { pub fn GetAppCodeName(&self) -> Fallible<DOMString> {
Some(~"Mozilla") // Like Gecko/Webkit Ok(Some(~"Mozilla")) // Like Gecko/Webkit
} }
pub fn GetAppVersion(&self, _rv: &mut ErrorResult) -> DOMString { pub fn GetAppVersion(&self) -> Fallible<DOMString> {
None Ok(None)
} }
pub fn GetPlatform(&self, _rv: &mut ErrorResult) -> DOMString { pub fn GetPlatform(&self) -> Fallible<DOMString> {
None Ok(None)
} }
pub fn GetUserAgent(&self, _rv: &mut ErrorResult) -> DOMString { pub fn GetUserAgent(&self) -> Fallible<DOMString> {
None Ok(None)
} }
pub fn GetLanguage(&self) -> DOMString { pub fn GetLanguage(&self) -> DOMString {

View file

@ -5,7 +5,7 @@
//! The core DOM types. Defines the basic DOM hierarchy as well as all the HTML elements. //! The core DOM types. Defines the basic DOM hierarchy as well as all the HTML elements.
use dom::bindings::node; use dom::bindings::node;
use dom::bindings::utils::{WrapperCache, DOMString, ErrorResult, NotFound, HierarchyRequest}; use dom::bindings::utils::{WrapperCache, DOMString, ErrorResult, Fallible, NotFound, HierarchyRequest};
use dom::bindings::utils::{BindingObject, CacheableWrapper, null_str_as_empty}; use dom::bindings::utils::{BindingObject, CacheableWrapper, null_str_as_empty};
use dom::characterdata::CharacterData; use dom::characterdata::CharacterData;
use dom::document::AbstractDocument; use dom::document::AbstractDocument;
@ -559,7 +559,8 @@ impl Node<ScriptView> {
None None
} }
pub fn SetNodeValue(&mut self, _val: &DOMString, _rv: &mut ErrorResult) { pub fn SetNodeValue(&mut self, _val: &DOMString) -> ErrorResult {
Ok(())
} }
pub fn GetTextContent(&self, abstract_self: AbstractNode<ScriptView>) -> DOMString { pub fn GetTextContent(&self, abstract_self: AbstractNode<ScriptView>) -> DOMString {
@ -592,22 +593,20 @@ impl Node<ScriptView> {
abstract_self: AbstractNode<ScriptView>, abstract_self: AbstractNode<ScriptView>,
node: Option<AbstractNode<ScriptView>>) { node: Option<AbstractNode<ScriptView>>) {
//FIXME: We should batch document notifications that occur here //FIXME: We should batch document notifications that occur here
let mut rv = Ok(());
for child in abstract_self.children() { for child in abstract_self.children() {
self.RemoveChild(abstract_self, child, &mut rv); self.RemoveChild(abstract_self, child);
} }
match node { match node {
None => {}, None => {},
Some(node) => { Some(node) => {
self.AppendChild(abstract_self, node, &mut rv); self.AppendChild(abstract_self, node);
} }
} }
} }
pub fn SetTextContent(&mut self, pub fn SetTextContent(&mut self,
abstract_self: AbstractNode<ScriptView>, abstract_self: AbstractNode<ScriptView>,
value: &DOMString, value: &DOMString) -> ErrorResult {
_rv: &mut ErrorResult) {
let is_empty = match value { let is_empty = match value {
&Some(~"") | &None => true, &Some(~"") | &None => true,
_ => false _ => false
@ -640,9 +639,10 @@ impl Node<ScriptView> {
} }
DoctypeNodeTypeId => {} DoctypeNodeTypeId => {}
} }
Ok(())
} }
pub fn InsertBefore(&mut self, _node: AbstractNode<ScriptView>, _child: Option<AbstractNode<ScriptView>>, _rv: &mut ErrorResult) -> AbstractNode<ScriptView> { pub fn InsertBefore(&mut self, _node: AbstractNode<ScriptView>, _child: Option<AbstractNode<ScriptView>>) -> Fallible<AbstractNode<ScriptView>> {
fail!("stub") fail!("stub")
} }
@ -656,8 +656,7 @@ impl Node<ScriptView> {
pub fn AppendChild(&mut self, pub fn AppendChild(&mut self,
abstract_self: AbstractNode<ScriptView>, abstract_self: AbstractNode<ScriptView>,
node: AbstractNode<ScriptView>, node: AbstractNode<ScriptView>) -> Fallible<AbstractNode<ScriptView>> {
rv: &mut ErrorResult) -> AbstractNode<ScriptView> {
fn is_hierarchy_request_err(this_node: AbstractNode<ScriptView>, fn is_hierarchy_request_err(this_node: AbstractNode<ScriptView>,
new_child: AbstractNode<ScriptView>) -> bool { new_child: AbstractNode<ScriptView>) -> bool {
if new_child.is_doctype() { if new_child.is_doctype() {
@ -680,35 +679,32 @@ impl Node<ScriptView> {
} }
if is_hierarchy_request_err(abstract_self, node) { if is_hierarchy_request_err(abstract_self, node) {
*rv = Err(HierarchyRequest); return Err(HierarchyRequest);
} }
// TODO: Should we handle WRONG_DOCUMENT_ERR here? // TODO: Should we handle WRONG_DOCUMENT_ERR here?
if rv.is_ok() { self.wait_until_safe_to_modify_dom();
self.wait_until_safe_to_modify_dom();
// If the node already exists it is removed from current parent node. // If the node already exists it is removed from current parent node.
node.parent_node().map(|parent| parent.remove_child(node)); node.parent_node().map(|parent| parent.remove_child(node));
abstract_self.add_child(node); abstract_self.add_child(node);
match self.owner_doc { match self.owner_doc {
Some(doc) => do node.with_mut_base |node| { Some(doc) => do node.with_mut_base |node| {
node.add_to_doc(doc); node.add_to_doc(doc);
}, },
None => () None => ()
}
} }
node Ok(node)
} }
pub fn ReplaceChild(&mut self, _node: AbstractNode<ScriptView>, _child: AbstractNode<ScriptView>, _rv: &mut ErrorResult) -> AbstractNode<ScriptView> { pub fn ReplaceChild(&mut self, _node: AbstractNode<ScriptView>, _child: AbstractNode<ScriptView>) -> Fallible<AbstractNode<ScriptView>> {
fail!("stub") fail!("stub")
} }
pub fn RemoveChild(&mut self, pub fn RemoveChild(&mut self,
abstract_self: AbstractNode<ScriptView>, abstract_self: AbstractNode<ScriptView>,
node: AbstractNode<ScriptView>, node: AbstractNode<ScriptView>) -> Fallible<AbstractNode<ScriptView>> {
rv: &mut ErrorResult) -> AbstractNode<ScriptView> {
fn is_not_found_err(this_node: AbstractNode<ScriptView>, fn is_not_found_err(this_node: AbstractNode<ScriptView>,
old_child: AbstractNode<ScriptView>) -> bool { old_child: AbstractNode<ScriptView>) -> bool {
match old_child.parent_node() { match old_child.parent_node() {
@ -718,21 +714,20 @@ impl Node<ScriptView> {
} }
if is_not_found_err(abstract_self, node) { if is_not_found_err(abstract_self, node) {
*rv = Err(NotFound); return Err(NotFound);
} }
if rv.is_ok() {
self.wait_until_safe_to_modify_dom();
abstract_self.remove_child(node); self.wait_until_safe_to_modify_dom();
self.remove_from_doc();
} abstract_self.remove_child(node);
node self.remove_from_doc();
Ok(node)
} }
pub fn Normalize(&mut self) { pub fn Normalize(&mut self) {
} }
pub fn CloneNode(&self, _deep: bool, _rv: &mut ErrorResult) -> AbstractNode<ScriptView> { pub fn CloneNode(&self, _deep: bool) -> Fallible<AbstractNode<ScriptView>> {
fail!("stub") fail!("stub")
} }

View file

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::utils::{DOMString, ErrorResult, null_str_as_empty}; use dom::bindings::utils::{DOMString, Fallible, null_str_as_empty};
use dom::characterdata::CharacterData; use dom::characterdata::CharacterData;
use dom::node::{AbstractNode, ScriptView, Node, TextNodeTypeId}; use dom::node::{AbstractNode, ScriptView, Node, TextNodeTypeId};
use dom::window::Window; use dom::window::Window;
@ -20,16 +20,16 @@ impl Text {
} }
} }
pub fn Constructor(owner: @mut Window, text: &DOMString, _rv: &mut ErrorResult) -> AbstractNode<ScriptView> { pub fn Constructor(owner: @mut Window, text: &DOMString) -> Fallible<AbstractNode<ScriptView>> {
let cx = owner.page.js_info.get_ref().js_compartment.cx.ptr; let cx = owner.page.js_info.get_ref().js_compartment.cx.ptr;
unsafe { Node::as_abstract_node(cx, @Text::new(null_str_as_empty(text))) } unsafe { Ok(Node::as_abstract_node(cx, @Text::new(null_str_as_empty(text)))) }
} }
pub fn SplitText(&self, _offset: u32, _rv: &mut ErrorResult) -> AbstractNode<ScriptView> { pub fn SplitText(&self, _offset: u32) -> Fallible<AbstractNode<ScriptView>> {
fail!("unimplemented") fail!("unimplemented")
} }
pub fn GetWholeText(&self, _rv: &mut ErrorResult) -> DOMString { pub fn GetWholeText(&self) -> Fallible<DOMString> {
None Ok(None)
} }
} }

View file

@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::UIEventBinding; use dom::bindings::codegen::UIEventBinding;
use dom::bindings::utils::{ErrorResult, DOMString}; use dom::bindings::utils::{DOMString, Fallible};
use dom::bindings::utils::{CacheableWrapper, WrapperCache, BindingObject, DerivedWrapper}; use dom::bindings::utils::{CacheableWrapper, WrapperCache, BindingObject, DerivedWrapper};
use dom::node::{AbstractNode, ScriptView}; use dom::node::{AbstractNode, ScriptView};
use dom::event::Event; use dom::event::Event;
@ -39,10 +39,9 @@ impl UIEvent {
pub fn Constructor(_owner: @mut Window, pub fn Constructor(_owner: @mut Window,
type_: &DOMString, type_: &DOMString,
init: &UIEventBinding::UIEventInit, init: &UIEventBinding::UIEventInit) -> Fallible<@mut UIEvent> {
_rv: &mut ErrorResult) -> @mut UIEvent { Ok(@mut UIEvent::new(type_, init.parent.bubbles, init.parent.cancelable,
@mut UIEvent::new(type_, init.parent.bubbles, init.parent.cancelable, init.view, init.detail))
init.view, init.detail)
} }
pub fn GetView(&self) -> Option<@mut WindowProxy> { pub fn GetView(&self) -> Option<@mut WindowProxy> {
@ -59,8 +58,7 @@ impl UIEvent {
cancelable: bool, cancelable: bool,
view: Option<@mut WindowProxy>, view: Option<@mut WindowProxy>,
detail: i32) { detail: i32) {
let mut rv = Ok(()); self.parent.InitEvent(type_, can_bubble, cancelable);
self.parent.InitEvent(type_, can_bubble, cancelable, &mut rv);
self.can_bubble = can_bubble; self.can_bubble = can_bubble;
self.cancelable = cancelable; self.cancelable = cancelable;
self.view = view; self.view = view;