Remove Traceable from characterdata.rs

This commit is contained in:
Manish Goregaokar 2014-09-28 16:45:58 +05:30
parent 8de00ab999
commit 4f574b4732
6 changed files with 27 additions and 28 deletions

View file

@ -1362,7 +1362,7 @@ impl Node {
CommentNodeTypeId => {
let comment: JSRef<Comment> = CommentCast::to_ref(node).unwrap();
let comment = comment.deref();
let comment = Comment::new(comment.characterdata.data.deref().borrow().clone(), *document);
let comment = Comment::new(comment.characterdata.data.borrow().clone(), *document);
NodeCast::from_temporary(comment)
},
DocumentNodeTypeId => {
@ -1386,14 +1386,14 @@ impl Node {
TextNodeTypeId => {
let text: JSRef<Text> = TextCast::to_ref(node).unwrap();
let text = text.deref();
let text = Text::new(text.characterdata.data.deref().borrow().clone(), *document);
let text = Text::new(text.characterdata.data.borrow().clone(), *document);
NodeCast::from_temporary(text)
},
ProcessingInstructionNodeTypeId => {
let pi: JSRef<ProcessingInstruction> = ProcessingInstructionCast::to_ref(node).unwrap();
let pi = pi.deref();
let pi = ProcessingInstruction::new(pi.target.clone(),
pi.characterdata.data.deref().borrow().clone(), *document);
pi.characterdata.data.borrow().clone(), *document);
NodeCast::from_temporary(pi)
},
}.root();
@ -1660,7 +1660,7 @@ impl<'a> NodeMethods for JSRef<'a, Node> {
self.wait_until_safe_to_modify_dom();
let characterdata: JSRef<CharacterData> = CharacterDataCast::to_ref(self).unwrap();
*characterdata.data.deref().borrow_mut() = value;
*characterdata.data.borrow_mut() = value;
// Notify the document that the content of this node is different
let document = self.owner_doc().root();
@ -1873,12 +1873,12 @@ impl<'a> NodeMethods for JSRef<'a, Node> {
let pi: JSRef<ProcessingInstruction> = ProcessingInstructionCast::to_ref(node).unwrap();
let other_pi: JSRef<ProcessingInstruction> = ProcessingInstructionCast::to_ref(other).unwrap();
(pi.deref().target == other_pi.deref().target) &&
(*pi.deref().characterdata.data.deref().borrow() == *other_pi.deref().characterdata.data.deref().borrow())
(*pi.deref().characterdata.data.borrow() == *other_pi.deref().characterdata.data.borrow())
}
fn is_equal_characterdata(node: JSRef<Node>, other: JSRef<Node>) -> bool {
let characterdata: JSRef<CharacterData> = CharacterDataCast::to_ref(node).unwrap();
let other_characterdata: JSRef<CharacterData> = CharacterDataCast::to_ref(other).unwrap();
*characterdata.deref().data.deref().borrow() == *other_characterdata.deref().data.deref().borrow()
*characterdata.deref().data.borrow() == *other_characterdata.deref().data.borrow()
}
fn is_equal_element_attrs(node: JSRef<Node>, other: JSRef<Node>) -> bool {
let element: JSRef<Element> = ElementCast::to_ref(node).unwrap();