Make DOMString an alias for Option<~str>

Fixes #898.
This commit is contained in:
Keegan McAllister 2013-09-18 14:46:42 -07:00
parent 5be084a3b6
commit 68ddc6b4ab
69 changed files with 435 additions and 461 deletions

View file

@ -1049,7 +1049,7 @@ for (uint32_t i = 0; i < length; ++i) {
# "if (!ConvertJSValueToString(cx, ${val}, ${valPtr}, %s, %s, %s)) {\n" # "if (!ConvertJSValueToString(cx, ${val}, ${valPtr}, %s, %s, %s)) {\n"
# " return false;\n" # " return false;\n"
# "}" % (nullBehavior, undefinedBehavior, varName)) # "}" % (nullBehavior, undefinedBehavior, varName))
strval = "str(strval.unwrap())" strval = "Some(strval.unwrap())"
if isOptional: if isOptional:
strval = "Some(%s)" % strval strval = "Some(%s)" % strval
conversionCode = ( conversionCode = (
@ -1068,7 +1068,7 @@ for (uint32_t i = 0; i < length; ++i) {
return handleDefault( return handleDefault(
conversionCode, conversionCode,
("static data: [u8, ..%s] = [ %s ];\n" ("static data: [u8, ..%s] = [ %s ];\n"
"%s = str(str::from_utf8(data));" % "%s = Some(str::from_utf8(data));" %
(len(defaultValue.value) + 1, (len(defaultValue.value) + 1,
", ".join(["'" + char + "' as u8" for char in defaultValue.value] + ["0"]), ", ".join(["'" + char + "' as u8" for char in defaultValue.value] + ["0"]),
varName))) varName)))
@ -3721,7 +3721,7 @@ class CGDOMJSProxyHandler_getOwnPropertyDescriptor(CGAbstractExternMethod):
" if strval.is_err() {\n" + " if strval.is_err() {\n" +
" return 0;\n" + " return 0;\n" +
" }\n" + " }\n" +
" let name = str(strval.unwrap());\n" + " let name = Some(strval.unwrap());\n" +
"\n" + "\n" +
" let this: *%s = UnwrapProxy(proxy);\n" + " let this: *%s = UnwrapProxy(proxy);\n" +
CGIndenter(CGProxyNamedGetter(self.descriptor, templateValues)).define() + "\n" + CGIndenter(CGProxyNamedGetter(self.descriptor, templateValues)).define() + "\n" +
@ -3790,7 +3790,7 @@ class CGDOMJSProxyHandler_defineProperty(CGAbstractExternMethod):
" if strval.is_err() {\n" + " if strval.is_err() {\n" +
" return 0;\n" + " return 0;\n" +
" }\n" + " }\n" +
" let name = str(strval.unwrap());\n" + " let name = Some(strval.unwrap());\n" +
"\n" + "\n" +
" let this: *%s = UnwrapProxy(proxy);\n" + " let this: *%s = UnwrapProxy(proxy);\n" +
CGIndenter(CGProxyNamedSetter(self.descriptor)).define() + "\n" + CGIndenter(CGProxyNamedSetter(self.descriptor)).define() + "\n" +
@ -3806,7 +3806,7 @@ class CGDOMJSProxyHandler_defineProperty(CGAbstractExternMethod):
" if strval.is_err() {\n" + " if strval.is_err() {\n" +
" return 0;\n" + " return 0;\n" +
" }\n" + " }\n" +
" let name = str(strval.unwrap());\n" + " let name = Some(strval.unwrap());\n" +
" let this: %%s = UnwrapProxy(proxy);\n" + " let this: %%s = UnwrapProxy(proxy);\n" +
CGIndenter(CGProxyNamedGetter(self.descriptor)).define() + CGIndenter(CGProxyNamedGetter(self.descriptor)).define() +
" if (found) {\n" " if (found) {\n"
@ -3852,7 +3852,7 @@ class CGDOMJSProxyHandler_hasOwn(CGAbstractExternMethod):
" if strval.is_err() {\n" + " if strval.is_err() {\n" +
" return 0;\n" + " return 0;\n" +
" }\n" + " }\n" +
" let name = str(strval.unwrap());\n" + " let name = Some(strval.unwrap());\n" +
"\n" + "\n" +
" let this: *%s = UnwrapProxy(proxy);\n" + " let this: *%s = UnwrapProxy(proxy);\n" +
CGIndenter(CGProxyNamedGetter(self.descriptor)).define() + "\n" + CGIndenter(CGProxyNamedGetter(self.descriptor)).define() + "\n" +

View file

@ -83,39 +83,26 @@ extern fn InterfaceObjectToString(cx: *JSContext, _argc: c_uint, vp: *mut JSVal)
} }
let name = jsval_to_str(cx, *v).unwrap(); let name = jsval_to_str(cx, *v).unwrap();
let retval = str(~"function " + name + "() {\n [native code]\n}"); let retval = Some(~"function " + name + "() {\n [native code]\n}");
*vp = domstring_to_jsval(cx, &retval); *vp = domstring_to_jsval(cx, &retval);
return 1; return 1;
} }
} }
#[deriving(Clone)] pub type DOMString = Option<~str>;
pub enum DOMString {
str(~str), pub fn null_str_as_empty(s: &DOMString) -> ~str {
null_string // We don't use map_default because it would allocate ~"" even for Some.
match *s {
Some(ref s) => s.clone(),
None => ~""
}
} }
impl DOMString { pub fn null_str_as_empty_ref<'a>(s: &'a DOMString) -> &'a str {
pub fn to_str(&self) -> ~str { match *s {
match *self { Some(ref s) => s.as_slice(),
str(ref s) => s.clone(), None => &'a ""
null_string => ~""
}
}
pub fn get_ref<'a>(&'a self) -> &'a str {
match *self {
str(ref s) => s.as_slice(),
null_string => &'a "",
}
}
// XXX This is temporary until issue #875 is fixed.
pub fn unwrap(&self) -> ~str {
match self {
&str(ref s) => s.clone(),
&null_string => fail!("Cannot unwrap a null string.")
}
} }
} }
@ -223,10 +210,10 @@ pub fn jsval_to_str(cx: *JSContext, v: JSVal) -> Result<~str, ()> {
#[fixed_stack_segment] #[fixed_stack_segment]
pub unsafe fn domstring_to_jsval(cx: *JSContext, string: &DOMString) -> JSVal { pub unsafe fn domstring_to_jsval(cx: *JSContext, string: &DOMString) -> JSVal {
match string { match string {
&null_string => { &None => {
JSVAL_NULL JSVAL_NULL
} }
&str(ref s) => { &Some(ref s) => {
do s.as_imm_buf |buf, len| { do s.as_imm_buf |buf, len| {
let cbuf = cast::transmute(buf); let cbuf = cast::transmute(buf);
RUST_STRING_TO_JSVAL(JS_NewStringCopyN(cx, cbuf, len as libc::size_t)) RUST_STRING_TO_JSVAL(JS_NewStringCopyN(cx, cbuf, len as libc::size_t))

View file

@ -4,7 +4,7 @@
//! DOM bindings for `CharacterData`. //! DOM bindings for `CharacterData`.
use dom::bindings::utils::{DOMString, str, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
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};
@ -23,11 +23,11 @@ impl CharacterData {
} }
pub fn Data(&self) -> DOMString { pub fn Data(&self) -> DOMString {
str(self.data.clone()) Some(self.data.clone())
} }
pub fn SetData(&mut self, arg: &DOMString, _rv: &mut ErrorResult) { pub fn SetData(&mut self, arg: &DOMString, _rv: &mut ErrorResult) {
self.data = arg.unwrap(); self.data = arg.get_ref().clone();
} }
pub fn Length(&self) -> u32 { pub fn Length(&self) -> u32 {
@ -35,11 +35,11 @@ impl CharacterData {
} }
pub fn SubstringData(&self, offset: u32, count: u32, _rv: &mut ErrorResult) -> DOMString { pub fn SubstringData(&self, offset: u32, count: u32, _rv: &mut ErrorResult) -> DOMString {
str(self.data.slice(offset as uint, count as uint).to_str()) 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, _rv: &mut ErrorResult) {
self.data.push_str(arg.unwrap()); self.data.push_str(arg.get_ref().clone());
} }
pub fn InsertData(&mut self, _offset: u32, _arg: &DOMString, _rv: &mut ErrorResult) { pub fn InsertData(&mut self, _offset: u32, _arg: &DOMString, _rv: &mut ErrorResult) {

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, str, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult, 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;
@ -21,10 +21,7 @@ impl Comment {
} }
pub fn Constructor(owner: @mut Window, data: &DOMString, _rv: &mut ErrorResult) -> AbstractNode<ScriptView> { pub fn Constructor(owner: @mut Window, data: &DOMString, _rv: &mut ErrorResult) -> AbstractNode<ScriptView> {
let s = match *data { let s = null_str_as_empty(data);
str(ref s) => s.clone(),
null_string => ~""
};
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)) Node::as_abstract_node(compartment.cx.ptr, @Comment::new(s))

View file

@ -3,9 +3,9 @@
* 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, null_string, str}; use dom::bindings::utils::{DOMString, WrapperCache, ErrorResult};
use dom::bindings::utils::{BindingObject, CacheableWrapper, rust_box, DerivedWrapper}; use dom::bindings::utils::{BindingObject, CacheableWrapper, rust_box, DerivedWrapper};
use dom::bindings::utils::{is_valid_element_name, InvalidCharacter, Traceable}; use dom::bindings::utils::{is_valid_element_name, InvalidCharacter, Traceable, null_str_as_empty};
use dom::element::{Element}; use dom::element::{Element};
use dom::element::{HTMLHtmlElementTypeId, HTMLHeadElementTypeId, HTMLTitleElementTypeId}; use dom::element::{HTMLHtmlElementTypeId, HTMLHeadElementTypeId, HTMLTitleElementTypeId};
use dom::event::Event; use dom::event::Event;
@ -187,23 +187,23 @@ impl BindingObject for Document {
impl Document { impl Document {
pub fn URL(&self) -> DOMString { pub fn URL(&self) -> DOMString {
null_string None
} }
pub fn DocumentURI(&self) -> DOMString { pub fn DocumentURI(&self) -> DOMString {
null_string None
} }
pub fn CompatMode(&self) -> DOMString { pub fn CompatMode(&self) -> DOMString {
null_string None
} }
pub fn CharacterSet(&self) -> DOMString { pub fn CharacterSet(&self) -> DOMString {
null_string None
} }
pub fn ContentType(&self) -> DOMString { pub fn ContentType(&self) -> DOMString {
null_string None
} }
pub fn GetDocumentElement(&self) -> Option<AbstractNode<ScriptView>> { pub fn GetDocumentElement(&self) -> Option<AbstractNode<ScriptView>> {
@ -224,7 +224,7 @@ impl Document {
} }
pub fn GetElementsByTagName(&self, tag: &DOMString) -> @mut HTMLCollection { pub fn GetElementsByTagName(&self, tag: &DOMString) -> @mut HTMLCollection {
self.createHTMLCollection(|elem| eq_slice(elem.tag_name, tag.to_str())) self.createHTMLCollection(|elem| eq_slice(elem.tag_name, null_str_as_empty(tag)))
} }
pub fn GetElementsByTagNameNS(&self, _ns: &DOMString, _tag: &DOMString) -> @mut HTMLCollection { pub fn GetElementsByTagNameNS(&self, _ns: &DOMString, _tag: &DOMString) -> @mut HTMLCollection {
@ -243,7 +243,7 @@ impl Document {
pub fn CreateElement(&self, local_name: &DOMString, rv: &mut ErrorResult) -> AbstractNode<ScriptView> { pub fn CreateElement(&self, local_name: &DOMString, rv: &mut ErrorResult) -> AbstractNode<ScriptView> {
let cx = self.get_cx(); let cx = self.get_cx();
let local_name = local_name.to_str(); 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); *rv = Err(InvalidCharacter);
// FIXME #909: what to return here? // FIXME #909: what to return here?
@ -259,7 +259,7 @@ impl Document {
pub fn CreateTextNode(&self, data: &DOMString) -> AbstractNode<ScriptView> { pub fn CreateTextNode(&self, data: &DOMString) -> AbstractNode<ScriptView> {
let cx = self.get_cx(); let cx = self.get_cx();
unsafe { Node::as_abstract_node(cx, @Text::new(data.to_str())) } 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, _rv: &mut ErrorResult) -> @mut Event {
@ -267,19 +267,19 @@ impl Document {
} }
pub fn GetInputEncoding(&self) -> DOMString { pub fn GetInputEncoding(&self) -> DOMString {
null_string None
} }
pub fn Referrer(&self) -> DOMString { pub fn Referrer(&self) -> DOMString {
null_string None
} }
pub fn LastModified(&self) -> DOMString { pub fn LastModified(&self) -> DOMString {
null_string None
} }
pub fn ReadyState(&self) -> DOMString { pub fn ReadyState(&self) -> DOMString {
null_string None
} }
pub fn Title(&self) -> DOMString { pub fn Title(&self) -> DOMString {
@ -297,7 +297,7 @@ impl Document {
if child.is_text() { if child.is_text() {
do child.with_imm_text() |text| { do child.with_imm_text() |text| {
let s = text.parent.Data(); let s = text.parent.Data();
title = title + s.to_str(); title = title + null_str_as_empty(&s);
} }
} }
} }
@ -308,7 +308,7 @@ impl Document {
let v: ~[&str] = title.word_iter().collect(); let v: ~[&str] = title.word_iter().collect();
title = v.connect(" "); title = v.connect(" ");
title = title.trim().to_owned(); title = title.trim().to_owned();
str(title) Some(title)
} }
pub fn SetTitle(&self, title: &DOMString, _rv: &mut ErrorResult) { pub fn SetTitle(&self, title: &DOMString, _rv: &mut ErrorResult) {
@ -351,7 +351,7 @@ impl Document {
} }
pub fn Dir(&self) -> DOMString { pub fn Dir(&self) -> DOMString {
null_string None
} }
pub fn SetDir(&self, _dir: &DOMString) { pub fn SetDir(&self, _dir: &DOMString) {
@ -408,18 +408,18 @@ impl Document {
} }
pub fn GetSelectedStyleSheetSet(&self) -> DOMString { pub fn GetSelectedStyleSheetSet(&self) -> DOMString {
null_string None
} }
pub fn SetSelectedStyleSheetSet(&self, _sheet: &DOMString) { pub fn SetSelectedStyleSheetSet(&self, _sheet: &DOMString) {
} }
pub fn GetLastStyleSheetSet(&self) -> DOMString { pub fn GetLastStyleSheetSet(&self) -> DOMString {
null_string None
} }
pub fn GetPreferredStyleSheetSet(&self) -> DOMString { pub fn GetPreferredStyleSheetSet(&self) -> DOMString {
null_string None
} }
pub fn EnableStyleSheetsForSet(&self, _name: &DOMString) { pub fn EnableStyleSheetsForSet(&self, _name: &DOMString) {
@ -435,7 +435,7 @@ impl Document {
pub fn GetElementsByName(&self, name: &DOMString) -> @mut HTMLCollection { pub fn GetElementsByName(&self, name: &DOMString) -> @mut HTMLCollection {
self.createHTMLCollection(|elem| self.createHTMLCollection(|elem|
elem.get_attr("name").is_some() && eq_slice(elem.get_attr("name").unwrap(), name.to_str())) elem.get_attr("name").is_some() && eq_slice(elem.get_attr("name").unwrap(), null_str_as_empty(name)))
} }
pub fn createHTMLCollection(&self, callback: &fn(elem: &Element) -> bool) -> @mut HTMLCollection { pub fn createHTMLCollection(&self, callback: &fn(elem: &Element) -> bool) -> @mut HTMLCollection {

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, str, null_string}; use dom::bindings::utils::DOMString;
use dom::node::{ScriptView, Node, DoctypeNodeTypeId}; use dom::node::{ScriptView, Node, DoctypeNodeTypeId};
/// The `DOCTYPE` tag. /// The `DOCTYPE` tag.
@ -31,20 +31,14 @@ impl DocumentType<ScriptView> {
} }
pub fn Name(&self) -> DOMString { pub fn Name(&self) -> DOMString {
str(self.name.clone()) Some(self.name.clone())
} }
pub fn PublicId(&self) -> DOMString { pub fn PublicId(&self) -> DOMString {
match self.public_id { self.public_id.clone()
Some(ref s) => str(s.clone()),
None => null_string
}
} }
pub fn SystemId(&self) -> DOMString { pub fn SystemId(&self) -> DOMString {
match self.system_id { self.system_id.clone()
Some(ref s) => str(s.clone()),
None => null_string
}
} }
} }

View file

@ -4,8 +4,8 @@
//! Element nodes. //! Element nodes.
use dom::bindings::utils::{null_string, str};
use dom::bindings::utils::{BindingObject, CacheableWrapper, DOMString, ErrorResult, WrapperCache}; use dom::bindings::utils::{BindingObject, CacheableWrapper, DOMString, ErrorResult, WrapperCache};
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;
use dom::clientrectlist::ClientRectList; use dom::clientrectlist::ClientRectList;
@ -143,8 +143,8 @@ impl<'self> Element {
abstract_self: AbstractNode<ScriptView>, abstract_self: AbstractNode<ScriptView>,
raw_name: &DOMString, raw_name: &DOMString,
raw_value: &DOMString) { raw_value: &DOMString) {
let name = raw_name.to_str(); let name = null_str_as_empty(raw_name);
let value_cell = Cell::new(raw_value.to_str()); let value_cell = Cell::new(null_str_as_empty(raw_value));
let mut found = false; let mut found = false;
for attr in self.attrs.mut_iter() { for attr in self.attrs.mut_iter() {
if eq_slice(attr.name, name) { if eq_slice(attr.name, name) {
@ -161,7 +161,7 @@ impl<'self> Element {
self.style_attribute = Some( self.style_attribute = Some(
Stylesheet::from_attribute( Stylesheet::from_attribute(
FromStr::from_str("http://www.example.com/").unwrap(), FromStr::from_str("http://www.example.com/").unwrap(),
raw_value.get_ref())); null_str_as_empty_ref(raw_value)));
} }
//XXXjdm We really need something like a vtable so we can call AfterSetAttr. //XXXjdm We really need something like a vtable so we can call AfterSetAttr.
@ -198,25 +198,22 @@ impl<'self> Element {
impl Element { impl Element {
pub fn TagName(&self) -> DOMString { pub fn TagName(&self) -> DOMString {
str(self.tag_name.to_owned().to_ascii_upper()) Some(self.tag_name.to_owned().to_ascii_upper())
} }
pub fn Id(&self) -> DOMString { pub fn Id(&self) -> DOMString {
null_string None
} }
pub fn SetId(&self, _id: &DOMString) { pub fn SetId(&self, _id: &DOMString) {
} }
pub fn GetAttribute(&self, name: &DOMString) -> DOMString { pub fn GetAttribute(&self, name: &DOMString) -> DOMString {
match self.get_attr(name.get_ref()) { self.get_attr(null_str_as_empty_ref(name)).map(|s| s.to_owned())
Some(val) => str(val.to_owned()),
None => null_string
}
} }
pub fn GetAttributeNS(&self, _namespace: &DOMString, _localname: &DOMString) -> DOMString { pub fn GetAttributeNS(&self, _namespace: &DOMString, _localname: &DOMString) -> DOMString {
null_string None
} }
pub fn SetAttribute(&mut self, pub fn SetAttribute(&mut self,
@ -392,14 +389,14 @@ impl Element {
} }
pub fn GetInnerHTML(&self, _rv: &mut ErrorResult) -> DOMString { pub fn GetInnerHTML(&self, _rv: &mut ErrorResult) -> DOMString {
null_string None
} }
pub fn SetInnerHTML(&mut self, _value: &DOMString, _rv: &mut ErrorResult) { pub fn SetInnerHTML(&mut self, _value: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn GetOuterHTML(&self, _rv: &mut ErrorResult) -> DOMString { pub fn GetOuterHTML(&self, _rv: &mut ErrorResult) -> DOMString {
null_string None
} }
pub fn SetOuterHTML(&mut self, _value: &DOMString, _rv: &mut ErrorResult) { pub fn SetOuterHTML(&mut self, _value: &DOMString, _rv: &mut ErrorResult) {

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::{CacheableWrapper, BindingObject, DerivedWrapper}; use dom::bindings::utils::{CacheableWrapper, BindingObject, DerivedWrapper};
use dom::bindings::utils::{WrapperCache, DOMString, str}; use dom::bindings::utils::{WrapperCache, DOMString, null_str_as_empty};
use dom::bindings::codegen::FormDataBinding; use dom::bindings::codegen::FormDataBinding;
use dom::blob::Blob; use dom::blob::Blob;
use script_task::{page_from_context}; use script_task::{page_from_context};
@ -39,13 +39,13 @@ impl FormData {
pub fn Append(&mut self, name: &DOMString, value: @mut Blob, filename: Option<DOMString>) { pub fn Append(&mut self, name: &DOMString, value: @mut Blob, filename: Option<DOMString>) {
let blob = BlobData { let blob = BlobData {
blob: value, blob: value,
name: filename.unwrap_or_default(str(~"default")) name: filename.unwrap_or_default(Some(~"default"))
}; };
self.data.insert(name.to_str(), blob); self.data.insert(null_str_as_empty(name), blob);
} }
pub fn Append_(&mut self, name: &DOMString, value: &DOMString) { pub fn Append_(&mut self, name: &DOMString, value: &DOMString) {
self.data.insert(name.to_str(), StringData((*value).clone())); self.data.insert(null_str_as_empty(name), StringData((*value).clone()));
} }
} }

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::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
use dom::bindings::utils::{DOMString, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
pub struct HTMLAnchorElement { pub struct HTMLAnchorElement {
parent: HTMLElement parent: HTMLElement
@ -11,91 +11,91 @@ pub struct HTMLAnchorElement {
impl HTMLAnchorElement { impl HTMLAnchorElement {
pub fn Href(&self) -> DOMString { pub fn Href(&self) -> DOMString {
null_string None
} }
pub fn SetHref(&mut self, _href: &DOMString, _rv: &mut ErrorResult) { pub fn SetHref(&mut self, _href: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Target(&self) -> DOMString { pub fn Target(&self) -> DOMString {
null_string None
} }
pub fn SetTarget(&self, _target: &DOMString, _rv: &mut ErrorResult) { pub fn SetTarget(&self, _target: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Download(&self) -> DOMString { pub fn Download(&self) -> DOMString {
null_string None
} }
pub fn SetDownload(&self, _download: &DOMString, _rv: &mut ErrorResult) { pub fn SetDownload(&self, _download: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Ping(&self) -> DOMString { pub fn Ping(&self) -> DOMString {
null_string None
} }
pub fn SetPing(&self, _ping: &DOMString, _rv: &mut ErrorResult) { pub fn SetPing(&self, _ping: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Rel(&self) -> DOMString { pub fn Rel(&self) -> DOMString {
null_string None
} }
pub fn SetRel(&self, _rel: &DOMString, _rv: &mut ErrorResult) { pub fn SetRel(&self, _rel: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Hreflang(&self) -> DOMString { pub fn Hreflang(&self) -> DOMString {
null_string None
} }
pub fn SetHreflang(&self, _href_lang: &DOMString, _rv: &mut ErrorResult) { pub fn SetHreflang(&self, _href_lang: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Type(&self) -> DOMString { pub fn Type(&self) -> DOMString {
null_string None
} }
pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) { pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Text(&self) -> DOMString { pub fn Text(&self) -> DOMString {
null_string None
} }
pub fn SetText(&mut self, _text: &DOMString, _rv: &mut ErrorResult) { pub fn SetText(&mut self, _text: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Coords(&self) -> DOMString { pub fn Coords(&self) -> DOMString {
null_string None
} }
pub fn SetCoords(&mut self, _coords: &DOMString, _rv: &mut ErrorResult) { pub fn SetCoords(&mut self, _coords: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Charset(&self) -> DOMString { pub fn Charset(&self) -> DOMString {
null_string None
} }
pub fn SetCharset(&mut self, _charset: &DOMString, _rv: &mut ErrorResult) { pub fn SetCharset(&mut self, _charset: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Name(&self) -> DOMString { pub fn Name(&self) -> DOMString {
null_string None
} }
pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) { pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Rev(&self) -> DOMString { pub fn Rev(&self) -> DOMString {
null_string None
} }
pub fn SetRev(&mut self, _rev: &DOMString, _rv: &mut ErrorResult) { pub fn SetRev(&mut self, _rev: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Shape(&self) -> DOMString { pub fn Shape(&self) -> DOMString {
null_string None
} }
pub fn SetShape(&mut self, _shape: &DOMString, _rv: &mut ErrorResult) { pub fn SetShape(&mut self, _shape: &DOMString, _rv: &mut ErrorResult) {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLAppletElement { pub struct HTMLAppletElement {
@ -11,42 +11,42 @@ pub struct HTMLAppletElement {
impl HTMLAppletElement { impl HTMLAppletElement {
pub fn Align(&self) -> DOMString { pub fn Align(&self) -> DOMString {
null_string None
} }
pub fn SetAlign(&mut self, _align: &DOMString, _rv: &mut ErrorResult) { pub fn SetAlign(&mut self, _align: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Alt(&self) -> DOMString { pub fn Alt(&self) -> DOMString {
null_string None
} }
pub fn SetAlt(&self, _alt: &DOMString, _rv: &mut ErrorResult) { pub fn SetAlt(&self, _alt: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Archive(&self) -> DOMString { pub fn Archive(&self) -> DOMString {
null_string None
} }
pub fn SetArchive(&self, _archive: &DOMString, _rv: &mut ErrorResult) { pub fn SetArchive(&self, _archive: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Code(&self) -> DOMString { pub fn Code(&self) -> DOMString {
null_string None
} }
pub fn SetCode(&self, _code: &DOMString, _rv: &mut ErrorResult) { pub fn SetCode(&self, _code: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn CodeBase(&self) -> DOMString { pub fn CodeBase(&self) -> DOMString {
null_string None
} }
pub fn SetCodeBase(&self, _code_base: &DOMString, _rv: &mut ErrorResult) { pub fn SetCodeBase(&self, _code_base: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Height(&self) -> DOMString { pub fn Height(&self) -> DOMString {
null_string None
} }
pub fn SetHeight(&self, _height: &DOMString, _rv: &mut ErrorResult) { pub fn SetHeight(&self, _height: &DOMString, _rv: &mut ErrorResult) {
@ -60,14 +60,14 @@ impl HTMLAppletElement {
} }
pub fn Name(&self) -> DOMString { pub fn Name(&self) -> DOMString {
null_string None
} }
pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) { pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Object(&self) -> DOMString { pub fn Object(&self) -> DOMString {
null_string None
} }
pub fn SetObject(&mut self, _object: &DOMString, _rv: &mut ErrorResult) { pub fn SetObject(&mut self, _object: &DOMString, _rv: &mut ErrorResult) {
@ -81,7 +81,7 @@ impl HTMLAppletElement {
} }
pub fn Width(&self) -> DOMString { pub fn Width(&self) -> DOMString {
null_string None
} }
pub fn SetWidth(&mut self, _width: &DOMString, _rv: &mut ErrorResult) { pub fn SetWidth(&mut self, _width: &DOMString, _rv: &mut ErrorResult) {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLAreaElement { pub struct HTMLAreaElement {
@ -11,49 +11,49 @@ pub struct HTMLAreaElement {
impl HTMLAreaElement { impl HTMLAreaElement {
pub fn Alt(&self) -> DOMString { pub fn Alt(&self) -> DOMString {
null_string None
} }
pub fn SetAlt(&self, _alt: &DOMString, _rv: &mut ErrorResult) { pub fn SetAlt(&self, _alt: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Coords(&self) -> DOMString { pub fn Coords(&self) -> DOMString {
null_string None
} }
pub fn SetCoords(&self, _coords: &DOMString, _rv: &mut ErrorResult) { pub fn SetCoords(&self, _coords: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Shape(&self) -> DOMString { pub fn Shape(&self) -> DOMString {
null_string None
} }
pub fn SetShape(&self, _shape: &DOMString, _rv: &mut ErrorResult) { pub fn SetShape(&self, _shape: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Href(&self) -> DOMString { pub fn Href(&self) -> DOMString {
null_string None
} }
pub fn SetHref(&self, _href: &DOMString, _rv: &mut ErrorResult) { pub fn SetHref(&self, _href: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Target(&self) -> DOMString { pub fn Target(&self) -> DOMString {
null_string None
} }
pub fn SetTarget(&self, _target: &DOMString, _rv: &mut ErrorResult) { pub fn SetTarget(&self, _target: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Download(&self) -> DOMString { pub fn Download(&self) -> DOMString {
null_string None
} }
pub fn SetDownload(&self, _download: &DOMString, _rv: &mut ErrorResult) { pub fn SetDownload(&self, _download: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Ping(&self) -> DOMString { pub fn Ping(&self) -> DOMString {
null_string None
} }
pub fn SetPing(&self, _ping: &DOMString, _rv: &mut ErrorResult) { pub fn SetPing(&self, _ping: &DOMString, _rv: &mut ErrorResult) {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLBaseElement { pub struct HTMLBaseElement {
@ -11,14 +11,14 @@ pub struct HTMLBaseElement {
impl HTMLBaseElement { impl HTMLBaseElement {
pub fn Href(&self) -> DOMString { pub fn Href(&self) -> DOMString {
null_string None
} }
pub fn SetHref(&self, _href: &DOMString, _rv: &mut ErrorResult) { pub fn SetHref(&self, _href: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Target(&self) -> DOMString { pub fn Target(&self) -> DOMString {
null_string None
} }
pub fn SetTarget(&self, _target: &DOMString, _rv: &mut ErrorResult) { pub fn SetTarget(&self, _target: &DOMString, _rv: &mut ErrorResult) {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLBodyElement { pub struct HTMLBodyElement {
@ -11,42 +11,42 @@ pub struct HTMLBodyElement {
impl HTMLBodyElement { impl HTMLBodyElement {
pub fn Text(&self) -> DOMString { pub fn Text(&self) -> DOMString {
null_string None
} }
pub fn SetText(&mut self, _text: &DOMString, _rv: &mut ErrorResult) { pub fn SetText(&mut self, _text: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Link(&self) -> DOMString { pub fn Link(&self) -> DOMString {
null_string None
} }
pub fn SetLink(&self, _link: &DOMString, _rv: &mut ErrorResult) { pub fn SetLink(&self, _link: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn VLink(&self) -> DOMString { pub fn VLink(&self) -> DOMString {
null_string None
} }
pub fn SetVLink(&self, _v_link: &DOMString, _rv: &mut ErrorResult) { pub fn SetVLink(&self, _v_link: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn ALink(&self) -> DOMString { pub fn ALink(&self) -> DOMString {
null_string None
} }
pub fn SetALink(&self, _a_link: &DOMString, _rv: &mut ErrorResult) { pub fn SetALink(&self, _a_link: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn BgColor(&self) -> DOMString { pub fn BgColor(&self) -> DOMString {
null_string None
} }
pub fn SetBgColor(&self, _bg_color: &DOMString, _rv: &mut ErrorResult) { pub fn SetBgColor(&self, _bg_color: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Background(&self) -> DOMString { pub fn Background(&self) -> DOMString {
null_string None
} }
pub fn SetBackground(&self, _background: &DOMString, _rv: &mut ErrorResult) { pub fn SetBackground(&self, _background: &DOMString, _rv: &mut ErrorResult) {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLBRElement { pub struct HTMLBRElement {
@ -11,7 +11,7 @@ pub struct HTMLBRElement {
impl HTMLBRElement { impl HTMLBRElement {
pub fn Clear(&self) -> DOMString { pub fn Clear(&self) -> DOMString {
null_string None
} }
pub fn SetClear(&mut self, _text: &DOMString, _rv: &mut ErrorResult) { pub fn SetClear(&mut self, _text: &DOMString, _rv: &mut ErrorResult) {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
use dom::node::{AbstractNode, ScriptView}; use dom::node::{AbstractNode, ScriptView};
use dom::validitystate::ValidityState; use dom::validitystate::ValidityState;
@ -31,21 +31,21 @@ impl HTMLButtonElement {
} }
pub fn FormAction(&self) -> DOMString { pub fn FormAction(&self) -> DOMString {
null_string None
} }
pub fn SetFormAction(&mut self, _formaction: &DOMString, _rv: &mut ErrorResult) { pub fn SetFormAction(&mut self, _formaction: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn FormEnctype(&self) -> DOMString { pub fn FormEnctype(&self) -> DOMString {
null_string None
} }
pub fn SetFormEnctype(&mut self, _formenctype: &DOMString, _rv: &mut ErrorResult) { pub fn SetFormEnctype(&mut self, _formenctype: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn FormMethod(&self) -> DOMString { pub fn FormMethod(&self) -> DOMString {
null_string None
} }
pub fn SetFormMethod(&mut self, _formmethod: &DOMString, _rv: &mut ErrorResult) { pub fn SetFormMethod(&mut self, _formmethod: &DOMString, _rv: &mut ErrorResult) {
@ -59,28 +59,28 @@ impl HTMLButtonElement {
} }
pub fn FormTarget(&self) -> DOMString { pub fn FormTarget(&self) -> DOMString {
null_string None
} }
pub fn SetFormTarget(&mut self, _formtarget: &DOMString, _rv: &mut ErrorResult) { pub fn SetFormTarget(&mut self, _formtarget: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Name(&self) -> DOMString { pub fn Name(&self) -> DOMString {
null_string None
} }
pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) { pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Type(&self) -> DOMString { pub fn Type(&self) -> DOMString {
null_string None
} }
pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) { pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Value(&self) -> DOMString { pub fn Value(&self) -> DOMString {
null_string None
} }
pub fn SetValue(&mut self, _value: &DOMString, _rv: &mut ErrorResult) { pub fn SetValue(&mut self, _value: &DOMString, _rv: &mut ErrorResult) {
@ -101,7 +101,7 @@ impl HTMLButtonElement {
} }
pub fn ValidationMessage(&self) -> DOMString { pub fn ValidationMessage(&self) -> DOMString {
null_string None
} }
pub fn SetValidationMessage(&mut self, _message: &DOMString, _rv: &mut ErrorResult) { pub fn SetValidationMessage(&mut self, _message: &DOMString, _rv: &mut ErrorResult) {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLDataElement { pub struct HTMLDataElement {
@ -11,7 +11,7 @@ pub struct HTMLDataElement {
impl HTMLDataElement { impl HTMLDataElement {
pub fn Value(&self) -> DOMString { pub fn Value(&self) -> DOMString {
null_string None
} }
pub fn SetValue(&mut self, _value: &DOMString, _rv: &mut ErrorResult) { pub fn SetValue(&mut self, _value: &DOMString, _rv: &mut ErrorResult) {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLDivElement { pub struct HTMLDivElement {
@ -11,7 +11,7 @@ pub struct HTMLDivElement {
impl HTMLDivElement { impl HTMLDivElement {
pub fn Align(&self) -> DOMString { pub fn Align(&self) -> DOMString {
null_string None
} }
pub fn SetAlign(&mut self, _align: &DOMString, _rv: &mut ErrorResult) { pub fn SetAlign(&mut self, _align: &DOMString, _rv: &mut ErrorResult) {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLDListElement { pub struct HTMLDListElement {
@ -18,7 +18,7 @@ impl HTMLDListElement {
} }
pub fn Type(&self) -> DOMString { pub fn Type(&self) -> DOMString {
null_string None
} }
pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) { pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) {

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, null_string}; use dom::bindings::utils::{DOMString, ErrorResult};
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;
@ -54,14 +54,14 @@ impl HTMLDocument {
} }
pub fn GetDomain(&self, _rv: &mut ErrorResult) -> DOMString { pub fn GetDomain(&self, _rv: &mut ErrorResult) -> DOMString {
null_string None
} }
pub fn SetDomain(&self, _domain: &DOMString, _rv: &mut ErrorResult) { pub fn SetDomain(&self, _domain: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn GetCookie(&self, _rv: &mut ErrorResult) -> DOMString { pub fn GetCookie(&self, _rv: &mut ErrorResult) -> DOMString {
null_string None
} }
pub fn SetCookie(&self, _cookie: &DOMString, _rv: &mut ErrorResult) { pub fn SetCookie(&self, _cookie: &DOMString, _rv: &mut ErrorResult) {
@ -108,7 +108,7 @@ impl HTMLDocument {
} }
pub fn DesignMode(&self) -> DOMString { pub fn DesignMode(&self) -> DOMString {
null_string None
} }
pub fn SetDesignMode(&self, _mode: &DOMString, _rv: &mut ErrorResult) { pub fn SetDesignMode(&self, _mode: &DOMString, _rv: &mut ErrorResult) {
@ -135,39 +135,39 @@ impl HTMLDocument {
} }
pub fn QueryCommandValue(&self, _command_id: &DOMString, _rv: &mut ErrorResult) -> DOMString { pub fn QueryCommandValue(&self, _command_id: &DOMString, _rv: &mut ErrorResult) -> DOMString {
null_string None
} }
pub fn FgColor(&self) -> DOMString { pub fn FgColor(&self) -> DOMString {
null_string None
} }
pub fn SetFgColor(&self, _color: &DOMString) { pub fn SetFgColor(&self, _color: &DOMString) {
} }
pub fn LinkColor(&self) -> DOMString { pub fn LinkColor(&self) -> DOMString {
null_string None
} }
pub fn SetLinkColor(&self, _color: &DOMString) { pub fn SetLinkColor(&self, _color: &DOMString) {
} }
pub fn VlinkColor(&self) -> DOMString { pub fn VlinkColor(&self) -> DOMString {
null_string None
} }
pub fn SetVlinkColor(&self, _color: &DOMString) { pub fn SetVlinkColor(&self, _color: &DOMString) {
} }
pub fn AlinkColor(&self) -> DOMString { pub fn AlinkColor(&self) -> DOMString {
null_string None
} }
pub fn SetAlinkColor(&self, _color: &DOMString) { pub fn SetAlinkColor(&self, _color: &DOMString) {
} }
pub fn BgColor(&self) -> DOMString { pub fn BgColor(&self) -> DOMString {
null_string None
} }
pub fn SetBgColor(&self, _color: &DOMString) { pub fn SetBgColor(&self, _color: &DOMString) {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
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};
@ -24,21 +24,21 @@ impl HTMLElement {
impl HTMLElement { impl HTMLElement {
pub fn Title(&self) -> DOMString { pub fn Title(&self) -> DOMString {
null_string None
} }
pub fn SetTitle(&mut self, _title: &DOMString) { pub fn SetTitle(&mut self, _title: &DOMString) {
} }
pub fn Lang(&self) -> DOMString { pub fn Lang(&self) -> DOMString {
null_string None
} }
pub fn SetLang(&mut self, _lang: &DOMString) { pub fn SetLang(&mut self, _lang: &DOMString) {
} }
pub fn Dir(&self) -> DOMString { pub fn Dir(&self) -> DOMString {
null_string None
} }
pub fn SetDir(&mut self, _dir: &DOMString, _rv: &mut ErrorResult) { pub fn SetDir(&mut self, _dir: &DOMString, _rv: &mut ErrorResult) {
@ -75,14 +75,14 @@ impl HTMLElement {
} }
pub fn AccessKey(&self) -> DOMString { pub fn AccessKey(&self) -> DOMString {
null_string None
} }
pub fn SetAccessKey(&self, _key: &DOMString, _rv: &mut ErrorResult) { pub fn SetAccessKey(&self, _key: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn AccessKeyLabel(&self) -> DOMString { pub fn AccessKeyLabel(&self) -> DOMString {
null_string None
} }
pub fn Draggable(&self) -> bool { pub fn Draggable(&self) -> bool {
@ -93,7 +93,7 @@ impl HTMLElement {
} }
pub fn ContentEditable(&self) -> DOMString { pub fn ContentEditable(&self) -> DOMString {
null_string None
} }
pub fn SetContentEditable(&mut self, _val: &DOMString, _rv: &mut ErrorResult) { pub fn SetContentEditable(&mut self, _val: &DOMString, _rv: &mut ErrorResult) {
@ -111,7 +111,7 @@ impl HTMLElement {
} }
pub fn ClassName(&self) -> DOMString { pub fn ClassName(&self) -> DOMString {
null_string None
} }
pub fn SetClassName(&self, _class: &DOMString) { pub fn SetClassName(&self, _class: &DOMString) {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::document::AbstractDocument; use dom::document::AbstractDocument;
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
@ -12,42 +12,42 @@ pub struct HTMLEmbedElement {
impl HTMLEmbedElement { impl HTMLEmbedElement {
pub fn Src(&self) -> DOMString { pub fn Src(&self) -> DOMString {
null_string None
} }
pub fn SetSrc(&mut self, _src: &DOMString, _rv: &mut ErrorResult) { pub fn SetSrc(&mut self, _src: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Type(&self) -> DOMString { pub fn Type(&self) -> DOMString {
null_string None
} }
pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) { pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Width(&self) -> DOMString { pub fn Width(&self) -> DOMString {
null_string None
} }
pub fn SetWidth(&mut self, _width: &DOMString, _rv: &mut ErrorResult) { pub fn SetWidth(&mut self, _width: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Height(&self) -> DOMString { pub fn Height(&self) -> DOMString {
null_string None
} }
pub fn SetHeight(&mut self, _height: &DOMString, _rv: &mut ErrorResult) { pub fn SetHeight(&mut self, _height: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Align(&self) -> DOMString { pub fn Align(&self) -> DOMString {
null_string None
} }
pub fn SetAlign(&mut self, _type: &DOMString, _rv: &mut ErrorResult) { pub fn SetAlign(&mut self, _type: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Name(&self) -> DOMString { pub fn Name(&self) -> DOMString {
null_string None
} }
pub fn SetName(&mut self, _type: &DOMString, _rv: &mut ErrorResult) { pub fn SetName(&mut self, _type: &DOMString, _rv: &mut ErrorResult) {

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, null_string, ErrorResult, CacheableWrapper}; use dom::bindings::utils::{DOMString, ErrorResult, CacheableWrapper};
use dom::htmlcollection::HTMLCollection; use dom::htmlcollection::HTMLCollection;
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
use dom::node::{AbstractNode, ScriptView}; use dom::node::{AbstractNode, ScriptView};
@ -27,14 +27,14 @@ impl HTMLFieldSetElement {
} }
pub fn Name(&self) -> DOMString { pub fn Name(&self) -> DOMString {
null_string None
} }
pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) { pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Type(&self) -> DOMString { pub fn Type(&self) -> DOMString {
null_string None
} }
fn get_scope_and_cx(&self) -> (*JSObject, *JSContext) { fn get_scope_and_cx(&self) -> (*JSObject, *JSContext) {
@ -60,7 +60,7 @@ impl HTMLFieldSetElement {
} }
pub fn ValidationMessage(&self) -> DOMString { pub fn ValidationMessage(&self) -> DOMString {
null_string None
} }
pub fn CheckValidity(&self) -> bool { pub fn CheckValidity(&self) -> bool {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLFontElement { pub struct HTMLFontElement {
@ -11,21 +11,21 @@ pub struct HTMLFontElement {
impl HTMLFontElement { impl HTMLFontElement {
pub fn Color(&self) -> DOMString { pub fn Color(&self) -> DOMString {
null_string None
} }
pub fn SetColor(&mut self, _color: &DOMString, _rv: &mut ErrorResult) { pub fn SetColor(&mut self, _color: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Face(&self) -> DOMString { pub fn Face(&self) -> DOMString {
null_string None
} }
pub fn SetFace(&mut self, _face: &DOMString, _rv: &mut ErrorResult) { pub fn SetFace(&mut self, _face: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Size(&self) -> DOMString { pub fn Size(&self) -> DOMString {
null_string None
} }
pub fn SetSize(&mut self, _size: &DOMString, _rv: &mut ErrorResult) { pub fn SetSize(&mut self, _size: &DOMString, _rv: &mut ErrorResult) {

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::{CacheableWrapper, DOMString, ErrorResult, null_string}; use dom::bindings::utils::{CacheableWrapper, DOMString, ErrorResult};
use dom::element::HTMLFormElementTypeId; use dom::element::HTMLFormElementTypeId;
use dom::htmlcollection::HTMLCollection; use dom::htmlcollection::HTMLCollection;
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
@ -25,49 +25,49 @@ impl HTMLFormElement {
} }
pub fn AcceptCharset(&self) -> DOMString { pub fn AcceptCharset(&self) -> DOMString {
null_string None
} }
pub fn SetAcceptCharset(&mut self, _accept_charset: &DOMString, _rv: &mut ErrorResult) { pub fn SetAcceptCharset(&mut self, _accept_charset: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Action(&self) -> DOMString { pub fn Action(&self) -> DOMString {
null_string None
} }
pub fn SetAction(&mut self, _action: &DOMString, _rv: &mut ErrorResult) { pub fn SetAction(&mut self, _action: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Autocomplete(&self) -> DOMString { pub fn Autocomplete(&self) -> DOMString {
null_string None
} }
pub fn SetAutocomplete(&mut self, _autocomplete: &DOMString, _rv: &mut ErrorResult) { pub fn SetAutocomplete(&mut self, _autocomplete: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Enctype(&self) -> DOMString { pub fn Enctype(&self) -> DOMString {
null_string None
} }
pub fn SetEnctype(&mut self, _enctype: &DOMString, _rv: &mut ErrorResult) { pub fn SetEnctype(&mut self, _enctype: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Encoding(&self) -> DOMString { pub fn Encoding(&self) -> DOMString {
null_string None
} }
pub fn SetEncoding(&mut self, _encoding: &DOMString, _rv: &mut ErrorResult) { pub fn SetEncoding(&mut self, _encoding: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Method(&self) -> DOMString { pub fn Method(&self) -> DOMString {
null_string None
} }
pub fn SetMethod(&mut self, _method: &DOMString, _rv: &mut ErrorResult) { pub fn SetMethod(&mut self, _method: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Name(&self) -> DOMString { pub fn Name(&self) -> DOMString {
null_string None
} }
pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) { pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) {
@ -81,7 +81,7 @@ impl HTMLFormElement {
} }
pub fn Target(&self) -> DOMString { pub fn Target(&self) -> DOMString {
null_string None
} }
pub fn SetTarget(&mut self, _target: &DOMString, _rv: &mut ErrorResult) { pub fn SetTarget(&mut self, _target: &DOMString, _rv: &mut ErrorResult) {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::document::AbstractDocument; use dom::document::AbstractDocument;
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
use dom::windowproxy::WindowProxy; use dom::windowproxy::WindowProxy;
@ -13,35 +13,35 @@ pub struct HTMLFrameElement {
impl HTMLFrameElement { impl HTMLFrameElement {
pub fn Name(&self) -> DOMString { pub fn Name(&self) -> DOMString {
null_string None
} }
pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) { pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Scrolling(&self) -> DOMString { pub fn Scrolling(&self) -> DOMString {
null_string None
} }
pub fn SetScrolling(&mut self, _scrolling: &DOMString, _rv: &mut ErrorResult) { pub fn SetScrolling(&mut self, _scrolling: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Src(&self) -> DOMString { pub fn Src(&self) -> DOMString {
null_string None
} }
pub fn SetSrc(&mut self, _src: &DOMString, _rv: &mut ErrorResult) { pub fn SetSrc(&mut self, _src: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn FrameBorder(&self) -> DOMString { pub fn FrameBorder(&self) -> DOMString {
null_string None
} }
pub fn SetFrameBorder(&mut self, _frameborder: &DOMString, _rv: &mut ErrorResult) { pub fn SetFrameBorder(&mut self, _frameborder: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn LongDesc(&self) -> DOMString { pub fn LongDesc(&self) -> DOMString {
null_string None
} }
pub fn SetLongDesc(&mut self, _longdesc: &DOMString, _rv: &mut ErrorResult) { pub fn SetLongDesc(&mut self, _longdesc: &DOMString, _rv: &mut ErrorResult) {
@ -63,14 +63,14 @@ impl HTMLFrameElement {
} }
pub fn MarginHeight(&self) -> DOMString { pub fn MarginHeight(&self) -> DOMString {
null_string None
} }
pub fn SetMarginHeight(&mut self, _height: &DOMString, _rv: &mut ErrorResult) { pub fn SetMarginHeight(&mut self, _height: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn MarginWidth(&self) -> DOMString { pub fn MarginWidth(&self) -> DOMString {
null_string None
} }
pub fn SetMarginWidth(&mut self, _height: &DOMString, _rv: &mut ErrorResult) { pub fn SetMarginWidth(&mut self, _height: &DOMString, _rv: &mut ErrorResult) {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLFrameSetElement { pub struct HTMLFrameSetElement {
@ -11,14 +11,14 @@ pub struct HTMLFrameSetElement {
impl HTMLFrameSetElement { impl HTMLFrameSetElement {
pub fn Cols(&self) -> DOMString { pub fn Cols(&self) -> DOMString {
null_string None
} }
pub fn SetCols(&mut self, _cols: &DOMString, _rv: &mut ErrorResult) { pub fn SetCols(&mut self, _cols: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Rows(&self) -> DOMString { pub fn Rows(&self) -> DOMString {
null_string None
} }
pub fn SetRows(&mut self, _rows: &DOMString, _rv: &mut ErrorResult) { pub fn SetRows(&mut self, _rows: &DOMString, _rv: &mut ErrorResult) {

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, null_string}; use dom::bindings::utils::DOMString;
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub enum HeadingLevel { pub enum HeadingLevel {
@ -21,7 +21,7 @@ pub struct HTMLHeadingElement {
impl HTMLHeadingElement { impl HTMLHeadingElement {
pub fn Align(&self) -> DOMString { pub fn Align(&self) -> DOMString {
null_string None
} }
pub fn SetAlign(&mut self, _align: &DOMString) { pub fn SetAlign(&mut self, _align: &DOMString) {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLHRElement { pub struct HTMLHRElement {
@ -11,14 +11,14 @@ pub struct HTMLHRElement {
impl HTMLHRElement { impl HTMLHRElement {
pub fn Align(&self) -> DOMString { pub fn Align(&self) -> DOMString {
null_string None
} }
pub fn SetAlign(&mut self, _align: &DOMString, _rv: &mut ErrorResult) { pub fn SetAlign(&mut self, _align: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Color(&self) -> DOMString { pub fn Color(&self) -> DOMString {
null_string None
} }
pub fn SetColor(&mut self, _color: &DOMString, _rv: &mut ErrorResult) { pub fn SetColor(&mut self, _color: &DOMString, _rv: &mut ErrorResult) {
@ -32,14 +32,14 @@ impl HTMLHRElement {
} }
pub fn Size(&self) -> DOMString { pub fn Size(&self) -> DOMString {
null_string None
} }
pub fn SetSize(&mut self, _size: &DOMString, _rv: &mut ErrorResult) { pub fn SetSize(&mut self, _size: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Width(&self) -> DOMString { pub fn Width(&self) -> DOMString {
null_string None
} }
pub fn SetWidth(&mut self, _width: &DOMString, _rv: &mut ErrorResult) { pub fn SetWidth(&mut self, _width: &DOMString, _rv: &mut ErrorResult) {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLHtmlElement { pub struct HTMLHtmlElement {
@ -11,7 +11,7 @@ pub struct HTMLHtmlElement {
impl HTMLHtmlElement { impl HTMLHtmlElement {
pub fn Version(&self) -> DOMString { pub fn Version(&self) -> DOMString {
null_string None
} }
pub fn SetVersion(&mut self, _version: &DOMString, _rv: &mut ErrorResult) { pub fn SetVersion(&mut self, _version: &DOMString, _rv: &mut ErrorResult) {

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, null_string, ErrorResult, str}; use dom::bindings::utils::{DOMString, ErrorResult, null_str_as_empty};
use dom::document::AbstractDocument; use dom::document::AbstractDocument;
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
use dom::node::{AbstractNode, ScriptView}; use dom::node::{AbstractNode, ScriptView};
@ -60,40 +60,40 @@ impl HTMLIFrameElement {
impl HTMLIFrameElement { impl HTMLIFrameElement {
pub fn Src(&self) -> DOMString { pub fn Src(&self) -> DOMString {
null_string None
} }
pub fn SetSrc(&mut self, _src: &DOMString, _rv: &mut ErrorResult) { pub fn SetSrc(&mut self, _src: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Srcdoc(&self) -> DOMString { pub fn Srcdoc(&self) -> DOMString {
null_string None
} }
pub fn SetSrcdoc(&mut self, _srcdoc: &DOMString, _rv: &mut ErrorResult) { pub fn SetSrcdoc(&mut self, _srcdoc: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Name(&self) -> DOMString { pub fn Name(&self) -> DOMString {
null_string None
} }
pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) { pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Sandbox(&self, _abstract_self: AbstractNode<ScriptView>) -> DOMString { pub fn Sandbox(&self, _abstract_self: AbstractNode<ScriptView>) -> DOMString {
self.parent.parent.GetAttribute(&str(~"sandbox")) self.parent.parent.GetAttribute(&Some(~"sandbox"))
} }
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(()); let mut rv = Ok(());
self.parent.parent.SetAttribute(abstract_self, &str(~"sandbox"), sandbox, &mut rv); 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) {
let name = name.to_str(); let name = null_str_as_empty(name);
if "sandbox" == name { if "sandbox" == name {
let mut modes = AllowNothing as u8; let mut modes = AllowNothing as u8;
let words = value.to_str(); let words = null_str_as_empty(value);
for word in words.split_iter(' ') { for word in words.split_iter(' ') {
modes |= match word.to_ascii_lower().as_slice() { modes |= match word.to_ascii_lower().as_slice() {
"allow-same-origin" => AllowSameOrigin, "allow-same-origin" => AllowSameOrigin,
@ -117,14 +117,14 @@ impl HTMLIFrameElement {
} }
pub fn Width(&self) -> DOMString { pub fn Width(&self) -> DOMString {
null_string None
} }
pub fn SetWidth(&mut self, _width: &DOMString, _rv: &mut ErrorResult) { pub fn SetWidth(&mut self, _width: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Height(&self) -> DOMString { pub fn Height(&self) -> DOMString {
null_string None
} }
pub fn SetHeight(&mut self, _height: &DOMString, _rv: &mut ErrorResult) { pub fn SetHeight(&mut self, _height: &DOMString, _rv: &mut ErrorResult) {
@ -139,42 +139,42 @@ impl HTMLIFrameElement {
} }
pub fn Align(&self) -> DOMString { pub fn Align(&self) -> DOMString {
null_string None
} }
pub fn SetAlign(&mut self, _align: &DOMString, _rv: &mut ErrorResult) { pub fn SetAlign(&mut self, _align: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Scrolling(&self) -> DOMString { pub fn Scrolling(&self) -> DOMString {
null_string None
} }
pub fn SetScrolling(&mut self, _scrolling: &DOMString, _rv: &mut ErrorResult) { pub fn SetScrolling(&mut self, _scrolling: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn FrameBorder(&self) -> DOMString { pub fn FrameBorder(&self) -> DOMString {
null_string None
} }
pub fn SetFrameBorder(&mut self, _frameborder: &DOMString, _rv: &mut ErrorResult) { pub fn SetFrameBorder(&mut self, _frameborder: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn LongDesc(&self) -> DOMString { pub fn LongDesc(&self) -> DOMString {
null_string None
} }
pub fn SetLongDesc(&mut self, _longdesc: &DOMString, _rv: &mut ErrorResult) { pub fn SetLongDesc(&mut self, _longdesc: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn MarginHeight(&self) -> DOMString { pub fn MarginHeight(&self) -> DOMString {
null_string None
} }
pub fn SetMarginHeight(&mut self, _marginheight: &DOMString, _rv: &mut ErrorResult) { pub fn SetMarginHeight(&mut self, _marginheight: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn MarginWidth(&self) -> DOMString { pub fn MarginWidth(&self) -> DOMString {
null_string None
} }
pub fn SetMarginWidth(&mut self, _marginwidth: &DOMString, _rv: &mut ErrorResult) { pub fn SetMarginWidth(&mut self, _marginwidth: &DOMString, _rv: &mut ErrorResult) {

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, str, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult, null_str_as_empty};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
use dom::node::{ScriptView, AbstractNode}; use dom::node::{ScriptView, AbstractNode};
use extra::url::Url; use extra::url::Url;
@ -40,7 +40,7 @@ impl HTMLImageElement {
} }
pub fn AfterSetAttr(&mut self, name: &DOMString, _value: &DOMString) { pub fn AfterSetAttr(&mut self, name: &DOMString, _value: &DOMString) {
let name = name.to_str(); let name = null_str_as_empty(name);
if "src" == name { if "src" == name {
let doc = self.parent.parent.parent.owner_doc; let doc = self.parent.parent.parent.owner_doc;
for doc in doc.iter() { for doc in doc.iter() {
@ -55,14 +55,14 @@ impl HTMLImageElement {
} }
pub fn Alt(&self) -> DOMString { pub fn Alt(&self) -> DOMString {
null_string None
} }
pub fn SetAlt(&mut self, _alt: &DOMString, _rv: &mut ErrorResult) { pub fn SetAlt(&mut self, _alt: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Src(&self, _abstract_self: AbstractNode<ScriptView>) -> DOMString { pub fn Src(&self, _abstract_self: AbstractNode<ScriptView>) -> DOMString {
null_string None
} }
pub fn SetSrc(&mut self, pub fn SetSrc(&mut self,
@ -71,19 +71,19 @@ impl HTMLImageElement {
_rv: &mut 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,
&str(~"src"), &Some(~"src"),
&str(src.to_str())); &Some(null_str_as_empty(src)));
} }
pub fn CrossOrigin(&self) -> DOMString { pub fn CrossOrigin(&self) -> DOMString {
null_string None
} }
pub fn SetCrossOrigin(&mut self, _cross_origin: &DOMString, _rv: &mut ErrorResult) { pub fn SetCrossOrigin(&mut self, _cross_origin: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn UseMap(&self) -> DOMString { pub fn UseMap(&self) -> DOMString {
null_string None
} }
pub fn SetUseMap(&mut self, _use_map: &DOMString, _rv: &mut ErrorResult) { pub fn SetUseMap(&mut self, _use_map: &DOMString, _rv: &mut ErrorResult) {
@ -129,8 +129,8 @@ impl HTMLImageElement {
_rv: &mut 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,
&str(~"width"), &Some(~"width"),
&str(width.to_str())); &Some(width.to_str()));
} }
pub fn Height(&self, abstract_self: AbstractNode<ScriptView>) -> u32 { pub fn Height(&self, abstract_self: AbstractNode<ScriptView>) -> u32 {
@ -166,8 +166,8 @@ impl HTMLImageElement {
_rv: &mut 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,
&str(~"height"), &Some(~"height"),
&str(height.to_str())); &Some(height.to_str()));
} }
pub fn NaturalWidth(&self) -> u32 { pub fn NaturalWidth(&self) -> u32 {
@ -183,14 +183,14 @@ impl HTMLImageElement {
} }
pub fn Name(&self) -> DOMString { pub fn Name(&self) -> DOMString {
null_string None
} }
pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) { pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Align(&self) -> DOMString { pub fn Align(&self) -> DOMString {
null_string None
} }
pub fn SetAlign(&mut self, _align: &DOMString, _rv: &mut ErrorResult) { pub fn SetAlign(&mut self, _align: &DOMString, _rv: &mut ErrorResult) {
@ -211,14 +211,14 @@ impl HTMLImageElement {
} }
pub fn LongDesc(&self) -> DOMString { pub fn LongDesc(&self) -> DOMString {
null_string None
} }
pub fn SetLongDesc(&mut self, _longdesc: &DOMString, _rv: &mut ErrorResult) { pub fn SetLongDesc(&mut self, _longdesc: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Border(&self) -> DOMString { pub fn Border(&self) -> DOMString {
null_string None
} }
pub fn SetBorder(&mut self, _border: &DOMString, _rv: &mut ErrorResult) { pub fn SetBorder(&mut self, _border: &DOMString, _rv: &mut ErrorResult) {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLInputElement { pub struct HTMLInputElement {
@ -11,21 +11,21 @@ pub struct HTMLInputElement {
impl HTMLInputElement { impl HTMLInputElement {
pub fn Accept(&self) -> DOMString { pub fn Accept(&self) -> DOMString {
null_string None
} }
pub fn SetAccept(&mut self, _accept: &DOMString, _rv: &mut ErrorResult) { pub fn SetAccept(&mut self, _accept: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Alt(&self) -> DOMString { pub fn Alt(&self) -> DOMString {
null_string None
} }
pub fn SetAlt(&mut self, _alt: &DOMString, _rv: &mut ErrorResult) { pub fn SetAlt(&mut self, _alt: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Autocomplete(&self) -> DOMString { pub fn Autocomplete(&self) -> DOMString {
null_string None
} }
pub fn SetAutocomplete(&mut self, _autocomple: &DOMString, _rv: &mut ErrorResult) { pub fn SetAutocomplete(&mut self, _autocomple: &DOMString, _rv: &mut ErrorResult) {
@ -60,21 +60,21 @@ impl HTMLInputElement {
} }
pub fn FormAction(&self) -> DOMString { pub fn FormAction(&self) -> DOMString {
null_string None
} }
pub fn SetFormAction(&mut self, _form_action: &DOMString, _rv: &mut ErrorResult) { pub fn SetFormAction(&mut self, _form_action: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn FormEnctype(&self) -> DOMString { pub fn FormEnctype(&self) -> DOMString {
null_string None
} }
pub fn SetFormEnctype(&mut self, _form_enctype: &DOMString, _rv: &mut ErrorResult) { pub fn SetFormEnctype(&mut self, _form_enctype: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn FormMethod(&self) -> DOMString { pub fn FormMethod(&self) -> DOMString {
null_string None
} }
pub fn SetFormMethod(&mut self, _form_method: &DOMString, _rv: &mut ErrorResult) { pub fn SetFormMethod(&mut self, _form_method: &DOMString, _rv: &mut ErrorResult) {
@ -88,7 +88,7 @@ impl HTMLInputElement {
} }
pub fn FormTarget(&self) -> DOMString { pub fn FormTarget(&self) -> DOMString {
null_string None
} }
pub fn SetFormTarget(&mut self, _form_target: &DOMString, _rv: &mut ErrorResult) { pub fn SetFormTarget(&mut self, _form_target: &DOMString, _rv: &mut ErrorResult) {
@ -109,14 +109,14 @@ impl HTMLInputElement {
} }
pub fn InputMode(&self) -> DOMString { pub fn InputMode(&self) -> DOMString {
null_string None
} }
pub fn SetInputMode(&mut self, _input_mode: &DOMString, _rv: &mut ErrorResult) { pub fn SetInputMode(&mut self, _input_mode: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Max(&self) -> DOMString { pub fn Max(&self) -> DOMString {
null_string None
} }
pub fn SetMax(&mut self, _max: &DOMString, _rv: &mut ErrorResult) { pub fn SetMax(&mut self, _max: &DOMString, _rv: &mut ErrorResult) {
@ -130,7 +130,7 @@ impl HTMLInputElement {
} }
pub fn Min(&self) -> DOMString { pub fn Min(&self) -> DOMString {
null_string None
} }
pub fn SetMin(&mut self, _min: &DOMString, _rv: &mut ErrorResult) { pub fn SetMin(&mut self, _min: &DOMString, _rv: &mut ErrorResult) {
@ -144,21 +144,21 @@ impl HTMLInputElement {
} }
pub fn Name(&self) -> DOMString { pub fn Name(&self) -> DOMString {
null_string None
} }
pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) { pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Pattern(&self) -> DOMString { pub fn Pattern(&self) -> DOMString {
null_string None
} }
pub fn SetPattern(&mut self, _pattern: &DOMString, _rv: &mut ErrorResult) { pub fn SetPattern(&mut self, _pattern: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Placeholder(&self) -> DOMString { pub fn Placeholder(&self) -> DOMString {
null_string None
} }
pub fn SetPlaceholder(&mut self, _placeholder: &DOMString, _rv: &mut ErrorResult) { pub fn SetPlaceholder(&mut self, _placeholder: &DOMString, _rv: &mut ErrorResult) {
@ -186,35 +186,35 @@ impl HTMLInputElement {
} }
pub fn Src(&self) -> DOMString { pub fn Src(&self) -> DOMString {
null_string None
} }
pub fn SetSrc(&mut self, _src: &DOMString, _rv: &mut ErrorResult) { pub fn SetSrc(&mut self, _src: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Step(&self) -> DOMString { pub fn Step(&self) -> DOMString {
null_string None
} }
pub fn SetStep(&mut self, _step: &DOMString, _rv: &mut ErrorResult) { pub fn SetStep(&mut self, _step: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Type(&self) -> DOMString { pub fn Type(&self) -> DOMString {
null_string None
} }
pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) { pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn DefaultValue(&self) -> DOMString { pub fn DefaultValue(&self) -> DOMString {
null_string None
} }
pub fn SetDefaultValue(&mut self, _default_value: &DOMString, _rv: &mut ErrorResult) { pub fn SetDefaultValue(&mut self, _default_value: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Value(&self) -> DOMString { pub fn Value(&self) -> DOMString {
null_string None
} }
pub fn SetValue(&mut self, _value: &DOMString, _rv: &mut ErrorResult) { pub fn SetValue(&mut self, _value: &DOMString, _rv: &mut ErrorResult) {
@ -235,7 +235,7 @@ impl HTMLInputElement {
} }
pub fn GetValidationMessage(&self, _rv: &mut ErrorResult) -> DOMString { pub fn GetValidationMessage(&self, _rv: &mut ErrorResult) -> DOMString {
null_string None
} }
pub fn CheckValidity(&self) -> bool { pub fn CheckValidity(&self) -> bool {
@ -263,21 +263,21 @@ impl HTMLInputElement {
} }
pub fn GetSelectionDirection(&self, _rv: &mut ErrorResult) -> DOMString { pub fn GetSelectionDirection(&self, _rv: &mut ErrorResult) -> DOMString {
null_string None
} }
pub fn SetSelectionDirection(&mut self, _selection_direction: &DOMString, _rv: &mut ErrorResult) { pub fn SetSelectionDirection(&mut self, _selection_direction: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Align(&self) -> DOMString { pub fn Align(&self) -> DOMString {
null_string None
} }
pub fn SetAlign(&mut self, _align: &DOMString, _rv: &mut ErrorResult) { pub fn SetAlign(&mut self, _align: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn UseMap(&self) -> DOMString { pub fn UseMap(&self) -> DOMString {
null_string None
} }
pub fn SetUseMap(&mut self, _align: &DOMString, _rv: &mut ErrorResult) { pub fn SetUseMap(&mut self, _align: &DOMString, _rv: &mut ErrorResult) {

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, null_string}; use dom::bindings::utils::DOMString;
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLLabelElement { pub struct HTMLLabelElement {
@ -11,7 +11,7 @@ pub struct HTMLLabelElement {
impl HTMLLabelElement { impl HTMLLabelElement {
pub fn HtmlFor(&self) -> DOMString { pub fn HtmlFor(&self) -> DOMString {
null_string None
} }
pub fn SetHtmlFor(&mut self, _html_for: &DOMString) { pub fn SetHtmlFor(&mut self, _html_for: &DOMString) {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLLegendElement { pub struct HTMLLegendElement {
@ -11,7 +11,7 @@ pub struct HTMLLegendElement {
impl HTMLLegendElement { impl HTMLLegendElement {
pub fn Align(&self) -> DOMString { pub fn Align(&self) -> DOMString {
null_string None
} }
pub fn SetAlign(&mut self, _align: &DOMString, _rv: &mut ErrorResult) { pub fn SetAlign(&mut self, _align: &DOMString, _rv: &mut ErrorResult) {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLLIElement { pub struct HTMLLIElement {
@ -18,7 +18,7 @@ impl HTMLLIElement {
} }
pub fn Type(&self) -> DOMString { pub fn Type(&self) -> DOMString {
null_string None
} }
pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) { pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLLinkElement { pub struct HTMLLinkElement {
@ -18,63 +18,63 @@ impl HTMLLinkElement {
} }
pub fn Href(&self) -> DOMString { pub fn Href(&self) -> DOMString {
null_string None
} }
pub fn SetHref(&mut self, _href: &DOMString, _rv: &mut ErrorResult) { pub fn SetHref(&mut self, _href: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn CrossOrigin(&self) -> DOMString { pub fn CrossOrigin(&self) -> DOMString {
null_string None
} }
pub fn SetCrossOrigin(&mut self, _cross_origin: &DOMString, _rv: &mut ErrorResult) { pub fn SetCrossOrigin(&mut self, _cross_origin: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Rel(&self) -> DOMString { pub fn Rel(&self) -> DOMString {
null_string None
} }
pub fn SetRel(&mut self, _rel: &DOMString, _rv: &mut ErrorResult) { pub fn SetRel(&mut self, _rel: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Media(&self) -> DOMString { pub fn Media(&self) -> DOMString {
null_string None
} }
pub fn SetMedia(&mut self, _media: &DOMString, _rv: &mut ErrorResult) { pub fn SetMedia(&mut self, _media: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Hreflang(&self) -> DOMString { pub fn Hreflang(&self) -> DOMString {
null_string None
} }
pub fn SetHreflang(&mut self, _href: &DOMString, _rv: &mut ErrorResult) { pub fn SetHreflang(&mut self, _href: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Type(&self) -> DOMString { pub fn Type(&self) -> DOMString {
null_string None
} }
pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) { pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Charset(&self) -> DOMString { pub fn Charset(&self) -> DOMString {
null_string None
} }
pub fn SetCharset(&mut self, _charset: &DOMString, _rv: &mut ErrorResult) { pub fn SetCharset(&mut self, _charset: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Rev(&self) -> DOMString { pub fn Rev(&self) -> DOMString {
null_string None
} }
pub fn SetRev(&mut self, _rev: &DOMString, _rv: &mut ErrorResult) { pub fn SetRev(&mut self, _rev: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Target(&self) -> DOMString { pub fn Target(&self) -> DOMString {
null_string None
} }
pub fn SetTarget(&mut self, _target: &DOMString, _rv: &mut ErrorResult) { pub fn SetTarget(&mut self, _target: &DOMString, _rv: &mut ErrorResult) {

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, null_string, ErrorResult, CacheableWrapper}; use dom::bindings::utils::{DOMString, ErrorResult, CacheableWrapper};
use dom::htmlcollection::HTMLCollection; use dom::htmlcollection::HTMLCollection;
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
use js::jsapi::{JSObject, JSContext}; use js::jsapi::{JSObject, JSContext};
@ -13,7 +13,7 @@ pub struct HTMLMapElement {
impl HTMLMapElement { impl HTMLMapElement {
pub fn Name(&self) -> DOMString { pub fn Name(&self) -> DOMString {
null_string None
} }
pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) { pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::element::ElementTypeId; use dom::element::ElementTypeId;
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
@ -20,25 +20,25 @@ impl HTMLMediaElement {
impl HTMLMediaElement { impl HTMLMediaElement {
pub fn Src(&self) -> DOMString { pub fn Src(&self) -> DOMString {
null_string None
} }
pub fn SetSrc(&mut self, _src: &DOMString, _rv: &mut ErrorResult) { pub fn SetSrc(&mut self, _src: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn CurrentSrc(&self) -> DOMString { pub fn CurrentSrc(&self) -> DOMString {
null_string None
} }
pub fn CrossOrigin(&self) -> DOMString { pub fn CrossOrigin(&self) -> DOMString {
null_string None
} }
pub fn SetCrossOrigin(&mut self, _cross_origin: &DOMString, _rv: &mut ErrorResult) { pub fn SetCrossOrigin(&mut self, _cross_origin: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Preload(&self) -> DOMString { pub fn Preload(&self) -> DOMString {
null_string None
} }
pub fn SetPreload(&mut self, _preload: &DOMString, _rv: &mut ErrorResult) { pub fn SetPreload(&mut self, _preload: &DOMString, _rv: &mut ErrorResult) {
@ -48,7 +48,7 @@ impl HTMLMediaElement {
} }
pub fn CanPlayType(&self, _type: &DOMString) -> DOMString { pub fn CanPlayType(&self, _type: &DOMString) -> DOMString {
null_string None
} }
pub fn ReadyState(&self) -> u16 { pub fn ReadyState(&self) -> u16 {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLMetaElement { pub struct HTMLMetaElement {
@ -11,28 +11,28 @@ pub struct HTMLMetaElement {
impl HTMLMetaElement { impl HTMLMetaElement {
pub fn Name(&self) -> DOMString { pub fn Name(&self) -> DOMString {
null_string None
} }
pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) { pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn HttpEquiv(&self) -> DOMString { pub fn HttpEquiv(&self) -> DOMString {
null_string None
} }
pub fn SetHttpEquiv(&mut self, _http_equiv: &DOMString, _rv: &mut ErrorResult) { pub fn SetHttpEquiv(&mut self, _http_equiv: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Content(&self) -> DOMString { pub fn Content(&self) -> DOMString {
null_string None
} }
pub fn SetContent(&mut self, _content: &DOMString, _rv: &mut ErrorResult) { pub fn SetContent(&mut self, _content: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Scheme(&self) -> DOMString { pub fn Scheme(&self) -> DOMString {
null_string None
} }
pub fn SetScheme(&mut self, _scheme: &DOMString, _rv: &mut ErrorResult) { pub fn SetScheme(&mut self, _scheme: &DOMString, _rv: &mut ErrorResult) {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLModElement { pub struct HTMLModElement {
@ -11,14 +11,14 @@ pub struct HTMLModElement {
impl HTMLModElement { impl HTMLModElement {
pub fn Cite(&self) -> DOMString { pub fn Cite(&self) -> DOMString {
null_string None
} }
pub fn SetCite(&mut self, _cite: &DOMString, _rv: &mut ErrorResult) { pub fn SetCite(&mut self, _cite: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn DateTime(&self) -> DOMString { pub fn DateTime(&self) -> DOMString {
null_string None
} }
pub fn SetDateTime(&mut self, _datetime: &DOMString, _rv: &mut ErrorResult) { pub fn SetDateTime(&mut self, _datetime: &DOMString, _rv: &mut ErrorResult) {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::document::AbstractDocument; use dom::document::AbstractDocument;
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
use dom::node::{AbstractNode, ScriptView}; use dom::node::{AbstractNode, ScriptView};
@ -15,28 +15,28 @@ pub struct HTMLObjectElement {
impl HTMLObjectElement { impl HTMLObjectElement {
pub fn Data(&self) -> DOMString { pub fn Data(&self) -> DOMString {
null_string None
} }
pub fn SetData(&mut self, _data: &DOMString, _rv: &mut ErrorResult) { pub fn SetData(&mut self, _data: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Type(&self) -> DOMString { pub fn Type(&self) -> DOMString {
null_string None
} }
pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) { pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Name(&self) -> DOMString { pub fn Name(&self) -> DOMString {
null_string None
} }
pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) { pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn UseMap(&self) -> DOMString { pub fn UseMap(&self) -> DOMString {
null_string None
} }
pub fn SetUseMap(&mut self, _use_map: &DOMString, _rv: &mut ErrorResult) { pub fn SetUseMap(&mut self, _use_map: &DOMString, _rv: &mut ErrorResult) {
@ -47,14 +47,14 @@ impl HTMLObjectElement {
} }
pub fn Width(&self) -> DOMString { pub fn Width(&self) -> DOMString {
null_string None
} }
pub fn SetWidth(&mut self, _width: &DOMString, _rv: &mut ErrorResult) { pub fn SetWidth(&mut self, _width: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Height(&self) -> DOMString { pub fn Height(&self) -> DOMString {
null_string None
} }
pub fn SetHeight(&mut self, _height: &DOMString, _rv: &mut ErrorResult) { pub fn SetHeight(&mut self, _height: &DOMString, _rv: &mut ErrorResult) {
@ -77,7 +77,7 @@ impl HTMLObjectElement {
} }
pub fn ValidationMessage(&self) -> DOMString { pub fn ValidationMessage(&self) -> DOMString {
null_string None
} }
pub fn CheckValidity(&self) -> bool { pub fn CheckValidity(&self) -> bool {
@ -88,21 +88,21 @@ impl HTMLObjectElement {
} }
pub fn Align(&self) -> DOMString { pub fn Align(&self) -> DOMString {
null_string None
} }
pub fn SetAlign(&mut self, _align: &DOMString, _rv: &mut ErrorResult) { pub fn SetAlign(&mut self, _align: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Archive(&self) -> DOMString { pub fn Archive(&self) -> DOMString {
null_string None
} }
pub fn SetArchive(&mut self, _archive: &DOMString, _rv: &mut ErrorResult) { pub fn SetArchive(&mut self, _archive: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Code(&self) -> DOMString { pub fn Code(&self) -> DOMString {
null_string None
} }
pub fn SetCode(&mut self, _code: &DOMString, _rv: &mut ErrorResult) { pub fn SetCode(&mut self, _code: &DOMString, _rv: &mut ErrorResult) {
@ -123,7 +123,7 @@ impl HTMLObjectElement {
} }
pub fn Standby(&self) -> DOMString { pub fn Standby(&self) -> DOMString {
null_string None
} }
pub fn SetStandby(&mut self, _standby: &DOMString, _rv: &mut ErrorResult) { pub fn SetStandby(&mut self, _standby: &DOMString, _rv: &mut ErrorResult) {
@ -137,21 +137,21 @@ impl HTMLObjectElement {
} }
pub fn CodeBase(&self) -> DOMString { pub fn CodeBase(&self) -> DOMString {
null_string None
} }
pub fn SetCodeBase(&mut self, _codebase: &DOMString, _rv: &mut ErrorResult) { pub fn SetCodeBase(&mut self, _codebase: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn CodeType(&self) -> DOMString { pub fn CodeType(&self) -> DOMString {
null_string None
} }
pub fn SetCodeType(&mut self, _codetype: &DOMString, _rv: &mut ErrorResult) { pub fn SetCodeType(&mut self, _codetype: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Border(&self) -> DOMString { pub fn Border(&self) -> DOMString {
null_string None
} }
pub fn SetBorder(&mut self, _border: &DOMString, _rv: &mut ErrorResult) { pub fn SetBorder(&mut self, _border: &DOMString, _rv: &mut ErrorResult) {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLOListElement { pub struct HTMLOListElement {
@ -25,7 +25,7 @@ impl HTMLOListElement {
} }
pub fn Type(&self) -> DOMString { pub fn Type(&self) -> DOMString {
null_string None
} }
pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) { pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) {

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_string}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLOptGroupElement { pub struct HTMLOptGroupElement {
@ -18,7 +18,7 @@ impl HTMLOptGroupElement {
} }
pub fn Label(&self) -> DOMString { pub fn Label(&self) -> DOMString {
null_string None
} }
pub fn SetLabel(&mut self, _label: &DOMString, _rv: &mut ErrorResult) { pub fn SetLabel(&mut self, _label: &DOMString, _rv: &mut ErrorResult) {

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_string}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
use dom::node::{AbstractNode, ScriptView}; use dom::node::{AbstractNode, ScriptView};
@ -23,7 +23,7 @@ impl HTMLOptionElement {
} }
pub fn Label(&self) -> DOMString { pub fn Label(&self) -> DOMString {
null_string None
} }
pub fn SetLabel(&mut self, _label: &DOMString, _rv: &mut ErrorResult) { pub fn SetLabel(&mut self, _label: &DOMString, _rv: &mut ErrorResult) {
@ -44,14 +44,14 @@ impl HTMLOptionElement {
} }
pub fn Value(&self) -> DOMString { pub fn Value(&self) -> DOMString {
null_string None
} }
pub fn SetValue(&mut self, _value: &DOMString, _rv: &mut ErrorResult) { pub fn SetValue(&mut self, _value: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Text(&self) -> DOMString { pub fn Text(&self) -> DOMString {
null_string None
} }
pub fn SetText(&mut self, _text: &DOMString, _rv: &mut ErrorResult) { pub fn SetText(&mut self, _text: &DOMString, _rv: &mut ErrorResult) {

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_string}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
use dom::node::{AbstractNode, ScriptView}; use dom::node::{AbstractNode, ScriptView};
use dom::validitystate::ValidityState; use dom::validitystate::ValidityState;
@ -17,25 +17,25 @@ impl HTMLOutputElement {
} }
pub fn Name(&self) -> DOMString { pub fn Name(&self) -> DOMString {
null_string None
} }
pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) { pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Type(&self) -> DOMString { pub fn Type(&self) -> DOMString {
null_string None
} }
pub fn DefaultValue(&self) -> DOMString { pub fn DefaultValue(&self) -> DOMString {
null_string None
} }
pub fn SetDefaultValue(&mut self, _value: &DOMString, _rv: &mut ErrorResult) { pub fn SetDefaultValue(&mut self, _value: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Value(&self) -> DOMString { pub fn Value(&self) -> DOMString {
null_string None
} }
pub fn SetValue(&mut self, _value: &DOMString, _rv: &mut ErrorResult) { pub fn SetValue(&mut self, _value: &DOMString, _rv: &mut ErrorResult) {
@ -56,7 +56,7 @@ impl HTMLOutputElement {
} }
pub fn ValidationMessage(&self) -> DOMString { pub fn ValidationMessage(&self) -> DOMString {
null_string None
} }
pub fn SetValidationMessage(&mut self, _message: &DOMString, _rv: &mut ErrorResult) { pub fn SetValidationMessage(&mut self, _message: &DOMString, _rv: &mut ErrorResult) {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLParagraphElement { pub struct HTMLParagraphElement {
@ -11,7 +11,7 @@ pub struct HTMLParagraphElement {
impl HTMLParagraphElement { impl HTMLParagraphElement {
pub fn Align(&self) -> DOMString { pub fn Align(&self) -> DOMString {
null_string None
} }
pub fn SetAlign(&mut self, _align: &DOMString, _rv: &mut ErrorResult) { pub fn SetAlign(&mut self, _align: &DOMString, _rv: &mut ErrorResult) {

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_string}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLParamElement { pub struct HTMLParamElement {
@ -11,28 +11,28 @@ pub struct HTMLParamElement {
impl HTMLParamElement { impl HTMLParamElement {
pub fn Name(&self) -> DOMString { pub fn Name(&self) -> DOMString {
null_string None
} }
pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) { pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Value(&self) -> DOMString { pub fn Value(&self) -> DOMString {
null_string None
} }
pub fn SetValue(&mut self, _value: &DOMString, _rv: &mut ErrorResult) { pub fn SetValue(&mut self, _value: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Type(&self) -> DOMString { pub fn Type(&self) -> DOMString {
null_string None
} }
pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) { pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn ValueType(&self) -> DOMString { pub fn ValueType(&self) -> DOMString {
null_string None
} }
pub fn SetValueType(&mut self, _value_type: &DOMString, _rv: &mut ErrorResult) { pub fn SetValueType(&mut self, _value_type: &DOMString, _rv: &mut ErrorResult) {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLQuoteElement { pub struct HTMLQuoteElement {
@ -11,7 +11,7 @@ pub struct HTMLQuoteElement {
impl HTMLQuoteElement { impl HTMLQuoteElement {
pub fn Cite(&self) -> DOMString { pub fn Cite(&self) -> DOMString {
null_string None
} }
pub fn SetCite(&self, _cite: &DOMString, _rv: &mut ErrorResult) { pub fn SetCite(&self, _cite: &DOMString, _rv: &mut ErrorResult) {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLScriptElement { pub struct HTMLScriptElement {
@ -11,21 +11,21 @@ pub struct HTMLScriptElement {
impl HTMLScriptElement { impl HTMLScriptElement {
pub fn Src(&self) -> DOMString { pub fn Src(&self) -> DOMString {
null_string None
} }
pub fn SetSrc(&mut self, _src: &DOMString, _rv: &mut ErrorResult) { pub fn SetSrc(&mut self, _src: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Type(&self) -> DOMString { pub fn Type(&self) -> DOMString {
null_string None
} }
pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) { pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Charset(&self) -> DOMString { pub fn Charset(&self) -> DOMString {
null_string None
} }
pub fn SetCharset(&mut self, _charset: &DOMString, _rv: &mut ErrorResult) { pub fn SetCharset(&mut self, _charset: &DOMString, _rv: &mut ErrorResult) {
@ -46,28 +46,28 @@ impl HTMLScriptElement {
} }
pub fn CrossOrigin(&self) -> DOMString { pub fn CrossOrigin(&self) -> DOMString {
null_string None
} }
pub fn SetCrossOrigin(&mut self, _cross_origin: &DOMString, _rv: &mut ErrorResult) { pub fn SetCrossOrigin(&mut self, _cross_origin: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Text(&self) -> DOMString { pub fn Text(&self) -> DOMString {
null_string None
} }
pub fn SetText(&mut self, _text: &DOMString, _rv: &mut ErrorResult) { pub fn SetText(&mut self, _text: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Event(&self) -> DOMString { pub fn Event(&self) -> DOMString {
null_string None
} }
pub fn SetEvent(&mut self, _event: &DOMString, _rv: &mut ErrorResult) { pub fn SetEvent(&mut self, _event: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn HtmlFor(&self) -> DOMString { pub fn HtmlFor(&self) -> DOMString {
null_string None
} }
pub fn SetHtmlFor(&mut self, _html_for: &DOMString, _rv: &mut ErrorResult) { pub fn SetHtmlFor(&mut self, _html_for: &DOMString, _rv: &mut ErrorResult) {

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_string}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
use dom::node::{AbstractNode, ScriptView}; use dom::node::{AbstractNode, ScriptView};
use dom::validitystate::ValidityState; use dom::validitystate::ValidityState;
@ -38,7 +38,7 @@ impl HTMLSelectElement {
} }
pub fn Name(&self) -> DOMString { pub fn Name(&self) -> DOMString {
null_string None
} }
pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) { pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) {
@ -59,7 +59,7 @@ impl HTMLSelectElement {
} }
pub fn Type(&self) -> DOMString { pub fn Type(&self) -> DOMString {
null_string None
} }
pub fn Length(&self) -> u32 { pub fn Length(&self) -> u32 {
@ -98,7 +98,7 @@ impl HTMLSelectElement {
} }
pub fn Value(&self) -> DOMString { pub fn Value(&self) -> DOMString {
null_string None
} }
pub fn SetValue(&mut self, _value: &DOMString) { pub fn SetValue(&mut self, _value: &DOMString) {
@ -119,7 +119,7 @@ impl HTMLSelectElement {
} }
pub fn ValidationMessage(&self) -> DOMString { pub fn ValidationMessage(&self) -> DOMString {
null_string None
} }
pub fn SetValidationMessage(&mut self, _message: &DOMString, _rv: &mut ErrorResult) { pub fn SetValidationMessage(&mut self, _message: &DOMString, _rv: &mut ErrorResult) {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLSourceElement { pub struct HTMLSourceElement {
@ -11,21 +11,21 @@ pub struct HTMLSourceElement {
impl HTMLSourceElement { impl HTMLSourceElement {
pub fn Src(&self) -> DOMString { pub fn Src(&self) -> DOMString {
null_string None
} }
pub fn SetSrc(&mut self, _src: &DOMString, _rv: &mut ErrorResult) { pub fn SetSrc(&mut self, _src: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Type(&self) -> DOMString { pub fn Type(&self) -> DOMString {
null_string None
} }
pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) { pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Media(&self) -> DOMString { pub fn Media(&self) -> DOMString {
null_string None
} }
pub fn SetMedia(&mut self, _media: &DOMString, _rv: &mut ErrorResult) { pub fn SetMedia(&mut self, _media: &DOMString, _rv: &mut ErrorResult) {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLStyleElement { pub struct HTMLStyleElement {
@ -18,14 +18,14 @@ impl HTMLStyleElement {
} }
pub fn Media(&self) -> DOMString { pub fn Media(&self) -> DOMString {
null_string None
} }
pub fn SetMedia(&mut self, _media: &DOMString, _rv: &mut ErrorResult) { pub fn SetMedia(&mut self, _media: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Type(&self) -> DOMString { pub fn Type(&self) -> DOMString {
null_string None
} }
pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) { pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLTableCaptionElement { pub struct HTMLTableCaptionElement {
@ -11,7 +11,7 @@ pub struct HTMLTableCaptionElement {
impl HTMLTableCaptionElement { impl HTMLTableCaptionElement {
pub fn Align(&self) -> DOMString { pub fn Align(&self) -> DOMString {
null_string None
} }
pub fn SetAlign(&mut self, _align: &DOMString, _rv: &mut ErrorResult) { pub fn SetAlign(&mut self, _align: &DOMString, _rv: &mut ErrorResult) {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLTableCellElement { pub struct HTMLTableCellElement {
@ -25,7 +25,7 @@ impl HTMLTableCellElement {
} }
pub fn Headers(&self) -> DOMString { pub fn Headers(&self) -> DOMString {
null_string None
} }
pub fn SetHeaders(&self, _headers: &DOMString, _rv: &mut ErrorResult) { pub fn SetHeaders(&self, _headers: &DOMString, _rv: &mut ErrorResult) {
@ -39,56 +39,56 @@ impl HTMLTableCellElement {
} }
pub fn Abbr(&self) -> DOMString { pub fn Abbr(&self) -> DOMString {
null_string None
} }
pub fn SetAbbr(&self, _abbr: &DOMString, _rv: &mut ErrorResult) { pub fn SetAbbr(&self, _abbr: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Scope(&self) -> DOMString { pub fn Scope(&self) -> DOMString {
null_string None
} }
pub fn SetScope(&self, _abbr: &DOMString, _rv: &mut ErrorResult) { pub fn SetScope(&self, _abbr: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Align(&self) -> DOMString { pub fn Align(&self) -> DOMString {
null_string None
} }
pub fn SetAlign(&self, _align: &DOMString, _rv: &mut ErrorResult) { pub fn SetAlign(&self, _align: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Axis(&self) -> DOMString { pub fn Axis(&self) -> DOMString {
null_string None
} }
pub fn SetAxis(&self, _axis: &DOMString, _rv: &mut ErrorResult) { pub fn SetAxis(&self, _axis: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Height(&self) -> DOMString { pub fn Height(&self) -> DOMString {
null_string None
} }
pub fn SetHeight(&self, _height: &DOMString, _rv: &mut ErrorResult) { pub fn SetHeight(&self, _height: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Width(&self) -> DOMString { pub fn Width(&self) -> DOMString {
null_string None
} }
pub fn SetWidth(&self, _width: &DOMString, _rv: &mut ErrorResult) { pub fn SetWidth(&self, _width: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Ch(&self) -> DOMString { pub fn Ch(&self) -> DOMString {
null_string None
} }
pub fn SetCh(&self, _ch: &DOMString, _rv: &mut ErrorResult) { pub fn SetCh(&self, _ch: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn ChOff(&self) -> DOMString { pub fn ChOff(&self) -> DOMString {
null_string None
} }
pub fn SetChOff(&self, _ch_off: &DOMString, _rv: &mut ErrorResult) { pub fn SetChOff(&self, _ch_off: &DOMString, _rv: &mut ErrorResult) {
@ -102,14 +102,14 @@ impl HTMLTableCellElement {
} }
pub fn VAlign(&self) -> DOMString { pub fn VAlign(&self) -> DOMString {
null_string None
} }
pub fn SetVAlign(&self, _valign: &DOMString, _rv: &mut ErrorResult) { pub fn SetVAlign(&self, _valign: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn BgColor(&self) -> DOMString { pub fn BgColor(&self) -> DOMString {
null_string None
} }
pub fn SetBgColor(&self, _bg_color: &DOMString, _rv: &mut ErrorResult) { pub fn SetBgColor(&self, _bg_color: &DOMString, _rv: &mut ErrorResult) {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLTableColElement { pub struct HTMLTableColElement {
@ -18,35 +18,35 @@ impl HTMLTableColElement {
} }
pub fn Align(&self) -> DOMString { pub fn Align(&self) -> DOMString {
null_string None
} }
pub fn SetAlign(&mut self, _align: &DOMString, _rv: &mut ErrorResult) { pub fn SetAlign(&mut self, _align: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Ch(&self) -> DOMString { pub fn Ch(&self) -> DOMString {
null_string None
} }
pub fn SetCh(&mut self, _ch: &DOMString, _rv: &mut ErrorResult) { pub fn SetCh(&mut self, _ch: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn ChOff(&self) -> DOMString { pub fn ChOff(&self) -> DOMString {
null_string None
} }
pub fn SetChOff(&mut self, _ch_off: &DOMString, _rv: &mut ErrorResult) { pub fn SetChOff(&mut self, _ch_off: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn VAlign(&self) -> DOMString { pub fn VAlign(&self) -> DOMString {
null_string None
} }
pub fn SetVAlign(&mut self, _v_align: &DOMString, _rv: &mut ErrorResult) { pub fn SetVAlign(&mut self, _v_align: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Width(&self) -> DOMString { pub fn Width(&self) -> DOMString {
null_string None
} }
pub fn SetWidth(&mut self, _width: &DOMString, _rv: &mut ErrorResult) { pub fn SetWidth(&mut self, _width: &DOMString, _rv: &mut ErrorResult) {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLTableElement { pub struct HTMLTableElement {
@ -34,63 +34,63 @@ impl HTMLTableElement {
} }
pub fn Align(&self) -> DOMString { pub fn Align(&self) -> DOMString {
null_string None
} }
pub fn SetAlign(&self, _align: &DOMString, _rv: &mut ErrorResult) { pub fn SetAlign(&self, _align: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Border(&self) -> DOMString { pub fn Border(&self) -> DOMString {
null_string None
} }
pub fn SetBorder(&self, _border: &DOMString, _rv: &mut ErrorResult) { pub fn SetBorder(&self, _border: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Frame(&self) -> DOMString { pub fn Frame(&self) -> DOMString {
null_string None
} }
pub fn SetFrame(&self, _frame: &DOMString, _rv: &mut ErrorResult) { pub fn SetFrame(&self, _frame: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Rules(&self) -> DOMString { pub fn Rules(&self) -> DOMString {
null_string None
} }
pub fn SetRules(&self, _rules: &DOMString, _rv: &mut ErrorResult) { pub fn SetRules(&self, _rules: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Summary(&self) -> DOMString { pub fn Summary(&self) -> DOMString {
null_string None
} }
pub fn SetSummary(&self, _summary: &DOMString, _rv: &mut ErrorResult) { pub fn SetSummary(&self, _summary: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Width(&self) -> DOMString { pub fn Width(&self) -> DOMString {
null_string None
} }
pub fn SetWidth(&self, _width: &DOMString, _rv: &mut ErrorResult) { pub fn SetWidth(&self, _width: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn BgColor(&self) -> DOMString { pub fn BgColor(&self) -> DOMString {
null_string None
} }
pub fn SetBgColor(&self, _bg_color: &DOMString, _rv: &mut ErrorResult) { pub fn SetBgColor(&self, _bg_color: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn CellPadding(&self) -> DOMString { pub fn CellPadding(&self) -> DOMString {
null_string None
} }
pub fn SetCellPadding(&self, _cell_padding: &DOMString, _rv: &mut ErrorResult) { pub fn SetCellPadding(&self, _cell_padding: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn CellSpacing(&self) -> DOMString { pub fn CellSpacing(&self) -> DOMString {
null_string None
} }
pub fn SetCellSpacing(&self, _cell_spacing: &DOMString, _rv: &mut ErrorResult) { pub fn SetCellSpacing(&self, _cell_spacing: &DOMString, _rv: &mut ErrorResult) {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLTableRowElement { pub struct HTMLTableRowElement {
@ -30,35 +30,35 @@ impl HTMLTableRowElement {
} }
pub fn Align(&self) -> DOMString { pub fn Align(&self) -> DOMString {
null_string None
} }
pub fn SetAlign(&self, _align: &DOMString, _rv: &mut ErrorResult) { pub fn SetAlign(&self, _align: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Ch(&self) -> DOMString { pub fn Ch(&self) -> DOMString {
null_string None
} }
pub fn SetCh(&self, _ch: &DOMString, _rv: &mut ErrorResult) { pub fn SetCh(&self, _ch: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn ChOff(&self) -> DOMString { pub fn ChOff(&self) -> DOMString {
null_string None
} }
pub fn SetChOff(&self, _ch_off: &DOMString, _rv: &mut ErrorResult) { pub fn SetChOff(&self, _ch_off: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn VAlign(&self) -> DOMString { pub fn VAlign(&self) -> DOMString {
null_string None
} }
pub fn SetVAlign(&self, _v_align: &DOMString, _rv: &mut ErrorResult) { pub fn SetVAlign(&self, _v_align: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn BgColor(&self) -> DOMString { pub fn BgColor(&self) -> DOMString {
null_string None
} }
pub fn SetBgColor(&self, _bg_color: &DOMString, _rv: &mut ErrorResult) { pub fn SetBgColor(&self, _bg_color: &DOMString, _rv: &mut ErrorResult) {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLTableSectionElement { pub struct HTMLTableSectionElement {
@ -14,28 +14,28 @@ impl HTMLTableSectionElement {
} }
pub fn Align(&self) -> DOMString { pub fn Align(&self) -> DOMString {
null_string None
} }
pub fn SetAlign(&mut self, _align: &DOMString, _rv: &mut ErrorResult) { pub fn SetAlign(&mut self, _align: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Ch(&self) -> DOMString { pub fn Ch(&self) -> DOMString {
null_string None
} }
pub fn SetCh(&mut self, _ch: &DOMString, _rv: &mut ErrorResult) { pub fn SetCh(&mut self, _ch: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn ChOff(&self) -> DOMString { pub fn ChOff(&self) -> DOMString {
null_string None
} }
pub fn SetChOff(&mut self, _ch_off: &DOMString, _rv: &mut ErrorResult) { pub fn SetChOff(&mut self, _ch_off: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn VAlign(&self) -> DOMString { pub fn VAlign(&self) -> DOMString {
null_string None
} }
pub fn SetVAlign(&mut self, _v_align: &DOMString, _rv: &mut ErrorResult) { pub fn SetVAlign(&mut self, _v_align: &DOMString, _rv: &mut ErrorResult) {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLTextAreaElement { pub struct HTMLTextAreaElement {
@ -39,14 +39,14 @@ impl HTMLTextAreaElement {
} }
pub fn Name(&self) -> DOMString { pub fn Name(&self) -> DOMString {
null_string None
} }
pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) { pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Placeholder(&self) -> DOMString { pub fn Placeholder(&self) -> DOMString {
null_string None
} }
pub fn SetPlaceholder(&mut self, _placeholder: &DOMString, _rv: &mut ErrorResult) { pub fn SetPlaceholder(&mut self, _placeholder: &DOMString, _rv: &mut ErrorResult) {
@ -74,28 +74,28 @@ impl HTMLTextAreaElement {
} }
pub fn Wrap(&self) -> DOMString { pub fn Wrap(&self) -> DOMString {
null_string None
} }
pub fn SetWrap(&mut self, _wrap: &DOMString, _rv: &mut ErrorResult) { pub fn SetWrap(&mut self, _wrap: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Type(&self) -> DOMString { pub fn Type(&self) -> DOMString {
null_string None
} }
pub fn SetType(&mut self, _type: &DOMString) { pub fn SetType(&mut self, _type: &DOMString) {
} }
pub fn DefaultValue(&self) -> DOMString { pub fn DefaultValue(&self) -> DOMString {
null_string None
} }
pub fn SetDefaultValue(&mut self, _default_value: &DOMString, _rv: &mut ErrorResult) { pub fn SetDefaultValue(&mut self, _default_value: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Value(&self) -> DOMString { pub fn Value(&self) -> DOMString {
null_string None
} }
pub fn SetValue(&mut self, _value: &DOMString) { pub fn SetValue(&mut self, _value: &DOMString) {
@ -116,7 +116,7 @@ impl HTMLTextAreaElement {
} }
pub fn ValidationMessage(&self) -> DOMString { pub fn ValidationMessage(&self) -> DOMString {
null_string None
} }
pub fn CheckValidity(&self) -> bool { pub fn CheckValidity(&self) -> bool {
@ -144,7 +144,7 @@ impl HTMLTextAreaElement {
} }
pub fn GetSelectionDirection(&self, _rv: &mut ErrorResult) -> DOMString { pub fn GetSelectionDirection(&self, _rv: &mut ErrorResult) -> DOMString {
null_string None
} }
pub fn SetSelectionDirection(&self, _selection_direction: &DOMString, _rv: &mut ErrorResult) { pub fn SetSelectionDirection(&self, _selection_direction: &DOMString, _rv: &mut ErrorResult) {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLTimeElement { pub struct HTMLTimeElement {
@ -11,7 +11,7 @@ pub struct HTMLTimeElement {
impl HTMLTimeElement { impl HTMLTimeElement {
pub fn DateTime(&self) -> DOMString { pub fn DateTime(&self) -> DOMString {
null_string None
} }
pub fn SetDateTime(&mut self, _dateTime: &DOMString, _rv: &mut ErrorResult) { pub fn SetDateTime(&mut self, _dateTime: &DOMString, _rv: &mut ErrorResult) {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLTitleElement { pub struct HTMLTitleElement {
@ -11,7 +11,7 @@ pub struct HTMLTitleElement {
impl HTMLTitleElement { impl HTMLTitleElement {
pub fn Text(&self) -> DOMString { pub fn Text(&self) -> DOMString {
null_string None
} }
pub fn SetText(&mut self, _text: &DOMString, _rv: &mut ErrorResult) { pub fn SetText(&mut self, _text: &DOMString, _rv: &mut ErrorResult) {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLTrackElement { pub struct HTMLTrackElement {
@ -11,28 +11,28 @@ pub struct HTMLTrackElement {
impl HTMLTrackElement { impl HTMLTrackElement {
pub fn Kind(&self) -> DOMString { pub fn Kind(&self) -> DOMString {
null_string None
} }
pub fn SetKind(&mut self, _kind: &DOMString, _rv: &mut ErrorResult) { pub fn SetKind(&mut self, _kind: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Src(&self) -> DOMString { pub fn Src(&self) -> DOMString {
null_string None
} }
pub fn SetSrc(&mut self, _src: &DOMString, _rv: &mut ErrorResult) { pub fn SetSrc(&mut self, _src: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Srclang(&self) -> DOMString { pub fn Srclang(&self) -> DOMString {
null_string None
} }
pub fn SetSrclang(&mut self, _srclang: &DOMString, _rv: &mut ErrorResult) { pub fn SetSrclang(&mut self, _srclang: &DOMString, _rv: &mut ErrorResult) {
} }
pub fn Label(&self) -> DOMString { pub fn Label(&self) -> DOMString {
null_string None
} }
pub fn SetLabel(&mut self, _label: &DOMString, _rv: &mut ErrorResult) { pub fn SetLabel(&mut self, _label: &DOMString, _rv: &mut ErrorResult) {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
pub struct HTMLUListElement { pub struct HTMLUListElement {
@ -18,7 +18,7 @@ impl HTMLUListElement {
} }
pub fn Type(&self) -> DOMString { pub fn Type(&self) -> DOMString {
null_string None
} }
pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) { pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) {

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, null_string, ErrorResult}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::htmlmediaelement::HTMLMediaElement; use dom::htmlmediaelement::HTMLMediaElement;
pub struct HTMLVideoElement { pub struct HTMLVideoElement {
@ -33,7 +33,7 @@ impl HTMLVideoElement {
} }
pub fn Poster(&self) -> DOMString { pub fn Poster(&self) -> DOMString {
null_string None
} }
pub fn SetPoster(&mut self, _poster: &DOMString, _rv: &ErrorResult) { pub fn SetPoster(&mut self, _poster: &DOMString, _rv: &ErrorResult) {

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, str, null_string}; use dom::bindings::utils::{DOMString, ErrorResult};
use dom::bindings::codegen::NavigatorBinding; use dom::bindings::codegen::NavigatorBinding;
use script_task::{page_from_context}; use script_task::{page_from_context};
@ -23,23 +23,23 @@ impl Navigator {
} }
pub fn DoNotTrack(&self) -> DOMString { pub fn DoNotTrack(&self) -> DOMString {
str(~"unspecified") Some(~"unspecified")
} }
pub fn Vendor(&self) -> DOMString { pub fn Vendor(&self) -> DOMString {
str(~"") // Like Gecko Some(~"") // Like Gecko
} }
pub fn VendorSub(&self) -> DOMString { pub fn VendorSub(&self) -> DOMString {
str(~"") // Like Gecko Some(~"") // Like Gecko
} }
pub fn Product(&self) -> DOMString { pub fn Product(&self) -> DOMString {
str(~"Gecko") // This is supposed to be constant, see webidl. Some(~"Gecko") // This is supposed to be constant, see webidl.
} }
pub fn ProductSub(&self) -> DOMString { pub fn ProductSub(&self) -> DOMString {
null_string None
} }
pub fn CookieEnabled(&self) -> bool { pub fn CookieEnabled(&self) -> bool {
@ -47,7 +47,7 @@ impl Navigator {
} }
pub fn GetBuildID(&self, _rv: &mut ErrorResult) -> DOMString { pub fn GetBuildID(&self, _rv: &mut ErrorResult) -> DOMString {
null_string None
} }
pub fn JavaEnabled(&self, _rv: &mut ErrorResult) -> bool { pub fn JavaEnabled(&self, _rv: &mut ErrorResult) -> bool {
@ -59,27 +59,27 @@ impl Navigator {
} }
pub fn AppName(&self) -> DOMString { pub fn AppName(&self) -> DOMString {
str(~"Netscape") // Like Gecko/Webkit Some(~"Netscape") // Like Gecko/Webkit
} }
pub fn GetAppCodeName(&self, _rv: &mut ErrorResult) -> DOMString { pub fn GetAppCodeName(&self, _rv: &mut ErrorResult) -> DOMString {
str(~"Mozilla") // Like Gecko/Webkit Some(~"Mozilla") // Like Gecko/Webkit
} }
pub fn GetAppVersion(&self, _rv: &mut ErrorResult) -> DOMString { pub fn GetAppVersion(&self, _rv: &mut ErrorResult) -> DOMString {
null_string None
} }
pub fn GetPlatform(&self, _rv: &mut ErrorResult) -> DOMString { pub fn GetPlatform(&self, _rv: &mut ErrorResult) -> DOMString {
null_string None
} }
pub fn GetUserAgent(&self, _rv: &mut ErrorResult) -> DOMString { pub fn GetUserAgent(&self, _rv: &mut ErrorResult) -> DOMString {
null_string None
} }
pub fn GetLanguage(&self) -> DOMString { pub fn GetLanguage(&self) -> DOMString {
null_string None
} }
pub fn OnLine(&self) -> bool { pub fn OnLine(&self) -> bool {
@ -105,4 +105,4 @@ impl BindingObject for Navigator {
Some((*page).frame.get_ref().window as @mut CacheableWrapper) Some((*page).frame.get_ref().window as @mut CacheableWrapper)
} }
} }
} }

View file

@ -5,8 +5,8 @@
//! 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, null_string, str, ErrorResult, NotFound, HierarchyRequest}; use dom::bindings::utils::{WrapperCache, DOMString, ErrorResult, NotFound, HierarchyRequest};
use dom::bindings::utils::{BindingObject, CacheableWrapper, rust_box}; use dom::bindings::utils::{BindingObject, CacheableWrapper, rust_box, null_str_as_empty};
use dom::bindings; use dom::bindings;
use dom::characterdata::CharacterData; use dom::characterdata::CharacterData;
use dom::document::AbstractDocument; use dom::document::AbstractDocument;
@ -516,11 +516,11 @@ impl Node<ScriptView> {
} }
pub fn NodeName(&self) -> DOMString { pub fn NodeName(&self) -> DOMString {
null_string None
} }
pub fn GetBaseURI(&self) -> DOMString { pub fn GetBaseURI(&self) -> DOMString {
null_string None
} }
pub fn GetOwnerDocument(&self) -> Option<AbstractDocument> { pub fn GetOwnerDocument(&self) -> Option<AbstractDocument> {
@ -556,7 +556,7 @@ impl Node<ScriptView> {
} }
pub fn GetNodeValue(&self) -> DOMString { pub fn GetNodeValue(&self) -> DOMString {
null_string None
} }
pub fn SetNodeValue(&mut self, _val: &DOMString, _rv: &mut ErrorResult) { pub fn SetNodeValue(&mut self, _val: &DOMString, _rv: &mut ErrorResult) {
@ -570,11 +570,11 @@ impl Node<ScriptView> {
if node.is_text() { if node.is_text() {
do node.with_imm_text() |text| { do node.with_imm_text() |text| {
let s = text.parent.Data(); let s = text.parent.Data();
content = content + s.to_str(); content = content + null_str_as_empty(&s);
} }
} }
} }
str(content) Some(content)
} }
CommentNodeTypeId | TextNodeTypeId => { CommentNodeTypeId | TextNodeTypeId => {
do abstract_self.with_imm_characterdata() |characterdata| { do abstract_self.with_imm_characterdata() |characterdata| {
@ -582,7 +582,7 @@ impl Node<ScriptView> {
} }
} }
DoctypeNodeTypeId => { DoctypeNodeTypeId => {
null_string None
} }
} }
} }
@ -609,7 +609,7 @@ impl Node<ScriptView> {
value: &DOMString, value: &DOMString,
_rv: &mut ErrorResult) { _rv: &mut ErrorResult) {
let is_empty = match value { let is_empty = match value {
&str(~"") | &null_string => true, &Some(~"") | &None => true,
_ => false _ => false
}; };
match self.type_id { match self.type_id {
@ -628,7 +628,7 @@ impl Node<ScriptView> {
self.wait_until_safe_to_modify_dom(); self.wait_until_safe_to_modify_dom();
do abstract_self.with_mut_characterdata() |characterdata| { do abstract_self.with_mut_characterdata() |characterdata| {
characterdata.data = value.to_str(); characterdata.data = null_str_as_empty(value);
// Notify the document that the content of this node is different // Notify the document that the content of this node is different
for doc in self.owner_doc.iter() { for doc in self.owner_doc.iter() {
@ -749,11 +749,11 @@ impl Node<ScriptView> {
} }
pub fn LookupPrefix(&self, _prefix: &DOMString) -> DOMString { pub fn LookupPrefix(&self, _prefix: &DOMString) -> DOMString {
null_string None
} }
pub fn LookupNamespaceURI(&self, _namespace: &DOMString) -> DOMString { pub fn LookupNamespaceURI(&self, _namespace: &DOMString) -> DOMString {
null_string None
} }
pub fn IsDefaultNamespace(&self, _namespace: &DOMString) -> bool { pub fn IsDefaultNamespace(&self, _namespace: &DOMString) -> bool {
@ -761,15 +761,15 @@ impl Node<ScriptView> {
} }
pub fn GetNamespaceURI(&self) -> DOMString { pub fn GetNamespaceURI(&self) -> DOMString {
null_string None
} }
pub fn GetPrefix(&self) -> DOMString { pub fn GetPrefix(&self) -> DOMString {
null_string None
} }
pub fn GetLocalName(&self) -> DOMString { pub fn GetLocalName(&self) -> DOMString {
null_string None
} }
pub fn HasAttributes(&self) -> bool { pub fn HasAttributes(&self) -> bool {

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_string}; use dom::bindings::utils::{DOMString, ErrorResult, 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;
@ -22,7 +22,7 @@ impl Text {
pub fn Constructor(owner: @mut Window, text: &DOMString, _rv: &mut ErrorResult) -> AbstractNode<ScriptView> { pub fn Constructor(owner: @mut Window, text: &DOMString, _rv: &mut ErrorResult) -> 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(text.to_str())) } unsafe { 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, _rv: &mut ErrorResult) -> AbstractNode<ScriptView> {
@ -30,6 +30,6 @@ impl Text {
} }
pub fn GetWholeText(&self, _rv: &mut ErrorResult) -> DOMString { pub fn GetWholeText(&self, _rv: &mut ErrorResult) -> DOMString {
null_string None
} }
} }

View file

@ -3,8 +3,8 @@
* 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::WindowBinding; use dom::bindings::codegen::WindowBinding;
use dom::bindings::utils::{WrapperCache, DOMString, null_string, Traceable}; use dom::bindings::utils::{WrapperCache, DOMString, Traceable};
use dom::bindings::utils::{CacheableWrapper, BindingObject}; use dom::bindings::utils::{CacheableWrapper, BindingObject, null_str_as_empty};
use dom::document::AbstractDocument; use dom::document::AbstractDocument;
use dom::node::{AbstractNode, ScriptView}; use dom::node::{AbstractNode, ScriptView};
use dom::navigator::Navigator; use dom::navigator::Navigator;
@ -65,7 +65,7 @@ pub struct TimerData {
impl Window { impl Window {
pub fn Alert(&self, s: &DOMString) { pub fn Alert(&self, s: &DOMString) {
// Right now, just print to the console // Right now, just print to the console
io::println(fmt!("ALERT: %s", s.to_str())); io::println(fmt!("ALERT: %s", null_str_as_empty(s)));
} }
pub fn Close(&self) { pub fn Close(&self) {
@ -77,14 +77,14 @@ impl Window {
} }
pub fn Name(&self) -> DOMString { pub fn Name(&self) -> DOMString {
null_string None
} }
pub fn SetName(&self, _name: &DOMString) { pub fn SetName(&self, _name: &DOMString) {
} }
pub fn Status(&self) -> DOMString { pub fn Status(&self) -> DOMString {
null_string None
} }
pub fn SetStatus(&self, _status: &DOMString) { pub fn SetStatus(&self, _status: &DOMString) {
@ -119,7 +119,7 @@ impl Window {
} }
pub fn Prompt(&self, _message: &DOMString, _default: &DOMString) -> DOMString { pub fn Prompt(&self, _message: &DOMString, _default: &DOMString) -> DOMString {
null_string None
} }
pub fn Print(&self) { pub fn Print(&self) {

View file

@ -2,7 +2,6 @@
* 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::str;
use dom::element::*; use dom::element::*;
use dom::htmlelement::HTMLElement; use dom::htmlelement::HTMLElement;
use dom::htmlheadingelement::{Heading1, Heading2, Heading3, Heading4, Heading5, Heading6}; use dom::htmlheadingelement::{Heading1, Heading2, Heading3, Heading4, Heading5, Heading6};
@ -374,7 +373,7 @@ pub fn parse_html(cx: *JSContext,
debug!("-- attach attrs"); debug!("-- attach attrs");
do node.as_mut_element |element| { do node.as_mut_element |element| {
for attr in tag.attributes.iter() { for attr in tag.attributes.iter() {
element.set_attr(node, &str(attr.name.clone()), &str(attr.value.clone())); element.set_attr(node, &Some(attr.name.clone()), &Some(attr.value.clone()));
} }
} }