diff options
Diffstat (limited to 'components/script/dom/node.rs')
-rw-r--r-- | components/script/dom/node.rs | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs index 1187e76a688..416a69f6035 100644 --- a/components/script/dom/node.rs +++ b/components/script/dom/node.rs @@ -843,17 +843,17 @@ impl<'a> NodeHelpers<'a> for JSRef<'a, Node> { NodeInfo { uniqueId: self.unique_id.borrow().clone(), - baseURI: self.GetBaseURI().unwrap_or("".to_string()), - parent: self.GetParentNode().root().map(|node| node.get_unique_id()).unwrap_or("".to_string()), + baseURI: self.GetBaseURI().unwrap_or("".into_string()), + parent: self.GetParentNode().root().map(|node| node.get_unique_id()).unwrap_or("".into_string()), nodeType: self.NodeType() as uint, - namespaceURI: "".to_string(), //FIXME + namespaceURI: "".into_string(), //FIXME nodeName: self.NodeName(), numChildren: self.ChildNodes().root().Length() as uint, //FIXME doctype nodes only - name: "".to_string(), - publicId: "".to_string(), - systemId: "".to_string(), + name: "".into_string(), + publicId: "".into_string(), + systemId: "".into_string(), attrs: match ElementCast::to_ref(self) { Some(element) => element.summarize(), @@ -866,7 +866,7 @@ impl<'a> NodeHelpers<'a> for JSRef<'a, Node> { .map(|elem| NodeCast::from_ref(*elem.root()) == self) .unwrap_or(false), - shortValue: self.GetNodeValue().unwrap_or("".to_string()), //FIXME: truncate + shortValue: self.GetNodeValue().unwrap_or("".into_string()), //FIXME: truncate incompleteValue: false, //FIXME: reflect truncation } } @@ -1551,7 +1551,7 @@ impl Node { local: element.local_name().clone() }; let element = Element::create(name, - element.prefix().as_ref().map(|p| p.as_slice().to_string()), + element.prefix().as_ref().map(|p| p.as_slice().into_string()), *document, ElementCreator::ScriptCreated); NodeCast::from_temporary(element) }, @@ -1664,19 +1664,19 @@ impl<'a> NodeMethods for JSRef<'a, Node> { let elem: JSRef<Element> = ElementCast::to_ref(self).unwrap(); elem.TagName() } - NodeTypeId::Text => "#text".to_string(), + NodeTypeId::Text => "#text".into_string(), NodeTypeId::ProcessingInstruction => { let processing_instruction: JSRef<ProcessingInstruction> = ProcessingInstructionCast::to_ref(self).unwrap(); processing_instruction.Target() } - NodeTypeId::Comment => "#comment".to_string(), + NodeTypeId::Comment => "#comment".into_string(), NodeTypeId::DocumentType => { let doctype: JSRef<DocumentType> = DocumentTypeCast::to_ref(self).unwrap(); doctype.name().clone() }, - NodeTypeId::DocumentFragment => "#document-fragment".to_string(), - NodeTypeId::Document => "#document".to_string() + NodeTypeId::DocumentFragment => "#document-fragment".into_string(), + NodeTypeId::Document => "#document".into_string() } } |