Commit graph

68 commits

Author SHA1 Message Date
Boris Zbarsky
537cf52707 Fix revalidation selectors when pseudo-elements are involved. 2017-06-08 01:19:50 -04:00
Boris Zbarsky
3d3ce51797 Back out https://github.com/servo/servo/pull/17198 for Gecko test failures 2017-06-07 15:57:48 -04:00
Boris Zbarsky
21eafaa9f8 Increase the size of the style sharing cache to 31.
Still a lot of guesswork here, but this does seem to get us better sharing.  See
https://bugzilla.mozilla.org/show_bug.cgi?id=1369621 for some data.
2017-06-06 22:34:46 -04:00
Boris Zbarsky
f9205440b5 Parent mismatch should not clear style sharing cache.
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
2017-06-05 16:31:58 -04:00
Boris Zbarsky
ad1309552d Allow style sharing for elements with ids as long as the ID is not being used for styling. 2017-06-05 13:32:03 -04:00
Boris Zbarsky
d031b5badb Add selectors with an id in them to the list of revalidation selectors. 2017-06-05 13:32:02 -04:00
Boris Zbarsky
98f95a32da Fix the handling of the Bloom filter in the style sharing cache. 2017-06-05 12:51:51 -04:00
Kenan Rhoton
8aeb512670 Adapt LRUCache to use ArrayDeque crate instead of VecDeque 2017-06-03 20:59:01 +02:00
J. Ryan Stinnett
56b44d2709 Pull decls from Gecko for link preshints
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
2017-06-02 14:34:39 -05:00
Bobby Holley
47404cfc4e Compare style attributes rather than rejecting them from the cache.
MozReview-Commit-ID: Jmu7Pie2mBP
2017-05-31 06:48:40 -07:00
Bobby Holley
f40c45fe1a Reduce the number of places where we need to enumerate ValidationData members.
MozReview-Commit-ID: 9m2ebknBFSE
2017-05-31 06:48:33 -07:00
Bobby Holley
6d8455a916 Sort the cached class list in ValidationInfo.
MozReview-Commit-ID: 3vsfP5ECzds
2017-05-31 06:48:27 -07:00
Emilio Cobos Álvarez
7db2776348
s/CachedStyleSharingData/ValidationData.
I still think CachedStyleSharingData should be the name, but not going to fight
over it.
2017-05-30 11:23:59 +02:00
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