mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
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:
parent
61642d64b5
commit
874db26104
32 changed files with 300 additions and 147 deletions
|
@ -92,11 +92,11 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLLinkElement> {
|
|||
// FIXME: workaround for https://github.com/mozilla/rust/issues/13246;
|
||||
// we get unrooting order failures if these are inside the match.
|
||||
let rel = {
|
||||
let rel = element.get_attribute(Null, "rel").root();
|
||||
let rel = element.get_attribute(Null, &satom!("rel")).root();
|
||||
rel.map(|rel| rel.deref().value().as_slice().to_string())
|
||||
};
|
||||
let href = {
|
||||
let href = element.get_attribute(Null, "href").root();
|
||||
let href = element.get_attribute(Null, &satom!("href")).root();
|
||||
href.map(|href| href.deref().value().as_slice().to_string())
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue