mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Replaced DOMString by String in devtools.
This commit is contained in:
parent
9cbc4393eb
commit
5101506089
6 changed files with 27 additions and 28 deletions
|
@ -806,17 +806,17 @@ impl Node {
|
|||
pub fn summarize(&self) -> NodeInfo {
|
||||
NodeInfo {
|
||||
uniqueId: self.get_unique_id(),
|
||||
baseURI: self.BaseURI(),
|
||||
baseURI: String::from(self.BaseURI()),
|
||||
parent: self.GetParentNode().map(|node| node.get_unique_id()).unwrap_or("".to_owned()),
|
||||
nodeType: self.NodeType(),
|
||||
namespaceURI: DOMString::new(), //FIXME
|
||||
nodeName: self.NodeName(),
|
||||
namespaceURI: String::new(), //FIXME
|
||||
nodeName: String::from(self.NodeName()),
|
||||
numChildren: self.ChildNodes().Length() as usize,
|
||||
|
||||
//FIXME doctype nodes only
|
||||
name: DOMString::new(),
|
||||
publicId: DOMString::new(),
|
||||
systemId: DOMString::new(),
|
||||
name: String::new(),
|
||||
publicId: String::new(),
|
||||
systemId: String::new(),
|
||||
attrs: self.downcast().map(Element::summarize).unwrap_or(vec![]),
|
||||
|
||||
isDocumentElement:
|
||||
|
@ -825,7 +825,7 @@ impl Node {
|
|||
.map(|elem| elem.upcast::<Node>() == self)
|
||||
.unwrap_or(false),
|
||||
|
||||
shortValue: self.GetNodeValue().unwrap_or_default(), //FIXME: truncate
|
||||
shortValue: self.GetNodeValue().map(String::from).unwrap_or_default(), //FIXME: truncate
|
||||
incompleteValue: false, //FIXME: reflect truncation
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue