mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Don't pass nullable strings to native DOM methods that want non-nullable strings. Fixes #1207.
This commit is contained in:
parent
803cd4b7cf
commit
08afc6d19d
75 changed files with 968 additions and 966 deletions
|
@ -4,7 +4,7 @@
|
|||
|
||||
use dom::bindings::codegen::AttrBinding;
|
||||
use dom::bindings::utils::{Reflectable, Reflector, DOMString};
|
||||
use dom::bindings::utils::{reflect_dom_object, null_str_as_empty};
|
||||
use dom::bindings::utils::reflect_dom_object;
|
||||
use dom::namespace::{Namespace, Null};
|
||||
use dom::window::Window;
|
||||
|
||||
|
@ -69,20 +69,20 @@ impl Attr {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn LocalName(&self) -> Option<DOMString> {
|
||||
Some(self.local_name().to_owned())
|
||||
pub fn LocalName(&self) -> DOMString {
|
||||
self.local_name().to_owned()
|
||||
}
|
||||
|
||||
pub fn Value(&self) -> Option<DOMString> {
|
||||
Some(self.value.clone())
|
||||
pub fn Value(&self) -> DOMString {
|
||||
self.value.clone()
|
||||
}
|
||||
|
||||
pub fn SetValue(&mut self, value: &Option<DOMString>) {
|
||||
self.value = null_str_as_empty(value);
|
||||
pub fn SetValue(&mut self, value: &DOMString) {
|
||||
self.value = value.clone();
|
||||
}
|
||||
|
||||
pub fn Name(&self) -> Option<DOMString> {
|
||||
Some(self.name.clone())
|
||||
pub fn Name(&self) -> DOMString {
|
||||
self.name.clone()
|
||||
}
|
||||
|
||||
pub fn GetNamespaceURI(&self) -> Option<DOMString> {
|
||||
|
|
|
@ -1066,9 +1066,6 @@ for (uint32_t i = 0; i < length; ++i) {
|
|||
|
||||
def getConversionCode(varName, isOptional=False):
|
||||
strval = "strval"
|
||||
if not type.nullable():
|
||||
# XXX #1207 Actually pass non-nullable strings to callees.
|
||||
strval = "Some(%s)" % strval
|
||||
if isOptional:
|
||||
strval = "Some(%s)" % strval
|
||||
if type.nullable():
|
||||
|
@ -1092,7 +1089,7 @@ for (uint32_t i = 0; i < length; ++i) {
|
|||
return handleDefault(
|
||||
conversionCode,
|
||||
("static data: [u8, ..%s] = [ %s ];\n"
|
||||
"%s = Some(str::from_utf8(data));" %
|
||||
"%s = str::from_utf8(data)" %
|
||||
(len(defaultValue.value) + 1,
|
||||
", ".join(["'" + char + "' as u8" for char in defaultValue.value] + ["0"]),
|
||||
varName)))
|
||||
|
@ -1109,12 +1106,14 @@ for (uint32_t i = 0; i < length; ++i) {
|
|||
"}\n" % CGIndenter(CGGeneric(getConversionCode("str"))).define(),
|
||||
declType, None, isOptional, None)
|
||||
|
||||
declType = "DOMString"
|
||||
initialValue = None
|
||||
if type.nullable():
|
||||
declType = "Option<%s>" % declType
|
||||
|
||||
if isOptional:
|
||||
declType = "Option<Option<DOMString>>"
|
||||
declType = "Option<%s>" % declType
|
||||
initialValue = "None"
|
||||
else:
|
||||
declType = "Option<DOMString>"
|
||||
initialValue = None
|
||||
|
||||
return (
|
||||
"%s\n" %
|
||||
|
@ -1587,8 +1586,7 @@ for (uint32_t i = 0; i < length; ++i) {
|
|||
if type.nullable():
|
||||
return (wrapAndSetPtr("*${jsvalPtr} = domstring_to_jsval(cx, &%s)" % result), False)
|
||||
else:
|
||||
#XXXjdm Can we be smarter when we know it's not nullable?
|
||||
return (wrapAndSetPtr("*${jsvalPtr} = domstring_to_jsval(cx, &%s)" % result), False)
|
||||
return (wrapAndSetPtr("*${jsvalPtr} = str_to_jsval(cx, &%s)" % result), False)
|
||||
|
||||
if type.isEnum():
|
||||
if type.nullable():
|
||||
|
@ -1722,7 +1720,10 @@ def getRetvalDeclarationForType(returnType, descriptorProvider,
|
|||
result = CGWrapper(result, pre="Nullable<", post=">")
|
||||
return result, False
|
||||
if returnType.isString():
|
||||
return CGGeneric("Option<DOMString>"), False
|
||||
result = CGGeneric("DOMString")
|
||||
if returnType.nullable():
|
||||
result = CGWrapper(result, pre="Option<", post=">")
|
||||
return result, False
|
||||
if returnType.isEnum():
|
||||
if returnType.nullable():
|
||||
raise TypeError("We don't support nullable enum return values")
|
||||
|
|
|
@ -272,19 +272,24 @@ pub fn jsval_to_domstring(cx: *JSContext, v: JSVal) -> Result<Option<DOMString>,
|
|||
}
|
||||
}
|
||||
|
||||
#[fixed_stack_segment]
|
||||
pub unsafe fn str_to_jsval(cx: *JSContext, string: &DOMString) -> JSVal {
|
||||
do string.to_utf16().as_imm_buf |buf, len| {
|
||||
let jsstr = JS_NewUCStringCopyN(cx, buf, len as libc::size_t);
|
||||
if jsstr.is_null() {
|
||||
// FIXME: is there something else we should do on failure?
|
||||
JSVAL_NULL
|
||||
} else {
|
||||
RUST_STRING_TO_JSVAL(jsstr)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[fixed_stack_segment]
|
||||
pub unsafe fn domstring_to_jsval(cx: *JSContext, string: &Option<DOMString>) -> JSVal {
|
||||
match string {
|
||||
&None => JSVAL_NULL,
|
||||
&Some(ref s) => do s.to_utf16().as_imm_buf |buf, len| {
|
||||
let jsstr = JS_NewUCStringCopyN(cx, buf, len as libc::size_t);
|
||||
if jsstr.is_null() {
|
||||
// FIXME: is there something else we should do on failure?
|
||||
JSVAL_NULL
|
||||
} else {
|
||||
RUST_STRING_TO_JSVAL(jsstr)
|
||||
}
|
||||
}
|
||||
&Some(ref s) => str_to_jsval(cx, s),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -22,12 +22,12 @@ impl CharacterData {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn Data(&self) -> Option<DOMString> {
|
||||
Some(self.data.clone())
|
||||
pub fn Data(&self) -> DOMString {
|
||||
self.data.clone()
|
||||
}
|
||||
|
||||
pub fn SetData(&mut self, arg: &Option<DOMString>) -> ErrorResult {
|
||||
self.data = arg.get_ref().clone();
|
||||
pub fn SetData(&mut self, arg: &DOMString) -> ErrorResult {
|
||||
self.data = arg.clone();
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -35,16 +35,16 @@ impl CharacterData {
|
|||
self.data.len() as u32
|
||||
}
|
||||
|
||||
pub fn SubstringData(&self, offset: u32, count: u32) -> Fallible<Option<DOMString>> {
|
||||
Ok(Some(self.data.slice(offset as uint, count as uint).to_str()))
|
||||
pub fn SubstringData(&self, offset: u32, count: u32) -> Fallible<DOMString> {
|
||||
Ok(self.data.slice(offset as uint, count as uint).to_str())
|
||||
}
|
||||
|
||||
pub fn AppendData(&mut self, arg: &Option<DOMString>) -> ErrorResult {
|
||||
self.data.push_str(arg.get_ref().clone());
|
||||
pub fn AppendData(&mut self, arg: &DOMString) -> ErrorResult {
|
||||
self.data.push_str(*arg);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn InsertData(&mut self, _offset: u32, _arg: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn InsertData(&mut self, _offset: u32, _arg: &DOMString) -> ErrorResult {
|
||||
fail!("CharacterData::InsertData() is unimplemented")
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ impl CharacterData {
|
|||
fail!("CharacterData::DeleteData() is unimplemented")
|
||||
}
|
||||
|
||||
pub fn ReplaceData(&mut self, _offset: u32, _count: u32, _arg: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn ReplaceData(&mut self, _offset: u32, _count: u32, _arg: &DOMString) -> ErrorResult {
|
||||
fail!("CharacterData::ReplaceData() is unimplemented")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::codegen::CommentBinding;
|
||||
use dom::bindings::utils::{DOMString, Fallible, null_str_as_empty};
|
||||
use dom::bindings::utils::{DOMString, Fallible};
|
||||
use dom::characterdata::CharacterData;
|
||||
use dom::document::AbstractDocument;
|
||||
use dom::node::{AbstractNode, ScriptView, CommentNodeTypeId, Node};
|
||||
|
@ -26,7 +26,7 @@ impl Comment {
|
|||
Node::reflect_node(@mut node, document, CommentBinding::Wrap)
|
||||
}
|
||||
|
||||
pub fn Constructor(owner: @mut Window, data: &Option<DOMString>) -> Fallible<AbstractNode<ScriptView>> {
|
||||
Ok(Comment::new(null_str_as_empty(data), owner.Document()))
|
||||
pub fn Constructor(owner: @mut Window, data: &DOMString) -> Fallible<AbstractNode<ScriptView>> {
|
||||
Ok(Comment::new(data.clone(), owner.Document()))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ use dom::comment::Comment;
|
|||
use dom::bindings::codegen::DocumentBinding;
|
||||
use dom::bindings::utils::{Reflectable, Reflector, Traceable, reflect_dom_object};
|
||||
use dom::bindings::utils::{ErrorResult, Fallible, NotSupported, InvalidCharacter};
|
||||
use dom::bindings::utils::{DOMString, null_str_as_empty_ref, null_str_as_empty, null_str_as_word_null};
|
||||
use dom::bindings::utils::DOMString;
|
||||
use dom::bindings::utils::{xml_name_type, InvalidXMLName};
|
||||
use dom::documentfragment::DocumentFragment;
|
||||
use dom::element::{Element};
|
||||
|
@ -180,31 +180,29 @@ impl Document {
|
|||
self.window.get_cx()
|
||||
}
|
||||
|
||||
pub fn GetElementsByTagName(&self, tag: &Option<DOMString>) -> @mut HTMLCollection {
|
||||
self.createHTMLCollection(|elem| eq_slice(elem.tag_name, null_str_as_empty(tag)))
|
||||
pub fn GetElementsByTagName(&self, tag: &DOMString) -> @mut HTMLCollection {
|
||||
self.createHTMLCollection(|elem| eq_slice(elem.tag_name, *tag))
|
||||
}
|
||||
|
||||
pub fn GetElementsByTagNameNS(&self, _ns: &Option<DOMString>, _tag: &Option<DOMString>) -> @mut HTMLCollection {
|
||||
pub fn GetElementsByTagNameNS(&self, _ns: &Option<DOMString>, _tag: &DOMString) -> @mut HTMLCollection {
|
||||
HTMLCollection::new(self.window, ~[])
|
||||
}
|
||||
|
||||
pub fn GetElementsByClassName(&self, _class: &Option<DOMString>) -> @mut HTMLCollection {
|
||||
pub fn GetElementsByClassName(&self, _class: &DOMString) -> @mut HTMLCollection {
|
||||
HTMLCollection::new(self.window, ~[])
|
||||
}
|
||||
|
||||
pub fn GetElementById(&self, id: &Option<DOMString>) -> Option<AbstractNode<ScriptView>> {
|
||||
let key: &~str = &null_str_as_empty(id);
|
||||
pub fn GetElementById(&self, id: &DOMString) -> Option<AbstractNode<ScriptView>> {
|
||||
// TODO: "in tree order, within the context object's tree"
|
||||
// http://dom.spec.whatwg.org/#dom-document-getelementbyid.
|
||||
match self.idmap.find_equiv(key) {
|
||||
match self.idmap.find_equiv(id) {
|
||||
None => None,
|
||||
Some(node) => Some(*node),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn CreateElement(&self, abstract_self: AbstractDocument, local_name: &Option<DOMString>) -> Fallible<AbstractNode<ScriptView>> {
|
||||
let local_name = null_str_as_empty(local_name);
|
||||
if xml_name_type(local_name) == InvalidXMLName {
|
||||
pub fn CreateElement(&self, abstract_self: AbstractDocument, local_name: &DOMString) -> Fallible<AbstractNode<ScriptView>> {
|
||||
if xml_name_type(*local_name) == InvalidXMLName {
|
||||
return Err(InvalidCharacter);
|
||||
}
|
||||
let local_name = local_name.to_ascii_lower();
|
||||
|
@ -215,16 +213,16 @@ impl Document {
|
|||
DocumentFragment::new(abstract_self)
|
||||
}
|
||||
|
||||
pub fn CreateTextNode(&self, abstract_self: AbstractDocument, data: &Option<DOMString>) -> AbstractNode<ScriptView> {
|
||||
Text::new(null_str_as_empty(data), abstract_self)
|
||||
pub fn CreateTextNode(&self, abstract_self: AbstractDocument, data: &DOMString) -> AbstractNode<ScriptView> {
|
||||
Text::new(data.clone(), abstract_self)
|
||||
}
|
||||
|
||||
pub fn CreateComment(&self, abstract_self: AbstractDocument, data: &Option<DOMString>) -> AbstractNode<ScriptView> {
|
||||
Comment::new(null_str_as_word_null(data), abstract_self)
|
||||
pub fn CreateComment(&self, abstract_self: AbstractDocument, data: &DOMString) -> AbstractNode<ScriptView> {
|
||||
Comment::new(data.clone(), abstract_self)
|
||||
}
|
||||
|
||||
pub fn CreateEvent(&self, interface: &Option<DOMString>) -> Fallible<AbstractEvent> {
|
||||
match null_str_as_empty_ref(interface) {
|
||||
pub fn CreateEvent(&self, interface: &DOMString) -> Fallible<AbstractEvent> {
|
||||
match interface.as_slice() {
|
||||
"UIEvents" => Ok(UIEvent::new(self.window, UIEventTypeId)),
|
||||
"MouseEvents" => Ok(MouseEvent::new(self.window)),
|
||||
"HTMLEvents" => Ok(Event::new(self.window, HTMLEventTypeId)),
|
||||
|
@ -232,7 +230,7 @@ impl Document {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn Title(&self, _: AbstractDocument) -> Option<DOMString> {
|
||||
pub fn Title(&self, _: AbstractDocument) -> DOMString {
|
||||
let mut title = ~"";
|
||||
match self.doctype {
|
||||
SVG => {
|
||||
|
@ -249,8 +247,7 @@ impl Document {
|
|||
for child in node.children() {
|
||||
if child.is_text() {
|
||||
do child.with_imm_text() |text| {
|
||||
let s = text.element.Data();
|
||||
title = title + null_str_as_empty(&s);
|
||||
title = title + text.element.Data();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -263,10 +260,10 @@ impl Document {
|
|||
let v: ~[&str] = title.word_iter().collect();
|
||||
title = v.connect(" ");
|
||||
title = title.trim().to_owned();
|
||||
Some(title)
|
||||
title
|
||||
}
|
||||
|
||||
pub fn SetTitle(&self, abstract_self: AbstractDocument, title: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetTitle(&self, abstract_self: AbstractDocument, title: &DOMString) -> ErrorResult {
|
||||
match self.doctype {
|
||||
SVG => {
|
||||
fail!("no SVG document yet")
|
||||
|
@ -305,9 +302,9 @@ impl Document {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn GetElementsByName(&self, name: &Option<DOMString>) -> @mut HTMLCollection {
|
||||
pub fn GetElementsByName(&self, name: &DOMString) -> @mut HTMLCollection {
|
||||
self.createHTMLCollection(|elem|
|
||||
elem.get_attr("name").is_some() && eq_slice(elem.get_attr("name").unwrap(), null_str_as_empty(name)))
|
||||
elem.get_attr("name").is_some() && eq_slice(elem.get_attr("name").unwrap(), *name))
|
||||
}
|
||||
|
||||
pub fn createHTMLCollection(&self, callback: &fn(elem: &Element) -> bool) -> @mut HTMLCollection {
|
||||
|
|
|
@ -10,9 +10,9 @@ use dom::node::{AbstractNode, ScriptView, Node, DoctypeNodeTypeId};
|
|||
/// The `DOCTYPE` tag.
|
||||
pub struct DocumentType {
|
||||
node: Node<ScriptView>,
|
||||
name: ~str,
|
||||
public_id: Option<~str>,
|
||||
system_id: Option<~str>,
|
||||
name: DOMString,
|
||||
public_id: DOMString,
|
||||
system_id: DOMString,
|
||||
force_quirks: bool
|
||||
}
|
||||
|
||||
|
@ -26,8 +26,8 @@ impl DocumentType {
|
|||
DocumentType {
|
||||
node: Node::new(DoctypeNodeTypeId, document),
|
||||
name: name,
|
||||
public_id: public_id,
|
||||
system_id: system_id,
|
||||
public_id: public_id.unwrap_or(~""),
|
||||
system_id: system_id.unwrap_or(~""),
|
||||
force_quirks: force_quirks,
|
||||
}
|
||||
}
|
||||
|
@ -47,15 +47,15 @@ impl DocumentType {
|
|||
}
|
||||
|
||||
impl DocumentType {
|
||||
pub fn Name(&self) -> Option<DOMString> {
|
||||
Some(self.name.clone())
|
||||
pub fn Name(&self) -> DOMString {
|
||||
self.name.clone()
|
||||
}
|
||||
|
||||
pub fn PublicId(&self) -> Option<DOMString> {
|
||||
pub fn PublicId(&self) -> DOMString {
|
||||
self.public_id.clone()
|
||||
}
|
||||
|
||||
pub fn SystemId(&self) -> Option<DOMString> {
|
||||
pub fn SystemId(&self) -> DOMString {
|
||||
self.system_id.clone()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ impl DOMParser {
|
|||
}
|
||||
|
||||
pub fn ParseFromString(&self,
|
||||
_s: &Option<DOMString>,
|
||||
_s: &DOMString,
|
||||
ty: DOMParserBinding::SupportedType)
|
||||
-> Fallible<AbstractDocument> {
|
||||
match ty {
|
||||
|
|
|
@ -261,12 +261,12 @@ impl<'self> Element {
|
|||
match abstract_self.type_id() {
|
||||
ElementNodeTypeId(HTMLImageElementTypeId) => {
|
||||
do abstract_self.with_mut_image_element |image| {
|
||||
image.AfterSetAttr(&Some(local_name.clone()), value);
|
||||
image.AfterSetAttr(&local_name, &null_str_as_empty(value));
|
||||
}
|
||||
}
|
||||
ElementNodeTypeId(HTMLIframeElementTypeId) => {
|
||||
do abstract_self.with_mut_iframe_element |iframe| {
|
||||
iframe.AfterSetAttr(&Some(local_name.clone()), value);
|
||||
iframe.AfterSetAttr(&local_name, &null_str_as_empty(value));
|
||||
}
|
||||
}
|
||||
_ => ()
|
||||
|
@ -280,44 +280,44 @@ impl<'self> Element {
|
|||
}
|
||||
|
||||
impl Element {
|
||||
pub fn TagName(&self) -> Option<DOMString> {
|
||||
Some(self.tag_name.to_owned().to_ascii_upper())
|
||||
pub fn TagName(&self) -> DOMString {
|
||||
self.tag_name.to_owned().to_ascii_upper()
|
||||
}
|
||||
|
||||
pub fn Id(&self, _abstract_self: AbstractNode<ScriptView>) -> Option<DOMString> {
|
||||
pub fn Id(&self, _abstract_self: AbstractNode<ScriptView>) -> DOMString {
|
||||
match self.get_attr(&"id") {
|
||||
Some(x) => Some(x),
|
||||
None => Some(~"")
|
||||
Some(x) => x,
|
||||
None => ~""
|
||||
}
|
||||
}
|
||||
|
||||
pub fn SetId(&mut self, abstract_self: AbstractNode<ScriptView>, id: &Option<DOMString>) {
|
||||
self.set_attribute(abstract_self, namespace::Null, &Some(~"id"), id);
|
||||
pub fn SetId(&mut self, abstract_self: AbstractNode<ScriptView>, id: &DOMString) {
|
||||
self.set_attribute(abstract_self, namespace::Null, &Some(~"id"), &Some(id.clone()));
|
||||
}
|
||||
|
||||
pub fn GetAttribute(&self, name: &Option<DOMString>) -> Option<DOMString> {
|
||||
self.get_attr(null_str_as_empty_ref(name))
|
||||
pub fn GetAttribute(&self, name: &DOMString) -> Option<DOMString> {
|
||||
self.get_attr(*name).map(|s| s.to_owned())
|
||||
}
|
||||
|
||||
pub fn GetAttributeNS(&self, namespace: &Option<DOMString>, local_name: &Option<DOMString>) -> Option<DOMString> {
|
||||
self.get_attribute(namespace, null_str_as_empty_ref(local_name))
|
||||
pub fn GetAttributeNS(&self, namespace: &Option<DOMString>, local_name: &DOMString) -> Option<DOMString> {
|
||||
self.get_attribute(namespace, *local_name)
|
||||
.map(|attr| attr.value.clone())
|
||||
}
|
||||
|
||||
pub fn SetAttribute(&mut self,
|
||||
abstract_self: AbstractNode<ScriptView>,
|
||||
name: &Option<DOMString>,
|
||||
value: &Option<DOMString>) -> ErrorResult {
|
||||
self.set_attr(abstract_self, name, value);
|
||||
name: &DOMString,
|
||||
value: &DOMString) -> ErrorResult {
|
||||
self.set_attr(abstract_self, &Some(name.clone()), &Some(value.clone()));
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn SetAttributeNS(&mut self,
|
||||
abstract_self: AbstractNode<ScriptView>,
|
||||
namespace_url: &Option<DOMString>,
|
||||
name: &Option<DOMString>,
|
||||
value: &Option<DOMString>) -> ErrorResult {
|
||||
let name_type = xml_name_type(name.to_str());
|
||||
name: &DOMString,
|
||||
value: &DOMString) -> ErrorResult {
|
||||
let name_type = xml_name_type(*name);
|
||||
match name_type {
|
||||
InvalidXMLName => return Err(InvalidCharacter),
|
||||
Name => return Err(NamespaceError),
|
||||
|
@ -325,38 +325,38 @@ impl Element {
|
|||
}
|
||||
|
||||
let namespace = Namespace::from_str(namespace_url);
|
||||
self.set_attribute(abstract_self, namespace, name, value)
|
||||
self.set_attribute(abstract_self, namespace, &Some(name.clone()), &Some(value.clone()))
|
||||
}
|
||||
|
||||
pub fn RemoveAttribute(&self, _name: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn RemoveAttribute(&self, _name: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn RemoveAttributeNS(&self, _namespace: &Option<DOMString>, _localname: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn RemoveAttributeNS(&self, _namespace: &Option<DOMString>, _localname: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn HasAttribute(&self, name: &Option<DOMString>) -> bool {
|
||||
pub fn HasAttribute(&self, name: &DOMString) -> bool {
|
||||
self.GetAttribute(name).is_some()
|
||||
}
|
||||
|
||||
pub fn HasAttributeNS(&self, namespace: &Option<DOMString>, local_name: &Option<DOMString>) -> bool {
|
||||
pub fn HasAttributeNS(&self, namespace: &Option<DOMString>, local_name: &DOMString) -> bool {
|
||||
self.GetAttributeNS(namespace, local_name).is_some()
|
||||
}
|
||||
|
||||
pub fn GetElementsByTagName(&self, _localname: &Option<DOMString>) -> @mut HTMLCollection {
|
||||
pub fn GetElementsByTagName(&self, _localname: &DOMString) -> @mut HTMLCollection {
|
||||
HTMLCollection::new(self.node.owner_doc().document().window, ~[])
|
||||
}
|
||||
|
||||
pub fn GetElementsByTagNameNS(&self, _namespace: &Option<DOMString>, _localname: &Option<DOMString>) -> Fallible<@mut HTMLCollection> {
|
||||
pub fn GetElementsByTagNameNS(&self, _namespace: &Option<DOMString>, _localname: &DOMString) -> Fallible<@mut HTMLCollection> {
|
||||
Ok(HTMLCollection::new(self.node.owner_doc().document().window, ~[]))
|
||||
}
|
||||
|
||||
pub fn GetElementsByClassName(&self, _names: &Option<DOMString>) -> @mut HTMLCollection {
|
||||
pub fn GetElementsByClassName(&self, _names: &DOMString) -> @mut HTMLCollection {
|
||||
HTMLCollection::new(self.node.owner_doc().document().window, ~[])
|
||||
}
|
||||
|
||||
pub fn MozMatchesSelector(&self, _selector: &Option<DOMString>) -> Fallible<bool> {
|
||||
pub fn MozMatchesSelector(&self, _selector: &DOMString) -> Fallible<bool> {
|
||||
Ok(false)
|
||||
}
|
||||
|
||||
|
@ -452,27 +452,27 @@ impl Element {
|
|||
0
|
||||
}
|
||||
|
||||
pub fn GetInnerHTML(&self) -> Fallible<Option<DOMString>> {
|
||||
Ok(None)
|
||||
pub fn GetInnerHTML(&self) -> Fallible<DOMString> {
|
||||
Ok(~"")
|
||||
}
|
||||
|
||||
pub fn SetInnerHTML(&mut self, _value: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetInnerHTML(&mut self, _value: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn GetOuterHTML(&self) -> Fallible<Option<DOMString>> {
|
||||
Ok(None)
|
||||
pub fn GetOuterHTML(&self) -> Fallible<DOMString> {
|
||||
Ok(~"")
|
||||
}
|
||||
|
||||
pub fn SetOuterHTML(&mut self, _value: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetOuterHTML(&mut self, _value: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn InsertAdjacentHTML(&mut self, _position: &Option<DOMString>, _text: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn InsertAdjacentHTML(&mut self, _position: &DOMString, _text: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn QuerySelector(&self, _selectors: &Option<DOMString>) -> Fallible<Option<AbstractNode<ScriptView>>> {
|
||||
pub fn QuerySelector(&self, _selectors: &DOMString) -> Fallible<Option<AbstractNode<ScriptView>>> {
|
||||
Ok(None)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ use dom::eventtarget::AbstractEventTarget;
|
|||
use dom::window::Window;
|
||||
use dom::bindings::codegen::EventBinding;
|
||||
use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
|
||||
use dom::bindings::utils::{DOMString, ErrorResult, Fallible, null_str_as_word_null};
|
||||
use dom::bindings::utils::{DOMString, ErrorResult, Fallible};
|
||||
use dom::mouseevent::MouseEvent;
|
||||
use dom::uievent::UIEvent;
|
||||
|
||||
|
@ -181,8 +181,8 @@ impl Event {
|
|||
self.phase as u16
|
||||
}
|
||||
|
||||
pub fn Type(&self) -> Option<DOMString> {
|
||||
Some(self.type_.clone())
|
||||
pub fn Type(&self) -> DOMString {
|
||||
self.type_.clone()
|
||||
}
|
||||
|
||||
pub fn GetTarget(&self) -> Option<AbstractEventTarget> {
|
||||
|
@ -225,10 +225,10 @@ impl Event {
|
|||
}
|
||||
|
||||
pub fn InitEvent(&mut self,
|
||||
type_: &Option<DOMString>,
|
||||
type_: &DOMString,
|
||||
bubbles: bool,
|
||||
cancelable: bool) -> ErrorResult {
|
||||
self.type_ = null_str_as_word_null(type_);
|
||||
self.type_ = type_.clone();
|
||||
self.cancelable = cancelable;
|
||||
self.bubbles = bubbles;
|
||||
self.initialized = true;
|
||||
|
@ -240,7 +240,7 @@ impl Event {
|
|||
}
|
||||
|
||||
pub fn Constructor(global: @mut Window,
|
||||
type_: &Option<DOMString>,
|
||||
type_: &DOMString,
|
||||
init: &EventBinding::EventInit) -> Fallible<AbstractEvent> {
|
||||
let ev = Event::new(global, HTMLEventTypeId);
|
||||
ev.mut_event().InitEvent(type_, init.bubbles, init.cancelable);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::utils::{Reflectable, Reflector, DOMString, Fallible};
|
||||
use dom::bindings::utils::{null_str_as_word_null, InvalidState};
|
||||
use dom::bindings::utils::{InvalidState};
|
||||
use dom::bindings::codegen::EventListenerBinding::EventListener;
|
||||
use dom::document::AbstractDocument;
|
||||
use dom::event::AbstractEvent;
|
||||
|
@ -141,11 +141,11 @@ impl EventTarget {
|
|||
}
|
||||
|
||||
pub fn AddEventListener(&mut self,
|
||||
ty: &Option<DOMString>,
|
||||
ty: &DOMString,
|
||||
listener: Option<EventListener>,
|
||||
capture: bool) {
|
||||
for &listener in listener.iter() {
|
||||
let entry = self.handlers.find_or_insert_with(null_str_as_word_null(ty), |_| ~[]);
|
||||
let entry = self.handlers.find_or_insert_with(ty.clone(), |_| ~[]);
|
||||
let phase = if capture { Capturing } else { Bubbling };
|
||||
let new_entry = EventListenerEntry {
|
||||
phase: phase,
|
||||
|
@ -158,11 +158,11 @@ impl EventTarget {
|
|||
}
|
||||
|
||||
pub fn RemoveEventListener(&mut self,
|
||||
ty: &Option<DOMString>,
|
||||
ty: &DOMString,
|
||||
listener: Option<EventListener>,
|
||||
capture: bool) {
|
||||
for &listener in listener.iter() {
|
||||
let mut entry = self.handlers.find_mut(&null_str_as_word_null(ty));
|
||||
let mut entry = self.handlers.find_mut(ty);
|
||||
for entry in entry.mut_iter() {
|
||||
let phase = if capture { Capturing } else { Bubbling };
|
||||
let old_entry = EventListenerEntry {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
|
||||
use dom::bindings::utils::{DOMString, null_str_as_empty};
|
||||
use dom::bindings::utils::DOMString;
|
||||
use dom::bindings::codegen::FormDataBinding;
|
||||
use dom::blob::Blob;
|
||||
use dom::window::Window;
|
||||
|
@ -11,8 +11,8 @@ use dom::window::Window;
|
|||
use std::hashmap::HashMap;
|
||||
|
||||
enum FormDatum {
|
||||
StringData(Option<DOMString>),
|
||||
BlobData { blob: @mut Blob, name: Option<DOMString> }
|
||||
StringData(DOMString),
|
||||
BlobData { blob: @mut Blob, name: DOMString }
|
||||
}
|
||||
|
||||
pub struct FormData {
|
||||
|
@ -34,16 +34,16 @@ impl FormData {
|
|||
reflect_dom_object(@mut FormData::new_inherited(window), window, FormDataBinding::Wrap)
|
||||
}
|
||||
|
||||
pub fn Append(&mut self, name: &Option<DOMString>, value: @mut Blob, filename: Option<Option<DOMString>>) {
|
||||
pub fn Append(&mut self, name: &DOMString, value: @mut Blob, filename: Option<DOMString>) {
|
||||
let blob = BlobData {
|
||||
blob: value,
|
||||
name: filename.unwrap_or(Some(~"default"))
|
||||
name: filename.unwrap_or(~"default")
|
||||
};
|
||||
self.data.insert(null_str_as_empty(name), blob);
|
||||
self.data.insert(name.clone(), blob);
|
||||
}
|
||||
|
||||
pub fn Append_(&mut self, name: &Option<DOMString>, value: &Option<DOMString>) {
|
||||
self.data.insert(null_str_as_empty(name), StringData((*value).clone()));
|
||||
pub fn Append_(&mut self, name: &DOMString, value: &DOMString) {
|
||||
self.data.insert(name.clone(), StringData((*value).clone()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -27,107 +27,107 @@ impl HTMLAnchorElement {
|
|||
}
|
||||
|
||||
impl HTMLAnchorElement {
|
||||
pub fn Href(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Href(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetHref(&mut self, _href: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetHref(&mut self, _href: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Target(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Target(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetTarget(&self, _target: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetTarget(&self, _target: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Download(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Download(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetDownload(&self, _download: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetDownload(&self, _download: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Ping(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Ping(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetPing(&self, _ping: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetPing(&self, _ping: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Rel(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Rel(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetRel(&self, _rel: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetRel(&self, _rel: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Hreflang(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Hreflang(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetHreflang(&self, _href_lang: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetHreflang(&self, _href_lang: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Type(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Type(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetType(&mut self, _type: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Text(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Text(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetText(&mut self, _text: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetText(&mut self, _text: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Coords(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Coords(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetCoords(&mut self, _coords: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetCoords(&mut self, _coords: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Charset(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Charset(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetCharset(&mut self, _charset: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetCharset(&mut self, _charset: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Name(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Name(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetName(&mut self, _name: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Rev(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Rev(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetRev(&mut self, _rev: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetRev(&mut self, _rev: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Shape(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Shape(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetShape(&mut self, _shape: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetShape(&mut self, _shape: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,51 +27,51 @@ impl HTMLAppletElement {
|
|||
}
|
||||
|
||||
impl HTMLAppletElement {
|
||||
pub fn Align(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Align(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetAlign(&mut self, _align: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetAlign(&mut self, _align: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Alt(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Alt(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetAlt(&self, _alt: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetAlt(&self, _alt: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Archive(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Archive(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetArchive(&self, _archive: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetArchive(&self, _archive: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Code(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Code(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetCode(&self, _code: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetCode(&self, _code: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn CodeBase(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn CodeBase(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetCodeBase(&self, _code_base: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetCodeBase(&self, _code_base: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Height(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Height(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetHeight(&self, _height: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetHeight(&self, _height: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -83,19 +83,19 @@ impl HTMLAppletElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Name(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Name(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetName(&mut self, _name: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Object(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Object(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetObject(&mut self, _object: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetObject(&mut self, _object: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -107,11 +107,11 @@ impl HTMLAppletElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Width(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Width(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetWidth(&mut self, _width: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetWidth(&mut self, _width: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,59 +27,59 @@ impl HTMLAreaElement {
|
|||
}
|
||||
|
||||
impl HTMLAreaElement {
|
||||
pub fn Alt(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Alt(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetAlt(&self, _alt: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetAlt(&self, _alt: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Coords(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Coords(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetCoords(&self, _coords: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetCoords(&self, _coords: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Shape(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Shape(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetShape(&self, _shape: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetShape(&self, _shape: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Href(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Href(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetHref(&self, _href: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetHref(&self, _href: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Target(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Target(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetTarget(&self, _target: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetTarget(&self, _target: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Download(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Download(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetDownload(&self, _download: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetDownload(&self, _download: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Ping(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Ping(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetPing(&self, _ping: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetPing(&self, _ping: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
@ -27,19 +27,19 @@ impl HTMLBaseElement {
|
|||
}
|
||||
|
||||
impl HTMLBaseElement {
|
||||
pub fn Href(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Href(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetHref(&self, _href: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetHref(&self, _href: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Target(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Target(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetTarget(&self, _target: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetTarget(&self, _target: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,51 +27,51 @@ impl HTMLBodyElement {
|
|||
}
|
||||
|
||||
impl HTMLBodyElement {
|
||||
pub fn Text(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Text(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetText(&mut self, _text: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetText(&mut self, _text: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Link(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Link(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetLink(&self, _link: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetLink(&self, _link: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn VLink(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn VLink(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetVLink(&self, _v_link: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetVLink(&self, _v_link: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn ALink(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn ALink(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetALink(&self, _a_link: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetALink(&self, _a_link: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn BgColor(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn BgColor(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetBgColor(&self, _bg_color: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetBgColor(&self, _bg_color: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Background(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Background(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetBackground(&self, _background: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetBackground(&self, _background: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,11 +27,11 @@ impl HTMLBRElement {
|
|||
}
|
||||
|
||||
impl HTMLBRElement {
|
||||
pub fn Clear(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Clear(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetClear(&mut self, _text: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetClear(&mut self, _text: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,27 +48,27 @@ impl HTMLButtonElement {
|
|||
None
|
||||
}
|
||||
|
||||
pub fn FormAction(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn FormAction(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetFormAction(&mut self, _formaction: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetFormAction(&mut self, _formaction: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn FormEnctype(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn FormEnctype(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetFormEnctype(&mut self, _formenctype: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetFormEnctype(&mut self, _formenctype: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn FormMethod(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn FormMethod(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetFormMethod(&mut self, _formmethod: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetFormMethod(&mut self, _formmethod: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -80,35 +80,35 @@ impl HTMLButtonElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn FormTarget(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn FormTarget(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetFormTarget(&mut self, _formtarget: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetFormTarget(&mut self, _formtarget: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Name(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Name(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetName(&mut self, _name: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Type(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Type(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetType(&mut self, _type: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Value(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Value(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetValue(&mut self, _value: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetValue(&mut self, _value: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -127,11 +127,11 @@ impl HTMLButtonElement {
|
|||
pub fn SetValidity(&mut self, _validity: @mut ValidityState) {
|
||||
}
|
||||
|
||||
pub fn ValidationMessage(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn ValidationMessage(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetValidationMessage(&mut self, _message: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetValidationMessage(&mut self, _message: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -139,6 +139,6 @@ impl HTMLButtonElement {
|
|||
true
|
||||
}
|
||||
|
||||
pub fn SetCustomValidity(&mut self, _error: &Option<DOMString>) {
|
||||
pub fn SetCustomValidity(&mut self, _error: &DOMString) {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ impl HTMLCollection {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn NamedItem(&self, _cx: *JSContext, _name: &Option<DOMString>) -> Fallible<*JSObject> {
|
||||
pub fn NamedItem(&self, _cx: *JSContext, _name: &DOMString) -> Fallible<*JSObject> {
|
||||
Ok(ptr::null())
|
||||
}
|
||||
|
||||
|
|
|
@ -27,11 +27,11 @@ impl HTMLDataElement {
|
|||
}
|
||||
|
||||
impl HTMLDataElement {
|
||||
pub fn Value(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Value(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetValue(&mut self, _value: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetValue(&mut self, _value: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,11 +27,11 @@ impl HTMLDivElement {
|
|||
}
|
||||
|
||||
impl HTMLDivElement {
|
||||
pub fn Align(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Align(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetAlign(&mut self, _align: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetAlign(&mut self, _align: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,11 +35,11 @@ impl HTMLDListElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Type(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Type(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetType(&mut self, _type: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,25 +28,25 @@ impl HTMLElement {
|
|||
}
|
||||
|
||||
impl HTMLElement {
|
||||
pub fn Title(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Title(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetTitle(&mut self, _title: &Option<DOMString>) {
|
||||
pub fn SetTitle(&mut self, _title: &DOMString) {
|
||||
}
|
||||
|
||||
pub fn Lang(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Lang(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetLang(&mut self, _lang: &Option<DOMString>) {
|
||||
pub fn SetLang(&mut self, _lang: &DOMString) {
|
||||
}
|
||||
|
||||
pub fn Dir(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Dir(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetDir(&mut self, _dir: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetDir(&mut self, _dir: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -85,16 +85,16 @@ impl HTMLElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn AccessKey(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn AccessKey(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetAccessKey(&self, _key: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetAccessKey(&self, _key: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn AccessKeyLabel(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn AccessKeyLabel(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn Draggable(&self) -> bool {
|
||||
|
@ -105,11 +105,11 @@ impl HTMLElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn ContentEditable(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn ContentEditable(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetContentEditable(&mut self, _val: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetContentEditable(&mut self, _val: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -125,11 +125,11 @@ impl HTMLElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn ClassName(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn ClassName(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetClassName(&self, _class: &Option<DOMString>) {
|
||||
pub fn SetClassName(&self, _class: &DOMString) {
|
||||
}
|
||||
|
||||
pub fn GetOffsetParent(&self) -> Option<AbstractNode<ScriptView>> {
|
||||
|
|
|
@ -27,51 +27,51 @@ impl HTMLEmbedElement {
|
|||
}
|
||||
|
||||
impl HTMLEmbedElement {
|
||||
pub fn Src(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Src(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetSrc(&mut self, _src: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetSrc(&mut self, _src: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Type(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Type(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetType(&mut self, _type: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Width(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Width(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetWidth(&mut self, _width: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetWidth(&mut self, _width: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Height(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Height(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetHeight(&mut self, _height: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetHeight(&mut self, _height: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Align(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Align(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetAlign(&mut self, _type: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetAlign(&mut self, _type: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Name(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Name(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetName(&mut self, _type: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetName(&mut self, _type: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
@ -41,16 +41,16 @@ impl HTMLFieldSetElement {
|
|||
None
|
||||
}
|
||||
|
||||
pub fn Name(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Name(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetName(&mut self, _name: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Type(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Type(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn Elements(&self) -> @mut HTMLCollection {
|
||||
|
@ -67,14 +67,14 @@ impl HTMLFieldSetElement {
|
|||
ValidityState::new(global)
|
||||
}
|
||||
|
||||
pub fn ValidationMessage(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn ValidationMessage(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn CheckValidity(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
pub fn SetCustomValidity(&mut self, _error: &Option<DOMString>) {
|
||||
pub fn SetCustomValidity(&mut self, _error: &DOMString) {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,27 +27,27 @@ impl HTMLFontElement {
|
|||
}
|
||||
|
||||
impl HTMLFontElement {
|
||||
pub fn Color(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Color(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetColor(&mut self, _color: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetColor(&mut self, _color: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Face(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Face(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetFace(&mut self, _face: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetFace(&mut self, _face: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Size(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Size(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetSize(&mut self, _size: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetSize(&mut self, _size: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,59 +28,59 @@ impl HTMLFormElement {
|
|||
}
|
||||
|
||||
impl HTMLFormElement {
|
||||
pub fn AcceptCharset(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn AcceptCharset(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetAcceptCharset(&mut self, _accept_charset: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetAcceptCharset(&mut self, _accept_charset: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Action(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Action(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetAction(&mut self, _action: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetAction(&mut self, _action: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Autocomplete(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Autocomplete(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetAutocomplete(&mut self, _autocomplete: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetAutocomplete(&mut self, _autocomplete: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Enctype(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Enctype(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetEnctype(&mut self, _enctype: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetEnctype(&mut self, _enctype: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Encoding(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Encoding(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetEncoding(&mut self, _encoding: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetEncoding(&mut self, _encoding: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Method(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Method(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetMethod(&mut self, _method: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetMethod(&mut self, _method: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Name(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Name(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetName(&mut self, _name: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -92,11 +92,11 @@ impl HTMLFormElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Target(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Target(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetTarget(&mut self, _target: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetTarget(&mut self, _target: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
@ -28,43 +28,43 @@ impl HTMLFrameElement {
|
|||
}
|
||||
|
||||
impl HTMLFrameElement {
|
||||
pub fn Name(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Name(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetName(&mut self, _name: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Scrolling(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Scrolling(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetScrolling(&mut self, _scrolling: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetScrolling(&mut self, _scrolling: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Src(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Src(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetSrc(&mut self, _src: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetSrc(&mut self, _src: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn FrameBorder(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn FrameBorder(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetFrameBorder(&mut self, _frameborder: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetFrameBorder(&mut self, _frameborder: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn LongDesc(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn LongDesc(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetLongDesc(&mut self, _longdesc: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetLongDesc(&mut self, _longdesc: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -84,19 +84,19 @@ impl HTMLFrameElement {
|
|||
None
|
||||
}
|
||||
|
||||
pub fn MarginHeight(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn MarginHeight(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetMarginHeight(&mut self, _height: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetMarginHeight(&mut self, _height: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn MarginWidth(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn MarginWidth(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetMarginWidth(&mut self, _height: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetMarginWidth(&mut self, _height: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,19 +27,19 @@ impl HTMLFrameSetElement {
|
|||
}
|
||||
|
||||
impl HTMLFrameSetElement {
|
||||
pub fn Cols(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Cols(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetCols(&mut self, _cols: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetCols(&mut self, _cols: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Rows(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Rows(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetRows(&mut self, _rows: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetRows(&mut self, _rows: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,10 +38,10 @@ impl HTMLHeadingElement {
|
|||
}
|
||||
|
||||
impl HTMLHeadingElement {
|
||||
pub fn Align(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Align(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetAlign(&mut self, _align: &Option<DOMString>) {
|
||||
pub fn SetAlign(&mut self, _align: &DOMString) {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,19 +27,19 @@ impl HTMLHRElement {
|
|||
}
|
||||
|
||||
impl HTMLHRElement {
|
||||
pub fn Align(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Align(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetAlign(&mut self, _align: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetAlign(&mut self, _align: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Color(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Color(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetColor(&mut self, _color: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetColor(&mut self, _color: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -51,19 +51,19 @@ impl HTMLHRElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Size(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Size(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetSize(&mut self, _size: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetSize(&mut self, _size: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Width(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Width(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetWidth(&mut self, _width: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetWidth(&mut self, _width: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,11 +27,11 @@ impl HTMLHtmlElement {
|
|||
}
|
||||
|
||||
impl HTMLHtmlElement {
|
||||
pub fn Version(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Version(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetVersion(&mut self, _version: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetVersion(&mut self, _version: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::codegen::HTMLIFrameElementBinding;
|
||||
use dom::bindings::utils::{DOMString, ErrorResult, null_str_as_empty};
|
||||
use dom::bindings::utils::{DOMString, ErrorResult};
|
||||
use dom::document::AbstractDocument;
|
||||
use dom::element::HTMLIframeElementTypeId;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
|
@ -77,44 +77,45 @@ impl HTMLIFrameElement {
|
|||
}
|
||||
|
||||
impl HTMLIFrameElement {
|
||||
pub fn Src(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Src(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetSrc(&mut self, _src: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetSrc(&mut self, _src: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Srcdoc(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Srcdoc(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetSrcdoc(&mut self, _srcdoc: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetSrcdoc(&mut self, _srcdoc: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Name(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Name(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetName(&mut self, _name: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Sandbox(&self, _abstract_self: AbstractNode<ScriptView>) -> Option<DOMString> {
|
||||
self.htmlelement.element.GetAttribute(&Some(~"sandbox"))
|
||||
pub fn Sandbox(&self, _abstract_self: AbstractNode<ScriptView>) -> DOMString {
|
||||
match self.htmlelement.element.GetAttribute(&~"sandbox") {
|
||||
Some(s) => s.to_owned(),
|
||||
None => ~"",
|
||||
}
|
||||
}
|
||||
|
||||
pub fn SetSandbox(&mut self, abstract_self: AbstractNode<ScriptView>, sandbox: &Option<DOMString>) {
|
||||
self.htmlelement.element.SetAttribute(abstract_self, &Some(~"sandbox"), sandbox);
|
||||
pub fn SetSandbox(&mut self, abstract_self: AbstractNode<ScriptView>, sandbox: &DOMString) {
|
||||
self.htmlelement.element.SetAttribute(abstract_self, &~"sandbox", sandbox);
|
||||
}
|
||||
|
||||
pub fn AfterSetAttr(&mut self, name: &Option<DOMString>, value: &Option<DOMString>) {
|
||||
let name = null_str_as_empty(name);
|
||||
if "sandbox" == name {
|
||||
pub fn AfterSetAttr(&mut self, name: &DOMString, value: &DOMString) {
|
||||
if "sandbox" == *name {
|
||||
let mut modes = AllowNothing as u8;
|
||||
let words = null_str_as_empty(value);
|
||||
for word in words.split_iter(' ') {
|
||||
for word in value.split_iter(' ') {
|
||||
modes |= match word.to_ascii_lower().as_slice() {
|
||||
"allow-same-origin" => AllowSameOrigin,
|
||||
"allow-forms" => AllowForms,
|
||||
|
@ -137,19 +138,19 @@ impl HTMLIFrameElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Width(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Width(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetWidth(&mut self, _width: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetWidth(&mut self, _width: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Height(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Height(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetHeight(&mut self, _height: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetHeight(&mut self, _height: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -161,51 +162,51 @@ impl HTMLIFrameElement {
|
|||
None
|
||||
}
|
||||
|
||||
pub fn Align(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Align(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetAlign(&mut self, _align: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetAlign(&mut self, _align: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Scrolling(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Scrolling(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetScrolling(&mut self, _scrolling: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetScrolling(&mut self, _scrolling: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn FrameBorder(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn FrameBorder(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetFrameBorder(&mut self, _frameborder: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetFrameBorder(&mut self, _frameborder: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn LongDesc(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn LongDesc(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetLongDesc(&mut self, _longdesc: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetLongDesc(&mut self, _longdesc: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn MarginHeight(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn MarginHeight(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetMarginHeight(&mut self, _marginheight: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetMarginHeight(&mut self, _marginheight: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn MarginWidth(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn MarginWidth(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetMarginWidth(&mut self, _marginwidth: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetMarginWidth(&mut self, _marginwidth: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::codegen::HTMLImageElementBinding;
|
||||
use dom::bindings::utils::{DOMString, ErrorResult, null_str_as_empty};
|
||||
use dom::bindings::utils::{DOMString, ErrorResult};
|
||||
use dom::document::AbstractDocument;
|
||||
use dom::element::HTMLImageElementTypeId;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
|
@ -57,9 +57,8 @@ impl HTMLImageElement {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn AfterSetAttr(&mut self, name: &Option<DOMString>, _value: &Option<DOMString>) {
|
||||
let name = null_str_as_empty(name);
|
||||
if "src" == name {
|
||||
pub fn AfterSetAttr(&mut self, name: &DOMString, _value: &DOMString) {
|
||||
if "src" == *name {
|
||||
let document = self.htmlelement.element.node.owner_doc();
|
||||
let window = document.document().window;
|
||||
let url = window.page.url.as_ref().map(|&(ref url, _)| url.clone());
|
||||
|
@ -67,41 +66,41 @@ impl HTMLImageElement {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn Alt(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Alt(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetAlt(&mut self, _alt: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetAlt(&mut self, _alt: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Src(&self, _abstract_self: AbstractNode<ScriptView>) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Src(&self, _abstract_self: AbstractNode<ScriptView>) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetSrc(&mut self,
|
||||
abstract_self: AbstractNode<ScriptView>,
|
||||
src: &Option<DOMString>) -> ErrorResult {
|
||||
src: &DOMString) -> ErrorResult {
|
||||
let node = &mut self.htmlelement.element;
|
||||
node.set_attr(abstract_self,
|
||||
&Some(~"src"),
|
||||
&Some(null_str_as_empty(src)));
|
||||
&Some(src.clone()));
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn CrossOrigin(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn CrossOrigin(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetCrossOrigin(&mut self, _cross_origin: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetCrossOrigin(&mut self, _cross_origin: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn UseMap(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn UseMap(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetUseMap(&mut self, _use_map: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetUseMap(&mut self, _use_map: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -167,19 +166,19 @@ impl HTMLImageElement {
|
|||
false
|
||||
}
|
||||
|
||||
pub fn Name(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Name(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetName(&mut self, _name: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Align(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Align(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetAlign(&mut self, _align: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetAlign(&mut self, _align: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -199,19 +198,19 @@ impl HTMLImageElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn LongDesc(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn LongDesc(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetLongDesc(&mut self, _longdesc: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetLongDesc(&mut self, _longdesc: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Border(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Border(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetBorder(&mut self, _border: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetBorder(&mut self, _border: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,27 +27,27 @@ impl HTMLInputElement {
|
|||
}
|
||||
|
||||
impl HTMLInputElement {
|
||||
pub fn Accept(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Accept(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetAccept(&mut self, _accept: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetAccept(&mut self, _accept: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Alt(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Alt(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetAlt(&mut self, _alt: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetAlt(&mut self, _alt: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Autocomplete(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Autocomplete(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetAutocomplete(&mut self, _autocomple: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetAutocomplete(&mut self, _autocomple: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -82,27 +82,27 @@ impl HTMLInputElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn FormAction(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn FormAction(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetFormAction(&mut self, _form_action: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetFormAction(&mut self, _form_action: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn FormEnctype(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn FormEnctype(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetFormEnctype(&mut self, _form_enctype: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetFormEnctype(&mut self, _form_enctype: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn FormMethod(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn FormMethod(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetFormMethod(&mut self, _form_method: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetFormMethod(&mut self, _form_method: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -114,11 +114,11 @@ impl HTMLInputElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn FormTarget(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn FormTarget(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetFormTarget(&mut self, _form_target: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetFormTarget(&mut self, _form_target: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -137,19 +137,19 @@ impl HTMLInputElement {
|
|||
pub fn SetIndeterminate(&mut self, _indeterminate: bool) {
|
||||
}
|
||||
|
||||
pub fn InputMode(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn InputMode(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetInputMode(&mut self, _input_mode: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetInputMode(&mut self, _input_mode: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Max(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Max(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetMax(&mut self, _max: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetMax(&mut self, _max: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -161,11 +161,11 @@ impl HTMLInputElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Min(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Min(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetMin(&mut self, _min: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetMin(&mut self, _min: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -177,27 +177,27 @@ impl HTMLInputElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Name(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Name(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetName(&mut self, _name: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Pattern(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Pattern(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetPattern(&mut self, _pattern: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetPattern(&mut self, _pattern: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Placeholder(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Placeholder(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetPlaceholder(&mut self, _placeholder: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetPlaceholder(&mut self, _placeholder: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -225,43 +225,43 @@ impl HTMLInputElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Src(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Src(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetSrc(&mut self, _src: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetSrc(&mut self, _src: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Step(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Step(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetStep(&mut self, _step: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetStep(&mut self, _step: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Type(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Type(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetType(&mut self, _type: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn DefaultValue(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn DefaultValue(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetDefaultValue(&mut self, _default_value: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetDefaultValue(&mut self, _default_value: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Value(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Value(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetValue(&mut self, _value: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetValue(&mut self, _value: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -279,15 +279,15 @@ impl HTMLInputElement {
|
|||
pub fn SetWillValidate(&self, _will_validate: bool) {
|
||||
}
|
||||
|
||||
pub fn GetValidationMessage(&self) -> Fallible<Option<DOMString>> {
|
||||
Ok(None)
|
||||
pub fn GetValidationMessage(&self) -> Fallible<DOMString> {
|
||||
Ok(~"")
|
||||
}
|
||||
|
||||
pub fn CheckValidity(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
pub fn SetCustomValidity(&self, _error: &Option<DOMString>) {
|
||||
pub fn SetCustomValidity(&self, _error: &DOMString) {
|
||||
}
|
||||
|
||||
pub fn Select(&self) {
|
||||
|
@ -309,27 +309,27 @@ impl HTMLInputElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn GetSelectionDirection(&self) -> Fallible<Option<DOMString>> {
|
||||
Ok(None)
|
||||
pub fn GetSelectionDirection(&self) -> Fallible<DOMString> {
|
||||
Ok(~"")
|
||||
}
|
||||
|
||||
pub fn SetSelectionDirection(&mut self, _selection_direction: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetSelectionDirection(&mut self, _selection_direction: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Align(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Align(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetAlign(&mut self, _align: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetAlign(&mut self, _align: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn UseMap(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn UseMap(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetUseMap(&mut self, _align: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetUseMap(&mut self, _align: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,10 +27,10 @@ impl HTMLLabelElement {
|
|||
}
|
||||
|
||||
impl HTMLLabelElement {
|
||||
pub fn HtmlFor(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn HtmlFor(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetHtmlFor(&mut self, _html_for: &Option<DOMString>) {
|
||||
pub fn SetHtmlFor(&mut self, _html_for: &DOMString) {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,11 +27,11 @@ impl HTMLLegendElement {
|
|||
}
|
||||
|
||||
impl HTMLLegendElement {
|
||||
pub fn Align(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Align(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetAlign(&mut self, _align: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetAlign(&mut self, _align: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,11 +35,11 @@ impl HTMLLIElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Type(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Type(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetType(&mut self, _type: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,75 +34,75 @@ impl HTMLLinkElement {
|
|||
pub fn SetDisabled(&mut self, _disable: bool) {
|
||||
}
|
||||
|
||||
pub fn Href(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Href(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetHref(&mut self, _href: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetHref(&mut self, _href: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn CrossOrigin(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn CrossOrigin(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetCrossOrigin(&mut self, _cross_origin: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetCrossOrigin(&mut self, _cross_origin: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Rel(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Rel(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetRel(&mut self, _rel: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetRel(&mut self, _rel: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Media(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Media(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetMedia(&mut self, _media: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetMedia(&mut self, _media: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Hreflang(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Hreflang(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetHreflang(&mut self, _href: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetHreflang(&mut self, _href: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Type(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Type(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetType(&mut self, _type: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Charset(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Charset(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetCharset(&mut self, _charset: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetCharset(&mut self, _charset: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Rev(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Rev(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetRev(&mut self, _rev: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetRev(&mut self, _rev: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Target(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Target(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetTarget(&mut self, _target: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetTarget(&mut self, _target: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,11 +28,11 @@ impl HTMLMapElement {
|
|||
}
|
||||
|
||||
impl HTMLMapElement {
|
||||
pub fn Name(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Name(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetName(&mut self, _name: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
@ -20,39 +20,39 @@ impl HTMLMediaElement {
|
|||
}
|
||||
|
||||
impl HTMLMediaElement {
|
||||
pub fn Src(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Src(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetSrc(&mut self, _src: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetSrc(&mut self, _src: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn CurrentSrc(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn CurrentSrc(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn CrossOrigin(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn CrossOrigin(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetCrossOrigin(&mut self, _cross_origin: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetCrossOrigin(&mut self, _cross_origin: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Preload(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Preload(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetPreload(&mut self, _preload: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetPreload(&mut self, _preload: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Load(&self) {
|
||||
}
|
||||
|
||||
pub fn CanPlayType(&self, _type: &Option<DOMString>) -> Option<DOMString> {
|
||||
None
|
||||
pub fn CanPlayType(&self, _type: &DOMString) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn ReadyState(&self) -> u16 {
|
||||
|
|
|
@ -27,35 +27,35 @@ impl HTMLMetaElement {
|
|||
}
|
||||
|
||||
impl HTMLMetaElement {
|
||||
pub fn Name(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Name(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetName(&mut self, _name: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn HttpEquiv(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn HttpEquiv(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetHttpEquiv(&mut self, _http_equiv: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetHttpEquiv(&mut self, _http_equiv: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Content(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Content(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetContent(&mut self, _content: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetContent(&mut self, _content: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Scheme(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Scheme(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetScheme(&mut self, _scheme: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetScheme(&mut self, _scheme: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,19 +27,19 @@ impl HTMLModElement {
|
|||
}
|
||||
|
||||
impl HTMLModElement {
|
||||
pub fn Cite(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Cite(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetCite(&mut self, _cite: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetCite(&mut self, _cite: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn DateTime(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn DateTime(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetDateTime(&mut self, _datetime: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetDateTime(&mut self, _datetime: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,35 +29,35 @@ impl HTMLObjectElement {
|
|||
}
|
||||
|
||||
impl HTMLObjectElement {
|
||||
pub fn Data(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Data(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetData(&mut self, _data: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetData(&mut self, _data: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Type(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Type(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetType(&mut self, _type: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Name(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Name(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetName(&mut self, _name: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn UseMap(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn UseMap(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetUseMap(&mut self, _use_map: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetUseMap(&mut self, _use_map: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -65,19 +65,19 @@ impl HTMLObjectElement {
|
|||
None
|
||||
}
|
||||
|
||||
pub fn Width(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Width(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetWidth(&mut self, _width: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetWidth(&mut self, _width: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Height(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Height(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetHeight(&mut self, _height: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetHeight(&mut self, _height: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -98,38 +98,38 @@ impl HTMLObjectElement {
|
|||
ValidityState::new(global)
|
||||
}
|
||||
|
||||
pub fn ValidationMessage(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn ValidationMessage(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn CheckValidity(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
pub fn SetCustomValidity(&mut self, _error: &Option<DOMString>) {
|
||||
pub fn SetCustomValidity(&mut self, _error: &DOMString) {
|
||||
}
|
||||
|
||||
pub fn Align(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Align(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetAlign(&mut self, _align: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetAlign(&mut self, _align: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Archive(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Archive(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetArchive(&mut self, _archive: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetArchive(&mut self, _archive: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Code(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Code(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetCode(&mut self, _code: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetCode(&mut self, _code: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -149,11 +149,11 @@ impl HTMLObjectElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Standby(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Standby(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetStandby(&mut self, _standby: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetStandby(&mut self, _standby: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -165,27 +165,27 @@ impl HTMLObjectElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn CodeBase(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn CodeBase(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetCodeBase(&mut self, _codebase: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetCodeBase(&mut self, _codebase: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn CodeType(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn CodeType(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetCodeType(&mut self, _codetype: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetCodeType(&mut self, _codetype: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Border(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Border(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetBorder(&mut self, _border: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetBorder(&mut self, _border: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
@ -43,11 +43,11 @@ impl HTMLOListElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Type(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Type(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetType(&mut self, _type: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
@ -35,11 +35,11 @@ impl HTMLOptGroupElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Label(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Label(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetLabel(&mut self, _label: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetLabel(&mut self, _label: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,11 +39,11 @@ impl HTMLOptionElement {
|
|||
None
|
||||
}
|
||||
|
||||
pub fn Label(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Label(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetLabel(&mut self, _label: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetLabel(&mut self, _label: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -63,19 +63,19 @@ impl HTMLOptionElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Value(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Value(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetValue(&mut self, _value: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetValue(&mut self, _value: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Text(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Text(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetText(&mut self, _text: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetText(&mut self, _text: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
@ -32,31 +32,31 @@ impl HTMLOutputElement {
|
|||
None
|
||||
}
|
||||
|
||||
pub fn Name(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Name(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetName(&mut self, _name: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Type(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Type(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn DefaultValue(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn DefaultValue(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetDefaultValue(&mut self, _value: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetDefaultValue(&mut self, _value: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Value(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Value(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetValue(&mut self, _value: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetValue(&mut self, _value: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -75,11 +75,11 @@ impl HTMLOutputElement {
|
|||
pub fn SetValidity(&mut self, _validity: @mut ValidityState) {
|
||||
}
|
||||
|
||||
pub fn ValidationMessage(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn ValidationMessage(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetValidationMessage(&mut self, _message: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetValidationMessage(&mut self, _message: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -87,6 +87,6 @@ impl HTMLOutputElement {
|
|||
true
|
||||
}
|
||||
|
||||
pub fn SetCustomValidity(&mut self, _error: &Option<DOMString>) {
|
||||
pub fn SetCustomValidity(&mut self, _error: &DOMString) {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,11 +27,11 @@ impl HTMLParagraphElement {
|
|||
}
|
||||
|
||||
impl HTMLParagraphElement {
|
||||
pub fn Align(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Align(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetAlign(&mut self, _align: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetAlign(&mut self, _align: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,35 +27,35 @@ impl HTMLParamElement {
|
|||
}
|
||||
|
||||
impl HTMLParamElement {
|
||||
pub fn Name(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Name(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetName(&mut self, _name: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Value(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Value(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetValue(&mut self, _value: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetValue(&mut self, _value: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Type(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Type(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetType(&mut self, _type: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn ValueType(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn ValueType(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetValueType(&mut self, _value_type: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetValueType(&mut self, _value_type: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,11 +27,11 @@ impl HTMLQuoteElement {
|
|||
}
|
||||
|
||||
impl HTMLQuoteElement {
|
||||
pub fn Cite(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Cite(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetCite(&self, _cite: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetCite(&self, _cite: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,27 +28,30 @@ impl HTMLScriptElement {
|
|||
}
|
||||
|
||||
impl HTMLScriptElement {
|
||||
pub fn Src(&self) -> Option<DOMString> {
|
||||
self.htmlelement.element.get_attr("src").map(|s| s.to_str())
|
||||
pub fn Src(&self) -> DOMString {
|
||||
match self.htmlelement.element.get_attr("src") {
|
||||
Some(s) => s.to_owned(),
|
||||
None => ~""
|
||||
}
|
||||
}
|
||||
|
||||
pub fn SetSrc(&mut self, _src: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetSrc(&mut self, _src: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Type(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Type(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetType(&mut self, _type: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Charset(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Charset(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetCharset(&mut self, _charset: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetCharset(&mut self, _charset: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -68,35 +71,35 @@ impl HTMLScriptElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn CrossOrigin(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn CrossOrigin(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetCrossOrigin(&mut self, _cross_origin: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetCrossOrigin(&mut self, _cross_origin: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Text(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Text(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetText(&mut self, _text: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetText(&mut self, _text: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Event(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Event(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetEvent(&mut self, _event: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetEvent(&mut self, _event: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn HtmlFor(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn HtmlFor(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetHtmlFor(&mut self, _html_for: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetHtmlFor(&mut self, _html_for: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,11 +56,11 @@ impl HTMLSelectElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Name(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Name(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetName(&mut self, _name: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -80,8 +80,8 @@ impl HTMLSelectElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Type(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Type(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn Length(&self) -> u32 {
|
||||
|
@ -96,7 +96,7 @@ impl HTMLSelectElement {
|
|||
None
|
||||
}
|
||||
|
||||
pub fn NamedItem(&self, _name: &Option<DOMString>) -> Option<AbstractNode<ScriptView>> {
|
||||
pub fn NamedItem(&self, _name: &DOMString) -> Option<AbstractNode<ScriptView>> {
|
||||
None
|
||||
}
|
||||
|
||||
|
@ -122,11 +122,11 @@ impl HTMLSelectElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Value(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Value(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetValue(&mut self, _value: &Option<DOMString>) {
|
||||
pub fn SetValue(&mut self, _value: &DOMString) {
|
||||
}
|
||||
|
||||
pub fn WillValidate(&self) -> bool {
|
||||
|
@ -144,11 +144,11 @@ impl HTMLSelectElement {
|
|||
pub fn SetValidity(&mut self, _validity: @mut ValidityState) {
|
||||
}
|
||||
|
||||
pub fn ValidationMessage(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn ValidationMessage(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetValidationMessage(&mut self, _message: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetValidationMessage(&mut self, _message: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -156,6 +156,6 @@ impl HTMLSelectElement {
|
|||
true
|
||||
}
|
||||
|
||||
pub fn SetCustomValidity(&mut self, _error: &Option<DOMString>) {
|
||||
pub fn SetCustomValidity(&mut self, _error: &DOMString) {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,27 +27,27 @@ impl HTMLSourceElement {
|
|||
}
|
||||
|
||||
impl HTMLSourceElement {
|
||||
pub fn Src(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Src(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetSrc(&mut self, _src: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetSrc(&mut self, _src: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Type(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Type(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetType(&mut self, _type: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Media(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Media(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetMedia(&mut self, _media: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetMedia(&mut self, _media: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,19 +34,19 @@ impl HTMLStyleElement {
|
|||
pub fn SetDisabled(&self, _disabled: bool) {
|
||||
}
|
||||
|
||||
pub fn Media(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Media(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetMedia(&mut self, _media: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetMedia(&mut self, _media: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Type(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Type(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetType(&mut self, _type: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
@ -27,11 +27,11 @@ impl HTMLTableCaptionElement {
|
|||
}
|
||||
|
||||
impl HTMLTableCaptionElement {
|
||||
pub fn Align(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Align(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetAlign(&mut self, _align: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetAlign(&mut self, _align: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,11 +36,11 @@ impl HTMLTableCellElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Headers(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Headers(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetHeaders(&self, _headers: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetHeaders(&self, _headers: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -52,67 +52,67 @@ impl HTMLTableCellElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Abbr(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Abbr(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetAbbr(&self, _abbr: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetAbbr(&self, _abbr: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Scope(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Scope(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetScope(&self, _abbr: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetScope(&self, _abbr: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Align(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Align(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetAlign(&self, _align: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetAlign(&self, _align: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Axis(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Axis(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetAxis(&self, _axis: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetAxis(&self, _axis: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Height(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Height(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetHeight(&self, _height: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetHeight(&self, _height: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Width(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Width(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetWidth(&self, _width: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetWidth(&self, _width: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Ch(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Ch(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetCh(&self, _ch: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetCh(&self, _ch: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn ChOff(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn ChOff(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetChOff(&self, _ch_off: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetChOff(&self, _ch_off: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -124,19 +124,19 @@ impl HTMLTableCellElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn VAlign(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn VAlign(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetVAlign(&self, _valign: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetVAlign(&self, _valign: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn BgColor(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn BgColor(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetBgColor(&self, _bg_color: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetBgColor(&self, _bg_color: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,43 +35,43 @@ impl HTMLTableColElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Align(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Align(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetAlign(&mut self, _align: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetAlign(&mut self, _align: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Ch(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Ch(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetCh(&mut self, _ch: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetCh(&mut self, _ch: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn ChOff(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn ChOff(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetChOff(&mut self, _ch_off: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetChOff(&mut self, _ch_off: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn VAlign(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn VAlign(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetVAlign(&mut self, _v_align: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetVAlign(&mut self, _v_align: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Width(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Width(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetWidth(&mut self, _width: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetWidth(&mut self, _width: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,75 +50,75 @@ impl HTMLTableElement {
|
|||
pub fn StopSorting(&self) {
|
||||
}
|
||||
|
||||
pub fn Align(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Align(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetAlign(&self, _align: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetAlign(&self, _align: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Border(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Border(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetBorder(&self, _border: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetBorder(&self, _border: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Frame(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Frame(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetFrame(&self, _frame: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetFrame(&self, _frame: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Rules(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Rules(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetRules(&self, _rules: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetRules(&self, _rules: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Summary(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Summary(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetSummary(&self, _summary: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetSummary(&self, _summary: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Width(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Width(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetWidth(&self, _width: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetWidth(&self, _width: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn BgColor(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn BgColor(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetBgColor(&self, _bg_color: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetBgColor(&self, _bg_color: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn CellPadding(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn CellPadding(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetCellPadding(&self, _cell_padding: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetCellPadding(&self, _cell_padding: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn CellSpacing(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn CellSpacing(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetCellSpacing(&self, _cell_spacing: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetCellSpacing(&self, _cell_spacing: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,43 +47,43 @@ impl HTMLTableRowElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Align(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Align(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetAlign(&self, _align: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetAlign(&self, _align: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Ch(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Ch(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetCh(&self, _ch: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetCh(&self, _ch: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn ChOff(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn ChOff(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetChOff(&self, _ch_off: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetChOff(&self, _ch_off: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn VAlign(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn VAlign(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetVAlign(&self, _v_align: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetVAlign(&self, _v_align: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn BgColor(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn BgColor(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetBgColor(&self, _bg_color: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetBgColor(&self, _bg_color: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,35 +31,35 @@ impl HTMLTableSectionElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Align(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Align(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetAlign(&mut self, _align: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetAlign(&mut self, _align: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Ch(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Ch(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetCh(&mut self, _ch: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetCh(&mut self, _ch: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn ChOff(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn ChOff(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetChOff(&mut self, _ch_off: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetChOff(&mut self, _ch_off: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn VAlign(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn VAlign(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetVAlign(&mut self, _v_align: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetVAlign(&mut self, _v_align: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,19 +59,19 @@ impl HTMLTextAreaElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Name(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Name(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetName(&mut self, _name: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Placeholder(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Placeholder(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetPlaceholder(&mut self, _placeholder: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetPlaceholder(&mut self, _placeholder: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -99,34 +99,34 @@ impl HTMLTextAreaElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Wrap(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Wrap(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetWrap(&mut self, _wrap: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetWrap(&mut self, _wrap: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Type(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Type(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetType(&mut self, _type: &Option<DOMString>) {
|
||||
pub fn SetType(&mut self, _type: &DOMString) {
|
||||
}
|
||||
|
||||
pub fn DefaultValue(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn DefaultValue(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetDefaultValue(&mut self, _default_value: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetDefaultValue(&mut self, _default_value: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Value(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Value(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetValue(&mut self, _value: &Option<DOMString>) {
|
||||
pub fn SetValue(&mut self, _value: &DOMString) {
|
||||
}
|
||||
|
||||
pub fn TextLength(&self) -> u32 {
|
||||
|
@ -145,15 +145,15 @@ impl HTMLTextAreaElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn ValidationMessage(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn ValidationMessage(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn CheckValidity(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
pub fn SetCustomValidity(&self, _error: &Option<DOMString>) {
|
||||
pub fn SetCustomValidity(&self, _error: &DOMString) {
|
||||
}
|
||||
|
||||
pub fn Select(&self) {
|
||||
|
@ -175,14 +175,14 @@ impl HTMLTextAreaElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn GetSelectionDirection(&self) -> Fallible<Option<DOMString>> {
|
||||
Ok(None)
|
||||
pub fn GetSelectionDirection(&self) -> Fallible<DOMString> {
|
||||
Ok(~"")
|
||||
}
|
||||
|
||||
pub fn SetSelectionDirection(&self, _selection_direction: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetSelectionDirection(&self, _selection_direction: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn SetRangeText(&self, _replacement: &Option<DOMString>) {
|
||||
pub fn SetRangeText(&self, _replacement: &DOMString) {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,11 +27,11 @@ impl HTMLTimeElement {
|
|||
}
|
||||
|
||||
impl HTMLTimeElement {
|
||||
pub fn DateTime(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn DateTime(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetDateTime(&mut self, _dateTime: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetDateTime(&mut self, _dateTime: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,11 +27,11 @@ impl HTMLTitleElement {
|
|||
}
|
||||
|
||||
impl HTMLTitleElement {
|
||||
pub fn Text(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Text(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetText(&mut self, _text: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetText(&mut self, _text: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,35 +27,35 @@ impl HTMLTrackElement {
|
|||
}
|
||||
|
||||
impl HTMLTrackElement {
|
||||
pub fn Kind(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Kind(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetKind(&mut self, _kind: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetKind(&mut self, _kind: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Src(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Src(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetSrc(&mut self, _src: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetSrc(&mut self, _src: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Srclang(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Srclang(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetSrclang(&mut self, _srclang: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetSrclang(&mut self, _srclang: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Label(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Label(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetLabel(&mut self, _label: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetLabel(&mut self, _label: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
@ -35,11 +35,11 @@ impl HTMLUListElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Type(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Type(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetType(&mut self, _type: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,11 +51,11 @@ impl HTMLVideoElement {
|
|||
0
|
||||
}
|
||||
|
||||
pub fn Poster(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Poster(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetPoster(&mut self, _poster: &Option<DOMString>) -> ErrorResult {
|
||||
pub fn SetPoster(&mut self, _poster: &DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ impl MouseEvent {
|
|||
}
|
||||
|
||||
pub fn Constructor(owner: @mut Window,
|
||||
type_: &Option<DOMString>,
|
||||
type_: &DOMString,
|
||||
init: &MouseEventBinding::MouseEventInit) -> Fallible<AbstractEvent> {
|
||||
let ev = MouseEvent::new(owner);
|
||||
ev.mut_mouseevent().InitMouseEvent(type_, init.bubbles, init.cancelable, init.view,
|
||||
|
@ -105,13 +105,13 @@ impl MouseEvent {
|
|||
self.related_target
|
||||
}
|
||||
|
||||
pub fn GetModifierState(&self, _keyArg: &Option<DOMString>) -> bool {
|
||||
pub fn GetModifierState(&self, _keyArg: &DOMString) -> bool {
|
||||
//TODO
|
||||
false
|
||||
}
|
||||
|
||||
pub fn InitMouseEvent(&mut self,
|
||||
typeArg: &Option<DOMString>,
|
||||
typeArg: &DOMString,
|
||||
canBubbleArg: bool,
|
||||
cancelableArg: bool,
|
||||
viewArg: Option<@mut WindowProxy>,
|
||||
|
|
|
@ -22,32 +22,32 @@ impl Navigator {
|
|||
reflect_dom_object(@mut Navigator::new_inherited(), window, NavigatorBinding::Wrap)
|
||||
}
|
||||
|
||||
pub fn DoNotTrack(&self) -> Option<DOMString> {
|
||||
Some(~"unspecified")
|
||||
pub fn DoNotTrack(&self) -> DOMString {
|
||||
~"unspecified"
|
||||
}
|
||||
|
||||
pub fn Vendor(&self) -> Option<DOMString> {
|
||||
Some(~"") // Like Gecko
|
||||
pub fn Vendor(&self) -> DOMString {
|
||||
~"" // Like Gecko
|
||||
}
|
||||
|
||||
pub fn VendorSub(&self) -> Option<DOMString> {
|
||||
Some(~"") // Like Gecko
|
||||
pub fn VendorSub(&self) -> DOMString {
|
||||
~"" // Like Gecko
|
||||
}
|
||||
|
||||
pub fn Product(&self) -> Option<DOMString> {
|
||||
Some(~"Gecko") // This is supposed to be constant, see webidl.
|
||||
pub fn Product(&self) -> DOMString {
|
||||
~"Gecko"
|
||||
}
|
||||
|
||||
pub fn ProductSub(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn ProductSub(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn CookieEnabled(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
pub fn GetBuildID(&self) -> Fallible<Option<DOMString>> {
|
||||
Ok(None)
|
||||
pub fn GetBuildID(&self) -> Fallible<DOMString> {
|
||||
Ok(~"")
|
||||
}
|
||||
|
||||
pub fn JavaEnabled(&self) -> Fallible<bool> {
|
||||
|
@ -58,24 +58,24 @@ impl Navigator {
|
|||
false
|
||||
}
|
||||
|
||||
pub fn AppName(&self) -> Option<DOMString> {
|
||||
Some(~"Netscape") // Like Gecko/Webkit
|
||||
pub fn AppName(&self) -> DOMString {
|
||||
~"Netscape" // Like Gecko/Webkit
|
||||
}
|
||||
|
||||
pub fn GetAppCodeName(&self) -> Fallible<Option<DOMString>> {
|
||||
Ok(Some(~"Mozilla")) // Like Gecko/Webkit
|
||||
pub fn GetAppCodeName(&self) -> Fallible<DOMString> {
|
||||
Ok(~"Mozilla") // Like Gecko/Webkit
|
||||
}
|
||||
|
||||
pub fn GetAppVersion(&self) -> Fallible<Option<DOMString>> {
|
||||
Ok(None)
|
||||
pub fn GetAppVersion(&self) -> Fallible<DOMString> {
|
||||
Ok(~"")
|
||||
}
|
||||
|
||||
pub fn GetPlatform(&self) -> Fallible<Option<DOMString>> {
|
||||
Ok(None)
|
||||
pub fn GetPlatform(&self) -> Fallible<DOMString> {
|
||||
Ok(~"")
|
||||
}
|
||||
|
||||
pub fn GetUserAgent(&self) -> Fallible<Option<DOMString>> {
|
||||
Ok(None)
|
||||
pub fn GetUserAgent(&self) -> Fallible<DOMString> {
|
||||
Ok(~"")
|
||||
}
|
||||
|
||||
pub fn GetLanguage(&self) -> Option<DOMString> {
|
||||
|
|
|
@ -561,11 +561,11 @@ impl Node<ScriptView> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn NodeName(&self, abstract_self: AbstractNode<ScriptView>) -> Option<DOMString> {
|
||||
Some(match self.type_id {
|
||||
pub fn NodeName(&self, abstract_self: AbstractNode<ScriptView>) -> DOMString {
|
||||
match self.type_id {
|
||||
ElementNodeTypeId(*) => {
|
||||
do abstract_self.with_imm_element |element| {
|
||||
element.TagName().expect("tagName should never be null")
|
||||
element.TagName()
|
||||
}
|
||||
}
|
||||
CommentNodeTypeId => ~"#comment",
|
||||
|
@ -577,7 +577,7 @@ impl Node<ScriptView> {
|
|||
},
|
||||
DocumentFragmentNodeTypeId => ~"#document-fragment",
|
||||
DocumentNodeTypeId(_) => ~"#document"
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
pub fn GetBaseURI(&self) -> Option<DOMString> {
|
||||
|
@ -628,7 +628,7 @@ impl Node<ScriptView> {
|
|||
// ProcessingInstruction
|
||||
CommentNodeTypeId | TextNodeTypeId => {
|
||||
do abstract_self.with_imm_characterdata() |characterdata| {
|
||||
characterdata.Data()
|
||||
Some(characterdata.Data())
|
||||
}
|
||||
}
|
||||
_ => {
|
||||
|
@ -648,8 +648,7 @@ impl Node<ScriptView> {
|
|||
for node in abstract_self.traverse_preorder() {
|
||||
if node.is_text() {
|
||||
do node.with_imm_text() |text| {
|
||||
let s = text.element.Data();
|
||||
content = content + null_str_as_empty(&s);
|
||||
content = content + text.element.Data();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -657,7 +656,7 @@ impl Node<ScriptView> {
|
|||
}
|
||||
CommentNodeTypeId | TextNodeTypeId => {
|
||||
do abstract_self.with_imm_characterdata() |characterdata| {
|
||||
characterdata.Data()
|
||||
Some(characterdata.Data())
|
||||
}
|
||||
}
|
||||
DoctypeNodeTypeId | DocumentNodeTypeId(_) => {
|
||||
|
@ -940,17 +939,14 @@ impl Node<ScriptView> {
|
|||
pub fn SetTextContent(&mut self,
|
||||
abstract_self: AbstractNode<ScriptView>,
|
||||
value: &Option<DOMString>) -> ErrorResult {
|
||||
let is_empty = match value {
|
||||
&Some(~"") | &None => true,
|
||||
_ => false
|
||||
};
|
||||
let value = null_str_as_empty(value);
|
||||
match self.type_id {
|
||||
DocumentFragmentNodeTypeId | ElementNodeTypeId(*) => {
|
||||
let node = if is_empty {
|
||||
let node = if value.len() == 0 {
|
||||
None
|
||||
} else {
|
||||
let document = self.owner_doc();
|
||||
Some(document.document().CreateTextNode(document, value))
|
||||
Some(document.document().CreateTextNode(document, &value))
|
||||
};
|
||||
self.replace_all(abstract_self, node);
|
||||
}
|
||||
|
@ -958,7 +954,7 @@ impl Node<ScriptView> {
|
|||
self.wait_until_safe_to_modify_dom();
|
||||
|
||||
do abstract_self.with_mut_characterdata() |characterdata| {
|
||||
characterdata.data = null_str_as_empty(value);
|
||||
characterdata.data = value.clone();
|
||||
|
||||
// Notify the document that the content of this node is different
|
||||
let document = self.owner_doc();
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::codegen::TextBinding;
|
||||
use dom::bindings::utils::{DOMString, Fallible, null_str_as_empty};
|
||||
use dom::bindings::utils::{DOMString, Fallible};
|
||||
use dom::characterdata::CharacterData;
|
||||
use dom::document::AbstractDocument;
|
||||
use dom::node::{AbstractNode, ScriptView, Node, TextNodeTypeId};
|
||||
|
@ -26,15 +26,15 @@ impl Text {
|
|||
Node::reflect_node(@mut node, document, TextBinding::Wrap)
|
||||
}
|
||||
|
||||
pub fn Constructor(owner: @mut Window, text: &Option<DOMString>) -> Fallible<AbstractNode<ScriptView>> {
|
||||
Ok(Text::new(null_str_as_empty(text), owner.Document()))
|
||||
pub fn Constructor(owner: @mut Window, text: &DOMString) -> Fallible<AbstractNode<ScriptView>> {
|
||||
Ok(Text::new(text.clone(), owner.Document()))
|
||||
}
|
||||
|
||||
pub fn SplitText(&self, _offset: u32) -> Fallible<AbstractNode<ScriptView>> {
|
||||
fail!("unimplemented")
|
||||
}
|
||||
|
||||
pub fn GetWholeText(&self) -> Fallible<Option<DOMString>> {
|
||||
Ok(None)
|
||||
pub fn GetWholeText(&self) -> Fallible<DOMString> {
|
||||
Ok(~"")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ impl UIEvent {
|
|||
}
|
||||
|
||||
pub fn Constructor(owner: @mut Window,
|
||||
type_: &Option<DOMString>,
|
||||
type_: &DOMString,
|
||||
init: &UIEventBinding::UIEventInit) -> Fallible<AbstractEvent> {
|
||||
let ev = UIEvent::new(owner, UIEventTypeId);
|
||||
ev.mut_uievent().InitUIEvent(type_, init.parent.bubbles, init.parent.cancelable,
|
||||
|
@ -50,7 +50,7 @@ impl UIEvent {
|
|||
}
|
||||
|
||||
pub fn InitUIEvent(&mut self,
|
||||
type_: &Option<DOMString>,
|
||||
type_: &DOMString,
|
||||
can_bubble: bool,
|
||||
cancelable: bool,
|
||||
view: Option<@mut WindowProxy>,
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::codegen::WindowBinding;
|
||||
use dom::bindings::utils::{Reflectable, Reflector};
|
||||
use dom::bindings::utils::{DOMString, null_str_as_empty, Traceable};
|
||||
use dom::bindings::utils::{Reflectable, Reflector, Traceable};
|
||||
use dom::bindings::utils::DOMString;
|
||||
use dom::document::AbstractDocument;
|
||||
use dom::eventtarget::{EventTarget, WindowTypeId};
|
||||
use dom::node::{AbstractNode, ScriptView};
|
||||
|
@ -72,9 +72,9 @@ pub struct TimerData {
|
|||
}
|
||||
|
||||
impl Window {
|
||||
pub fn Alert(&self, s: &Option<DOMString>) {
|
||||
pub fn Alert(&self, s: &DOMString) {
|
||||
// Right now, just print to the console
|
||||
println(format!("ALERT: {:s}", null_str_as_empty(s)));
|
||||
println(format!("ALERT: {:s}", *s));
|
||||
}
|
||||
|
||||
pub fn Close(&self) {
|
||||
|
@ -85,18 +85,18 @@ impl Window {
|
|||
self.page.frame.unwrap().document
|
||||
}
|
||||
|
||||
pub fn Name(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Name(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetName(&self, _name: &Option<DOMString>) {
|
||||
pub fn SetName(&self, _name: &DOMString) {
|
||||
}
|
||||
|
||||
pub fn Status(&self) -> Option<DOMString> {
|
||||
None
|
||||
pub fn Status(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetStatus(&self, _status: &Option<DOMString>) {
|
||||
pub fn SetStatus(&self, _status: &DOMString) {
|
||||
}
|
||||
|
||||
pub fn Closed(&self) -> bool {
|
||||
|
@ -123,18 +123,18 @@ impl Window {
|
|||
self.navigator.unwrap()
|
||||
}
|
||||
|
||||
pub fn Confirm(&self, _message: &Option<DOMString>) -> bool {
|
||||
pub fn Confirm(&self, _message: &DOMString) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
pub fn Prompt(&self, _message: &Option<DOMString>, _default: &Option<DOMString>) -> Option<DOMString> {
|
||||
pub fn Prompt(&self, _message: &DOMString, _default: &DOMString) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn Print(&self) {
|
||||
}
|
||||
|
||||
pub fn ShowModalDialog(&self, _cx: *JSContext, _url: &Option<DOMString>, _argument: JSVal) -> JSVal {
|
||||
pub fn ShowModalDialog(&self, _cx: *JSContext, _url: &DOMString, _argument: JSVal) -> JSVal {
|
||||
JSVAL_NULL
|
||||
}
|
||||
}
|
||||
|
|
|
@ -772,7 +772,7 @@ impl ScriptTask {
|
|||
// "load" event as soon as we've finished executing all scripts parsed during
|
||||
// the initial load.
|
||||
let event = Event::new(window, HTMLEventTypeId);
|
||||
event.mut_event().InitEvent(&Some(~"load"), false, false);
|
||||
event.mut_event().InitEvent(&~"load", false, false);
|
||||
let doctarget = AbstractEventTarget::from_document(document);
|
||||
let wintarget = AbstractEventTarget::from_window(window);
|
||||
window.eventtarget.dispatch_event_with_target(wintarget, Some(doctarget), event);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue