aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/applicable_declarations.rs
Commit message (Collapse)AuthorAgeFilesLines
* Update MPL license to https (part 4)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* `cargo fix --edition`Simon Sapin2018-11-101-3/+3
|
* Format style component.chansuke2018-09-091-2/+4
|
* style: Update StyleSource to use ArcUnion.Bobby Holley2018-04-291-1/+1
| | | | | | Bug: 1455784 Reviewed-by: Manishearth MozReview-Commit-ID: AT4sud9goGV
* style: Pack the shadow cascade order in ApplicableDeclarationBlock.Emilio Cobos Álvarez2018-04-281-36/+55
| | | | | | | | | | | | | | | | | | | | I didn't bother not shifting there. We need to load the whole thing and shift for at least one of cascade level / shadow cascade order. Callers of level() other than for_rule_tree are non-existent in release builds, so we'd be doing the shift anyway. I can implement the same thing for shadow_cascade_order too, but I don't think that optimization is measurable in any way, either, the compiler should make the decision. And just in case, the simpler version actually generated less instructions in: https://play.rust-lang.org/?gist=ceadb0d3cbce4eeca76e4d9ab9a1c744&version=nightly with the simple thing. Bug: 1455032 Reviewed-by: heycam MozReview-Commit-ID: 8xPBJmlcyKh
* style: Fix cascade order of !important in Shadow DOM.Emilio Cobos Álvarez2018-04-281-8/+18
| | | | | | | | | | | | | | | | No cleaner ideas right now that carrying that counter around... Maybe a custom type may be cleaner? This makes ApplicableDeclarationBlock a bit bigger. I could probably try to make the counter a 4 / 5-bit number or something and pack the counter there in the SourceOrderAndCascadeLevel somehow... But doesn't seem really worth the churn, and can be done as a followup in any case. Let me know if you want to block on that. Bug: 1454162 Reviewed-by: heycam MozReview-Commit-ID: 1LdW9S4xA6f
* Run rustfmt on selectors, servo_arc, and style.Bobby Holley2018-04-101-9/+6
| | | | | | | | | | 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)
* Replace all uses of the `heapsize` crate with `malloc_size_of`.Nicholas Nethercote2017-10-181-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Servo currently uses `heapsize`, but Stylo/Gecko use `malloc_size_of`. `malloc_size_of` is better -- it handles various cases that `heapsize` does not -- so this patch changes Servo to use `malloc_size_of`. This patch makes the following changes to the `malloc_size_of` crate. - Adds `MallocSizeOf` trait implementations for numerous types, some built-in (e.g. `VecDeque`), some external and Servo-only (e.g. `string_cache`). - Makes `enclosing_size_of_op` optional, because vanilla jemalloc doesn't support that operation. - For `HashSet`/`HashMap`, falls back to a computed estimate when `enclosing_size_of_op` isn't available. - Adds an extern "C" `malloc_size_of` function that does the actual heap measurement; this is based on the same functions from the `heapsize` crate. This patch makes the following changes elsewhere. - Converts all the uses of `heapsize` to instead use `malloc_size_of`. - Disables the "heapsize"/"heap_size" feature for the external crates that provide it. - Removes the `HeapSizeOf` implementation from `hashglobe`. - Adds `ignore` annotations to a few `Rc`/`Arc`, because `malloc_size_of` doesn't derive those types, unlike `heapsize`.
* Measure the UA cache.Nicholas Nethercote2017-09-201-0/+3
| | | | | | | | | | | | | | | | ServoStyleSetSizes now has two uses, one for the Stylist, and one for the UA cache, and so the patch removes 'Stylist' from the field names. Example output from about:memory: > +----1,359,608 B (00.55%) -- layout > | +----756,488 B (00.31%) -- style-sheet-cache [2] > | +----393,968 B (00.16%) -- servo-ua-cache > | | +--234,496 B (00.10%) -- element-and-pseudos-maps > | | +---59,648 B (00.02%) -- revalidation-selectors > | | +---58,320 B (00.02%) -- invalidation-map > | | +---30,752 B (00.01%) -- other > | | +---10,752 B (00.00%) -- precomputed-pseudos
* order derivable traits listsClément DAVID2017-08-231-2/+2
| | | | | | Ignoring : - **generated**.rs - python/tidy/servo_tidy_tests/rust_tidy.rs
* Replace all uses of the style::stylearc alias with servo_arc.Michael Partheil2017-07-191-1/+1
| | | | | | The alias is left there temporarilly and will be removed completely in a later commit where also components/style/gecko/generated/structs_{debug|release}.rs are re-generated (they still use the old alias).
* Hoist ApplicableDeclaration{Block,List} into a separate file.Bobby Holley2017-06-121-0/+137
MozReview-Commit-ID: EXnAzfyoZ1e