From 687722da2d2f63800d364326cf1e8a5ce5499830 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Wed, 11 Jun 2014 22:53:53 +0200 Subject: [PATCH] Pass immutable self to Node::{SetNodeValue, SetTextContent}. --- src/components/script/dom/node.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/components/script/dom/node.rs b/src/components/script/dom/node.rs index a3d2132f601..84bb0434e35 100644 --- a/src/components/script/dom/node.rs +++ b/src/components/script/dom/node.rs @@ -1349,9 +1349,9 @@ pub trait NodeMethods { fn GetPreviousSibling(&self) -> Option>; fn GetNextSibling(&self) -> Option>; fn GetNodeValue(&self) -> Option; - fn SetNodeValue(&mut self, val: Option) -> ErrorResult; + fn SetNodeValue(&self, val: Option) -> ErrorResult; fn GetTextContent(&self) -> Option; - fn SetTextContent(&mut self, value: Option) -> ErrorResult; + fn SetTextContent(&self, value: Option) -> ErrorResult; fn InsertBefore(&self, node: &JSRef, child: Option>) -> Fallible>; fn AppendChild(&self, node: &JSRef) -> Fallible>; fn ReplaceChild(&self, node: &JSRef, child: &JSRef) -> Fallible>; @@ -1493,8 +1493,7 @@ impl<'a> NodeMethods for JSRef<'a, Node> { } // http://dom.spec.whatwg.org/#dom-node-nodevalue - fn SetNodeValue(&mut self, val: Option) - -> ErrorResult { + fn SetNodeValue(&self, val: Option) -> ErrorResult { match self.type_id { CommentNodeTypeId | TextNodeTypeId | @@ -1533,8 +1532,7 @@ impl<'a> NodeMethods for JSRef<'a, Node> { } // http://dom.spec.whatwg.org/#dom-node-textcontent - fn SetTextContent(&mut self, value: Option) - -> ErrorResult { + fn SetTextContent(&self, value: Option) -> ErrorResult { let value = null_str_as_empty(&value); match self.type_id { DocumentFragmentNodeTypeId |