aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/macros.rs
Commit message (Collapse)AuthorAgeFilesLines
* Replace all uses of the `heapsize` crate with `malloc_size_of`.Nicholas Nethercote2017-10-181-6/+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`.
* Update to cssparser 0.22 (source location in error types)Simon Sapin2017-10-101-5/+8
|
* Measure PropertyDeclaration more thoroughly.Nicholas Nethercote2017-09-141-0/+2
| | | | | | | | | | | | | | | This patch replaces the handwritten MallocSizeOf implementation for PropertyDeclaration with a derived one, which gives much more thorough measurement. This requires (a) deriving MallocSizeOf for a *lot* of additional types (most of which already have `derive(HeapSizeOf)` in Servo builds), and (b) implementing MallocSizeOf for a few more types in the `malloc_size_of` crate. These changes would significantly improve the reporting coverage for gmail if it weren't for the fact that SpecifiedUrl isn't measured due to a lack of clarity about its fields; that can be fixed as a follow-up once bug 1397971 has landed.
* Do not use CVAS for specified::AttrAnthony Ramine2017-09-111-1/+1
|
* style: Unify the trivial ToComputedValue implementations, and add impls for i32.Emilio Cobos Álvarez2017-09-111-2/+0
|
* style: Use derive for -x-span.Emilio Cobos Álvarez2017-09-111-11/+19
|
* style: Derive ToComputedValue for keyword types.Emilio Cobos Álvarez2017-09-111-2/+1
|
* style: Manually expand ComputedValueAsSpecified in the keyword macros.Emilio Cobos Álvarez2017-09-111-2/+12
|
* style: Minor reformatting in macros.rsEmilio Cobos Álvarez2017-09-111-11/+14
|
* Replace some more uses of `write!` in components/styleSimon Sapin2017-09-041-1/+1
|
* style: Remove HasViewportPercentage.Emilio Cobos Álvarez2017-08-291-5/+2
| | | | It's not needed since #18268
* Derive the most trivial Animate implsAnthony Ramine2017-08-221-12/+2
|
* Derive the most trivial ToAnimatedZero implsAnthony Ramine2017-08-221-6/+1
|
* Introduce values::animated::AnimateAnthony Ramine2017-08-221-3/+6
| | | | This replaces the Animatable trait and merges its three former methods into a single one.
* Derive ComputeSquaredDistanceAnthony Ramine2017-08-131-11/+1
|
* Introduce ComputeSquaredDistanceAnthony Ramine2017-08-131-0/+10
| | | | | This allows us to merge the former Animatable methods compute_distance and compute_squared_distance, reducing code size.
* Update cssparser to 0.18Simon Sapin2017-07-241-1/+1
| | | | https://github.com/servo/rust-cssparser/pull/171
* Move Animatable::get_zero_value to ToAnimatedZero::to_animated_zeroAnthony Ramine2017-07-191-0/+5
|
* Introduce ToAnimatedValue 🎥Anthony Ramine2017-06-291-0/+1
|
* Derive ToCss for keyword structsAnthony Ramine2017-06-171-8/+2
|
* style: Reduce some code duplication and ugliness when parsing identifiers.Emilio Cobos Álvarez2017-06-111-4/+20
|
* Thread ParseError return values through CSS parsing.Josh Matthews2017-06-091-10/+13
|
* Derive HasViewportPercentage 🍷Anthony Ramine2017-05-201-13/+0
|
* Move some style macros into their own module, used firstAnthony Ramine2017-05-181-0/+115