mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Auto merge of #7611 - nox:cache-element-id, r=frewsxcv
Cache the `id` attribute on Element Thanks to @asabil for the original work, I only rebased it. Fixes #6359 and #7040. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7611) <!-- Reviewable:end -->
This commit is contained in:
commit
d1269294e6
6 changed files with 43 additions and 536 deletions
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue