mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Backed out changeset 7c7183d9dfac (bug 1835407) for causing multiple failures. CLOSED TREE
This commit is contained in:
parent
d81b0bfdfd
commit
d1084a04cf
@ -879,6 +879,22 @@ impl<E: TElement> StyleSharingCache<E> {
|
||||
if target.local_name() != candidate.element.local_name() {
|
||||
return None;
|
||||
}
|
||||
// Rule nodes and styles are computed independent of the element's
|
||||
// actual visitedness, but at the end of the cascade (in
|
||||
// `adjust_for_visited`) we do store the visitedness as a flag in
|
||||
// style. (This is a subtle change from initial visited work that
|
||||
// landed when computed values were fused, see
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=1381635.)
|
||||
// So at the moment, we need to additionally compare visitedness,
|
||||
// since that is not accounted for by rule nodes alone.
|
||||
// FIXME(jryans): This seems like it breaks the constant time
|
||||
// requirements of visited, assuming we get a cache hit on only one
|
||||
// of unvisited vs. visited.
|
||||
// TODO(emilio): We no longer have such a flag, remove this check.
|
||||
if target.is_visited_link() != candidate.element.is_visited_link() {
|
||||
return None;
|
||||
}
|
||||
|
||||
Some(data.share_primary_style())
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user