Commit graph

5 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
10bd5636dc
style: Allow sharing style for elements with presentational hints. 2017-05-29 23:12:44 +02:00
Emilio Cobos Álvarez
03952a0c27
style: Also cache the class list in the CurrentElementInfo.
This patch also removes all notion of style sharing from matching.rs, which is
nice.
2017-05-29 22:54:17 +02:00
Emilio Cobos Álvarez
abcc9b301c
style: Add a CachedStyleSharingData to hold the candidate class list and revalidation results. 2017-05-29 21:56:21 +02:00
J. Ryan Stinnett
47c8574c54 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
2017-05-24 18:08:09 -05:00
Emilio Cobos Álvarez
311c403522
style: Move all the style sharing code outside matching.rs
This is just a code health change. I want to move it away to keep matching.rs as
simple as possible.
2017-05-21 02:30:51 +02:00