mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Fix style sharing cache lookups to compare ids of the two elements.
Otherwise we can have a situation like this: <style> .notmatching > #foo {} </style> <span id="foo"></span> <span></span> and the style sharing cache lookup for the second <span> would try to revalidate against the cached value for the first <span>, but end up failing asserts about the two elements matching lists of revalidation selectors that have the same length.
This commit is contained in:
parent
f3c8f7e0d0
commit
5ddf455235
1 changed files with 1 additions and 1 deletions
|
@ -176,7 +176,7 @@ fn element_matches_candidate<E: TElement>(element: &E,
|
|||
miss!(State)
|
||||
}
|
||||
|
||||
if element.get_id().is_some() {
|
||||
if element.get_id() != candidate_element.get_id() {
|
||||
miss!(IdAttr)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue