We can have cousins in the cache whose parent doesn't match ours, and other
cousins whose parent does. When we encounter one of the former, that's not a
reason to stop lookin for the latter.
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1369620
Based on a link's active state and the visited handling mode, pull in link,
vlink, and alink preshint declaration blocks from Gecko as needed.
MozReview-Commit-ID: A6udMYbzQnK
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