Commit graph

67 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
3d54c0710f
style: Make PrecomputedHasher fail loudly and with error messages when used incorrectly. 2017-08-07 14:12:40 +02:00
Emilio Cobos Álvarez
720b17a54b
style: Avoid hashing the precomputed hash atoms already have.
This shaves a fair amount of time of stylist rebuild.

Most of the extra remaining overhead are memory allocations...

I'll try to get those sorted out next, though fixing that may overlap quite a
bit with the work Cameron is doing in bug 1382925.

MozReview-Commit-ID: 3j2SBY4QnKf
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-08-07 14:12:39 +02:00
Bobby Holley
2f39213072 Use a 1-entry smallvec in the selector maps.
MozReview-Commit-ID: 1JPkVxs3cdP
2017-08-06 23:15:13 -07:00
Emilio Cobos Álvarez
445b8fb3e8
style: Remove SelectorAndHashes. 2017-07-13 05:44:55 +02:00
Emilio Cobos Álvarez
dee4aea264
style: Remove hashes from style rules and dependencies.
Dependencies are very numerous, and now we shouldn't be getting so many of them.

Style rules just don't need them, so it's a waste of memory.
2017-07-13 05:44:53 +02:00
Emilio Cobos Álvarez
9394ea9644
style: Remove unneeded bounds in SelectorMap and related code.
MozReview-Commit-ID: CWwdVCwWijn
2017-07-13 03:34:33 +02:00
Bobby Holley
1c7f2a9f09 Account for left-to-right rather than right-to-left precedence of classes in selector maps.
MozReview-Commit-ID: 8qIl4k3RxaC
2017-06-20 11:59:12 -07:00
Emilio Cobos Álvarez
cb06375fe2
style: Implement a more fine-grained invalidation method.
This commit also removes the old restyle_hints module and splits it into
multiple modules under components/style/invalidation/element/.

The basic approach is to walk down the tree using compound selectors as needed,
in order to do as little selector-matching as possible.

Bug: 1368240
MozReview-Commit-ID: 2YO8fKFygZI
2017-06-13 13:26:41 +02:00
Simon Sapin
5bccf98aa4 ID and class selectors are ASCII case-insensitive in quirks mode.
https://bugzilla.mozilla.org/show_bug.cgi?id=1363778
2017-06-12 23:33:53 +02:00
Bobby Holley
a98fff1af8 Hoist ApplicableDeclaration{Block,List} into a separate file.
MozReview-Commit-ID: EXnAzfyoZ1e
2017-06-12 12:13:21 -07:00
Bobby Holley
0caad2ffdc Use even fewer bits for source order and shrink ApplicableDeclarationsBlock by another word.
MozReview-Commit-ID: 7B1i1g0HLTj
2017-06-12 12:13:16 -07:00
Bobby Holley
1281fd9353 Stop slicing selectors when noting dependencies, and match with an offset instead.
MozReview-Commit-ID: KLqmdRKygO0
2017-06-05 19:44:01 -07:00
Bobby Holley
5ddabef636 Collapse Selector, SelectorInner, and ComplexSelector into a single Selector.
The refcounting is still internal. We'll fix that up next.

MozReview-Commit-ID: CTxZNaR3Qgj
2017-06-05 19:44:00 -07:00
Bobby Holley
713c9a63f6 Move the ancestor hashes out of Selector.
MozReview-Commit-ID: 5mipXnjgSED
2017-06-05 19:43:58 -07: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
Emilio Cobos Álvarez
e51ca0958e
style: Add a SelectorMapEntry trait. 2017-05-23 14:48:06 +02:00
Emilio Cobos Álvarez
a67e880256
style: Move SelectorMap to its own submodule. 2017-05-23 14:48:04 +02:00