mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Style sharing cache for visited
The style sharing cache stores the regular `ComputedValues`, so it would also have the visited values as well for anything inserted into the cache (since they are nested inside). Unlike all other element states, a change in state of unvisited vs. visited does not change the style system's output, since we have already computed both possible outputs up front. We change the element state checks when looking for style sharing cache hits to ignore visitedness, since that's handled by the two separate sets of values. MozReview-Commit-ID: Dt8uK8gSQSP
This commit is contained in:
parent
582ce1f6e4
commit
47c8574c54
2 changed files with 16 additions and 1 deletions
|
@ -349,7 +349,7 @@ impl<E: TElement> StyleSharingCandidateCache<E> {
|
|||
miss!(UserAndAuthorRules)
|
||||
}
|
||||
|
||||
if element.get_state() != candidate.element.get_state() {
|
||||
if !checks::have_same_state_ignoring_visitedness(element, candidate) {
|
||||
miss!(State)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue