Use cached element ID in LayoutElement::get_id

This commit is contained in:
Ali Sabil 2015-08-07 12:33:06 +02:00 committed by Anthony Ramine
parent ea655ada10
commit 2e9d8a76d1
2 changed files with 9 additions and 1 deletions

View file

@ -487,7 +487,7 @@ impl<'le> ::selectors::Element for LayoutElement<'le> {
#[inline]
fn get_id(&self) -> Option<Atom> {
unsafe {
(*self.element.unsafe_get()).get_attr_atom_for_layout(&ns!(""), &atom!("id"))
(*self.element.id_attribute()).clone()
}
}