auto merge of #4068 : Manishearth/servo/atomify, r=jdm

This commit is contained in:
bors-servo 2014-11-23 22:00:40 -07:00
commit 60dfb65ab2
4 changed files with 6 additions and 8 deletions

View file

@ -824,7 +824,7 @@ impl<'a> ElementMethods for JSRef<'a, Element> {
let name = Atom::from_slice(name.as_slice());
let local_name = Atom::from_slice(local_name);
let xmlns = Atom::from_slice("xmlns"); // TODO: Make this a static atom type
let xmlns = atom!("xmlns");
// Step 7a.
if xmlns == name && namespace != ns!(XMLNS) {

View file

@ -18,8 +18,6 @@ use dom::node::{TextNodeTypeId, NodeHelpers};
use dom::processinginstruction::ProcessingInstruction;
use dom::text::Text;
use string_cache::Atom;
#[allow(unrooted_must_root)]
pub fn serialize(iterator: &mut NodeIterator) -> String {
let mut html = String::new();
@ -141,7 +139,7 @@ fn serialize_attr(attr: JSRef<Attr>, html: &mut String) {
html.push_str("xml:");
html.push_str(attr.local_name().as_slice());
} else if *attr.namespace() == ns!(XMLNS) &&
*attr.local_name() == Atom::from_slice("xmlns") {
*attr.local_name() == atom!("xmlns") {
html.push_str("xmlns");
} else if *attr.namespace() == ns!(XMLNS) {
html.push_str("xmlns:");