From 9607b468bc50496c0de3706d22efaa6fdc68b089 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Thu, 18 Sep 2014 09:20:19 -0400 Subject: Revert "script: Use atom comparison in more places, especially for attributes." for persistent test failures. This reverts commit 874db261046d6155b1942efa106d2e0014295d6d. --- components/script/dom/htmlscriptelement.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'components/script/dom/htmlscriptelement.rs') diff --git a/components/script/dom/htmlscriptelement.rs b/components/script/dom/htmlscriptelement.rs index 95cbd666920..29cb155a984 100644 --- a/components/script/dom/htmlscriptelement.rs +++ b/components/script/dom/htmlscriptelement.rs @@ -16,7 +16,6 @@ use dom::eventtarget::{EventTarget, NodeTargetTypeId}; use dom::htmlelement::HTMLElement; use dom::node::{Node, NodeHelpers, ElementNodeTypeId}; -use servo_util::atom::Atom; use servo_util::namespace::Null; use servo_util::str::{DOMString, HTML_SPACE_CHARACTERS, StaticStringVec}; @@ -76,7 +75,7 @@ static SCRIPT_JS_MIMES: StaticStringVec = &[ impl<'a> HTMLScriptElementHelpers for JSRef<'a, HTMLScriptElement> { fn is_javascript(&self) -> bool { let element: &JSRef = ElementCast::from_ref(self); - match element.get_attribute(Null, &satom!("type")).root().map(|s| s.Value()) { + match element.get_attribute(Null, "type").root().map(|s| s.Value()) { Some(ref s) if s.is_empty() => { // type attr exists, but empty means js debug!("script type empty, inferring js"); @@ -88,9 +87,7 @@ impl<'a> HTMLScriptElementHelpers for JSRef<'a, HTMLScriptElement> { }, None => { debug!("no script type"); - match element.get_attribute(Null, &satom!("language")) - .root() - .map(|s| s.Value()) { + match element.get_attribute(Null, "language").root().map(|s| s.Value()) { Some(ref s) if s.is_empty() => { debug!("script language empty, inferring js"); true @@ -112,7 +109,7 @@ impl<'a> HTMLScriptElementHelpers for JSRef<'a, HTMLScriptElement> { impl<'a> HTMLScriptElementMethods for JSRef<'a, HTMLScriptElement> { fn Src(&self) -> DOMString { let element: &JSRef = ElementCast::from_ref(self); - element.get_url_attribute(&satom!("src")) + element.get_url_attribute("src") } // http://www.whatwg.org/html/#dom-script-text -- cgit v1.2.3