Remove needless '&mut self' from htmlobjectelement.rs.

This commit is contained in:
Tetsuharu OHZEKI 2014-05-31 01:53:00 +09:00
parent 1b956ad92e
commit 8ddee938b5

View file

@ -52,13 +52,13 @@ impl HTMLObjectElement {
} }
trait ProcessDataURL { trait ProcessDataURL {
fn process_data_url(&mut self, image_cache: ImageCacheTask, url: Option<Url>); fn process_data_url(&self, image_cache: ImageCacheTask, url: Option<Url>);
} }
impl<'a> ProcessDataURL for JSRef<'a, HTMLObjectElement> { impl<'a> ProcessDataURL for JSRef<'a, HTMLObjectElement> {
// Makes the local `data` member match the status of the `data` attribute and starts // Makes the local `data` member match the status of the `data` attribute and starts
/// prefetching the image. This method must be called after `data` is changed. /// prefetching the image. This method must be called after `data` is changed.
fn process_data_url(&mut self, image_cache: ImageCacheTask, url: Option<Url>) { fn process_data_url(&self, image_cache: ImageCacheTask, url: Option<Url>) {
let elem: &JSRef<Element> = ElementCast::from_ref(self); let elem: &JSRef<Element> = ElementCast::from_ref(self);
// TODO: support other values // TODO: support other values
@ -78,45 +78,45 @@ impl<'a> ProcessDataURL for JSRef<'a, HTMLObjectElement> {
pub trait HTMLObjectElementMethods { pub trait HTMLObjectElementMethods {
fn Data(&self) -> DOMString; fn Data(&self) -> DOMString;
fn SetData(&mut self, _data: DOMString) -> ErrorResult; fn SetData(&self, _data: DOMString) -> ErrorResult;
fn Type(&self) -> DOMString; fn Type(&self) -> DOMString;
fn SetType(&mut self, _type: DOMString) -> ErrorResult; fn SetType(&self, _type: DOMString) -> ErrorResult;
fn Name(&self) -> DOMString; fn Name(&self) -> DOMString;
fn SetName(&mut self, _name: DOMString) -> ErrorResult; fn SetName(&self, _name: DOMString) -> ErrorResult;
fn UseMap(&self) -> DOMString; fn UseMap(&self) -> DOMString;
fn SetUseMap(&mut self, _use_map: DOMString) -> ErrorResult; fn SetUseMap(&self, _use_map: DOMString) -> ErrorResult;
fn GetForm(&self) -> Option<Temporary<HTMLFormElement>>; fn GetForm(&self) -> Option<Temporary<HTMLFormElement>>;
fn Width(&self) -> DOMString; fn Width(&self) -> DOMString;
fn SetWidth(&mut self, _width: DOMString) -> ErrorResult; fn SetWidth(&self, _width: DOMString) -> ErrorResult;
fn Height(&self) -> DOMString; fn Height(&self) -> DOMString;
fn SetHeight(&mut self, _height: DOMString) -> ErrorResult; fn SetHeight(&self, _height: DOMString) -> ErrorResult;
fn GetContentDocument(&self) -> Option<Temporary<Document>>; fn GetContentDocument(&self) -> Option<Temporary<Document>>;
fn GetContentWindow(&self) -> Option<Temporary<Window>>; fn GetContentWindow(&self) -> Option<Temporary<Window>>;
fn WillValidate(&self) -> bool; fn WillValidate(&self) -> bool;
fn Validity(&self) -> Temporary<ValidityState>; fn Validity(&self) -> Temporary<ValidityState>;
fn ValidationMessage(&self) -> DOMString; fn ValidationMessage(&self) -> DOMString;
fn CheckValidity(&self) -> bool; fn CheckValidity(&self) -> bool;
fn SetCustomValidity(&mut self, _error: DOMString); fn SetCustomValidity(&self, _error: DOMString);
fn Align(&self) -> DOMString; fn Align(&self) -> DOMString;
fn SetAlign(&mut self, _align: DOMString) -> ErrorResult; fn SetAlign(&self, _align: DOMString) -> ErrorResult;
fn Archive(&self) -> DOMString; fn Archive(&self) -> DOMString;
fn SetArchive(&mut self, _archive: DOMString) -> ErrorResult; fn SetArchive(&self, _archive: DOMString) -> ErrorResult;
fn Code(&self) -> DOMString; fn Code(&self) -> DOMString;
fn SetCode(&mut self, _code: DOMString) -> ErrorResult; fn SetCode(&self, _code: DOMString) -> ErrorResult;
fn Declare(&self) -> bool; fn Declare(&self) -> bool;
fn SetDeclare(&mut self, _declare: bool) -> ErrorResult; fn SetDeclare(&self, _declare: bool) -> ErrorResult;
fn Hspace(&self) -> u32; fn Hspace(&self) -> u32;
fn SetHspace(&mut self, _hspace: u32) -> ErrorResult; fn SetHspace(&self, _hspace: u32) -> ErrorResult;
fn Standby(&self) -> DOMString; fn Standby(&self) -> DOMString;
fn SetStandby(&mut self, _standby: DOMString) -> ErrorResult; fn SetStandby(&self, _standby: DOMString) -> ErrorResult;
fn Vspace(&self) -> u32; fn Vspace(&self) -> u32;
fn SetVspace(&mut self, _vspace: u32) -> ErrorResult; fn SetVspace(&self, _vspace: u32) -> ErrorResult;
fn CodeBase(&self) -> DOMString; fn CodeBase(&self) -> DOMString;
fn SetCodeBase(&mut self, _codebase: DOMString) -> ErrorResult; fn SetCodeBase(&self, _codebase: DOMString) -> ErrorResult;
fn CodeType(&self) -> DOMString; fn CodeType(&self) -> DOMString;
fn SetCodeType(&mut self, _codetype: DOMString) -> ErrorResult; fn SetCodeType(&self, _codetype: DOMString) -> ErrorResult;
fn Border(&self) -> DOMString; fn Border(&self) -> DOMString;
fn SetBorder(&mut self, _border: DOMString) -> ErrorResult; fn SetBorder(&self, _border: DOMString) -> ErrorResult;
fn GetSVGDocument(&self) -> Option<Temporary<Document>>; fn GetSVGDocument(&self) -> Option<Temporary<Document>>;
} }
@ -125,7 +125,7 @@ impl<'a> HTMLObjectElementMethods for JSRef<'a, HTMLObjectElement> {
"".to_owned() "".to_owned()
} }
fn SetData(&mut self, _data: DOMString) -> ErrorResult { fn SetData(&self, _data: DOMString) -> ErrorResult {
Ok(()) Ok(())
} }
@ -133,7 +133,7 @@ impl<'a> HTMLObjectElementMethods for JSRef<'a, HTMLObjectElement> {
"".to_owned() "".to_owned()
} }
fn SetType(&mut self, _type: DOMString) -> ErrorResult { fn SetType(&self, _type: DOMString) -> ErrorResult {
Ok(()) Ok(())
} }
@ -141,7 +141,7 @@ impl<'a> HTMLObjectElementMethods for JSRef<'a, HTMLObjectElement> {
"".to_owned() "".to_owned()
} }
fn SetName(&mut self, _name: DOMString) -> ErrorResult { fn SetName(&self, _name: DOMString) -> ErrorResult {
Ok(()) Ok(())
} }
@ -149,7 +149,7 @@ impl<'a> HTMLObjectElementMethods for JSRef<'a, HTMLObjectElement> {
"".to_owned() "".to_owned()
} }
fn SetUseMap(&mut self, _use_map: DOMString) -> ErrorResult { fn SetUseMap(&self, _use_map: DOMString) -> ErrorResult {
Ok(()) Ok(())
} }
@ -161,7 +161,7 @@ impl<'a> HTMLObjectElementMethods for JSRef<'a, HTMLObjectElement> {
"".to_owned() "".to_owned()
} }
fn SetWidth(&mut self, _width: DOMString) -> ErrorResult { fn SetWidth(&self, _width: DOMString) -> ErrorResult {
Ok(()) Ok(())
} }
@ -169,7 +169,7 @@ impl<'a> HTMLObjectElementMethods for JSRef<'a, HTMLObjectElement> {
"".to_owned() "".to_owned()
} }
fn SetHeight(&mut self, _height: DOMString) -> ErrorResult { fn SetHeight(&self, _height: DOMString) -> ErrorResult {
Ok(()) Ok(())
} }
@ -198,14 +198,14 @@ impl<'a> HTMLObjectElementMethods for JSRef<'a, HTMLObjectElement> {
false false
} }
fn SetCustomValidity(&mut self, _error: DOMString) { fn SetCustomValidity(&self, _error: DOMString) {
} }
fn Align(&self) -> DOMString { fn Align(&self) -> DOMString {
"".to_owned() "".to_owned()
} }
fn SetAlign(&mut self, _align: DOMString) -> ErrorResult { fn SetAlign(&self, _align: DOMString) -> ErrorResult {
Ok(()) Ok(())
} }
@ -213,7 +213,7 @@ impl<'a> HTMLObjectElementMethods for JSRef<'a, HTMLObjectElement> {
"".to_owned() "".to_owned()
} }
fn SetArchive(&mut self, _archive: DOMString) -> ErrorResult { fn SetArchive(&self, _archive: DOMString) -> ErrorResult {
Ok(()) Ok(())
} }
@ -221,7 +221,7 @@ impl<'a> HTMLObjectElementMethods for JSRef<'a, HTMLObjectElement> {
"".to_owned() "".to_owned()
} }
fn SetCode(&mut self, _code: DOMString) -> ErrorResult { fn SetCode(&self, _code: DOMString) -> ErrorResult {
Ok(()) Ok(())
} }
@ -229,7 +229,7 @@ impl<'a> HTMLObjectElementMethods for JSRef<'a, HTMLObjectElement> {
false false
} }
fn SetDeclare(&mut self, _declare: bool) -> ErrorResult { fn SetDeclare(&self, _declare: bool) -> ErrorResult {
Ok(()) Ok(())
} }
@ -237,7 +237,7 @@ impl<'a> HTMLObjectElementMethods for JSRef<'a, HTMLObjectElement> {
0 0
} }
fn SetHspace(&mut self, _hspace: u32) -> ErrorResult { fn SetHspace(&self, _hspace: u32) -> ErrorResult {
Ok(()) Ok(())
} }
@ -245,7 +245,7 @@ impl<'a> HTMLObjectElementMethods for JSRef<'a, HTMLObjectElement> {
"".to_owned() "".to_owned()
} }
fn SetStandby(&mut self, _standby: DOMString) -> ErrorResult { fn SetStandby(&self, _standby: DOMString) -> ErrorResult {
Ok(()) Ok(())
} }
@ -253,7 +253,7 @@ impl<'a> HTMLObjectElementMethods for JSRef<'a, HTMLObjectElement> {
0 0
} }
fn SetVspace(&mut self, _vspace: u32) -> ErrorResult { fn SetVspace(&self, _vspace: u32) -> ErrorResult {
Ok(()) Ok(())
} }
@ -261,7 +261,7 @@ impl<'a> HTMLObjectElementMethods for JSRef<'a, HTMLObjectElement> {
"".to_owned() "".to_owned()
} }
fn SetCodeBase(&mut self, _codebase: DOMString) -> ErrorResult { fn SetCodeBase(&self, _codebase: DOMString) -> ErrorResult {
Ok(()) Ok(())
} }
@ -269,7 +269,7 @@ impl<'a> HTMLObjectElementMethods for JSRef<'a, HTMLObjectElement> {
"".to_owned() "".to_owned()
} }
fn SetCodeType(&mut self, _codetype: DOMString) -> ErrorResult { fn SetCodeType(&self, _codetype: DOMString) -> ErrorResult {
Ok(()) Ok(())
} }
@ -277,7 +277,7 @@ impl<'a> HTMLObjectElementMethods for JSRef<'a, HTMLObjectElement> {
"".to_owned() "".to_owned()
} }
fn SetBorder(&mut self, _border: DOMString) -> ErrorResult { fn SetBorder(&self, _border: DOMString) -> ErrorResult {
Ok(()) Ok(())
} }