script: Use atom comparison in more places, especially for attributes.

75% improvement in style recalc for Guardians of the Galaxy.
This commit is contained in:
Patrick Walton 2014-09-12 13:28:37 -07:00
parent d168501555
commit ee2ccc4f87
31 changed files with 305 additions and 237 deletions

View file

@ -481,7 +481,7 @@ pub fn parse_html(page: &Page,
};
let script_element: JSRef<Element> = ElementCast::from_ref(script);
match script_element.get_attribute(ns!(""), "src").root() {
match script_element.get_attribute(ns!(""), &atom!("src")).root() {
Some(src) => {
debug!("found script: {:s}", src.Value());
let mut url_parser = UrlParser::new();