mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Use DOMString::new() somewhat consistently.
This commit is contained in:
parent
dab3926622
commit
e6aa976462
24 changed files with 67 additions and 68 deletions
|
@ -942,7 +942,7 @@ impl Document {
|
|||
Some(ref body) => {
|
||||
body.upcast::<Element>().get_string_attribute(local_name)
|
||||
},
|
||||
None => "".to_owned()
|
||||
None => DOMString::new()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1543,7 +1543,7 @@ impl DocumentMethods for Document {
|
|||
let name = Atom::from_slice(&local_name);
|
||||
// repetition used because string_cache::atom::Atom is non-copyable
|
||||
let l_name = Atom::from_slice(&local_name);
|
||||
let value = AttrValue::String("".to_owned());
|
||||
let value = AttrValue::String(DOMString::new());
|
||||
|
||||
Ok(Attr::new(&self.window, name, value, l_name, ns!(""), None, None))
|
||||
}
|
||||
|
@ -1553,7 +1553,7 @@ impl DocumentMethods for Document {
|
|||
-> Fallible<Root<Attr>> {
|
||||
let (namespace, prefix, local_name) =
|
||||
try!(validate_and_extract(namespace, &qualified_name));
|
||||
let value = AttrValue::String("".to_owned());
|
||||
let value = AttrValue::String(DOMString::new());
|
||||
let qualified_name = Atom::from_slice(&qualified_name);
|
||||
Ok(Attr::new(&self.window, local_name, value, qualified_name,
|
||||
namespace, prefix, None))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue