Cameron McCormack
62419adaaa
style: Shrink selectors::Component to 24 bytes.
...
This saves about 37 KiB of memory across the UA style sheets.
Bug: 1475197
Reviewed-by: emilio
2018-08-08 01:36:53 +02:00
Nicholas Nethercote
fc9df0bcf3
style: Convert FnvHash{Set,Map} instances to FxHash{Set,Map}.
...
Bug: 1477628
Reviewed-by: heycam
2018-08-08 01:34:35 +02:00
Bobby Holley
c99bcdd4b8
Run rustfmt on selectors, servo_arc, and style.
...
This was generated with:
./mach cargo fmt --package selectors &&
./mach cargo fmt --package servo_arc &&
./mach cargo fmt --package style
Using rustfmt 0.4.1-nightly (a4462d1 2018-03-26)
2018-04-10 17:35:15 -07:00
Bobby Holley
f7ae1a37e3
Manual fixups so that the rustfmt output won't trigger tidy.
2018-04-10 17:33:25 -07:00
Simon Sapin
7d1dc7286a
Move selectors size_of tests to Stylo tests
2018-01-12 15:10:56 +01:00
Simon Sapin
5a82a1d455
Reverse the dependency between selectors and malloc_size_of
2018-01-12 15:10:04 +01:00
Simon Sapin
c496aa16a0
Rename the 'unstable' feature of the selectors crate to 'bench'
2017-10-12 17:19:02 +02:00
Emilio Cobos Álvarez
4f984a6428
selectors: Remove unused crate.
2017-09-25 02:01:55 +02:00
Bobby Holley
438740b912
Implement an nth-index cache.
...
MozReview-Commit-ID: Ee0um3QXkxl
2017-09-21 15:25:38 -07:00
Bobby Holley
8b6c5988b5
Hoist the LRU cache into its own crate to share it with selectors.
2017-09-20 23:22:20 -07:00
Nicholas Nethercote
32548e5312
Overhaul MallocSizeOf and related things.
...
This patch makes the MallocSizeOf stuff in Stylo work more like the HeapSizeOf
stuff already in Servo, except better. In particular, it adds deriving support
for MallocSizeOf, which will make it easier to improve coverage.
The patch does the following.
- Combines servo/components/style/stylesheets/memory.rs and the heapsize crate
into a new crate, malloc_size_of.
- Forks the heapsize_derive crate, calling it malloc_size_of, so that
MallocSizeOf can be derived.
- Both the new crates have MIT/Apache licenses, like heapsize, in case they are
incorporated into heapsize in the future.
- Renames the methods within MallocSizeOf and the related traits so they are
more concise.
- Removes MallocSizeOfWithGuard.
- Adds `derive(MallocSizeOf)` to a lot of types, in some cases replacing an
equivalent or almost-equivalent hand-written implementation.
- Adds stuff so that Rc/Arc can be handled properly.
2017-09-12 12:37:51 +10:00
Gecko Backout
f022936ebb
Backed out changeset a417b9d7712d for vendoring bustage. r=backout on a CLOSED TREE
...
Backs out https://github.com/servo/servo/pull/17565
2017-07-28 22:06:00 +00:00
Nikhil Shagrithaya
8ebd70d402
Run the async HTML Tokenizer on a new thread
2017-07-24 23:54:07 +05:30
Bobby Holley
5b857686e2
Make selectors benchmark tests work again.
2017-06-21 19:53:15 -07:00
Bobby Holley
1fc1d64e80
Hoist specificity computation into a new private builder module.
...
This patch doesn't modify any of the code because making a few things pub. I
did this first to make the next patch easier to audit.
MozReview-Commit-ID: 7PYxoS5bVGN
2017-06-20 11:59:11 -07:00
Bobby Holley
db8f59407f
Hoist sink into selectors.
...
It probably makes more sense (eventually) to put it in SmallVec.
MozReview-Commit-ID: AIBKCLiMNN2
2017-06-20 11:59:10 -07:00
Simon Sapin
700aaf2bd6
Move MatchingContext to a new module
2017-06-13 00:31:29 +02:00
J. Ryan Stinnett
6b1b8bbee8
Log element during selector matching
...
MozReview-Commit-ID: D8eFyRCy5BR
2017-06-07 14:23:53 -05:00
Bobby Holley
852efb825f
Use dynamically-sized Arcs for Selector.
...
MozReview-Commit-ID: hq0jYrx8Sg
2017-06-05 19:44:06 -07:00
Simon Sapin
94b4a32c18
Make some attr values case-insensitive in selectors
...
https://bugzilla.mozilla.org/show_bug.cgi?id=1363531
2017-05-18 17:13:15 +02:00
Simon Sapin
83c7824fda
Simplify rust-selectors API for attribute selectors
2017-05-18 17:13:13 +02:00
Simon Sapin
fd357f08cf
Add size_of tests for geckolib selectors
2017-05-16 10:24:41 +02:00
Bobby Holley
6d66ec5e11
Store selectors and combinators inline in a single sequence.
...
This improves cache locality and reduces allocations during parsing.
Note that this reverses the iteration order within a sequence of simple selectors,
but that shouldn't matter.
2017-04-20 15:00:43 -07:00
Matthew
ec04de4ab7
Removing recursion from ComplexSelector
...
formatting
formatting
2017-04-16 21:52:50 -04:00
Emilio Cobos Álvarez
1748150497
selectors: Remove custom attribute-affecting logic and sibling-affecting logic from rust-selectors.
...
MozReview-Commit-ID: BjZY6TjJbcb
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-04-09 05:49:47 +02:00
Emilio Cobos Álvarez
e29b84de18
style: Hash less stuff in the bloom filter, using the precomputed hashes we have.
2017-04-08 02:02:11 +02:00
Simon Sapin
288ef97055
Update cssparser for https://github.com/servo/rust-cssparser/pull/123
2017-02-28 17:16:36 +01:00
Simon Sapin
33ef6f78e5
Update to cssparser 0.11
2017-02-26 11:09:53 +01:00
Bobby Holley
8915e53cee
Move rust-selectors in-tree.
2017-02-07 22:53:10 -08:00