mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Pass immutable self to Node::{SetNodeValue, SetTextContent}.
This commit is contained in:
parent
34c42f6acb
commit
687722da2d
1 changed files with 4 additions and 6 deletions
|
@ -1349,9 +1349,9 @@ pub trait NodeMethods {
|
|||
fn GetPreviousSibling(&self) -> Option<Temporary<Node>>;
|
||||
fn GetNextSibling(&self) -> Option<Temporary<Node>>;
|
||||
fn GetNodeValue(&self) -> Option<DOMString>;
|
||||
fn SetNodeValue(&mut self, val: Option<DOMString>) -> ErrorResult;
|
||||
fn SetNodeValue(&self, val: Option<DOMString>) -> ErrorResult;
|
||||
fn GetTextContent(&self) -> Option<DOMString>;
|
||||
fn SetTextContent(&mut self, value: Option<DOMString>) -> ErrorResult;
|
||||
fn SetTextContent(&self, value: Option<DOMString>) -> ErrorResult;
|
||||
fn InsertBefore(&self, node: &JSRef<Node>, child: Option<JSRef<Node>>) -> Fallible<Temporary<Node>>;
|
||||
fn AppendChild(&self, node: &JSRef<Node>) -> Fallible<Temporary<Node>>;
|
||||
fn ReplaceChild(&self, node: &JSRef<Node>, child: &JSRef<Node>) -> Fallible<Temporary<Node>>;
|
||||
|
@ -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<DOMString>)
|
||||
-> ErrorResult {
|
||||
fn SetNodeValue(&self, val: Option<DOMString>) -> 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<DOMString>)
|
||||
-> ErrorResult {
|
||||
fn SetTextContent(&self, value: Option<DOMString>) -> ErrorResult {
|
||||
let value = null_str_as_empty(&value);
|
||||
match self.type_id {
|
||||
DocumentFragmentNodeTypeId |
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue