servo/components/style/gecko
bors-servo 7f4cb1861b Auto merge of #18452 - nnethercote:bug-1398737, r=jdm
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.

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because tested on Gecko side.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18452)
<!-- Reviewable:end -->
2017-09-11 22:11:25 -05:00
..
generated stylo: Add (unused) absolute offset to FontComputationData 2017-09-11 16:05:37 -07:00
arc_types.rs stylo: Create ServoFontFeatureValuesRule and bind servo data 2017-07-27 13:38:00 -07:00
conversions.rs style: Properly use integers on grid properties, and derive ToComputedValue. 2017-09-11 11:29:27 +02:00
data.rs Overhaul MallocSizeOf and related things. 2017-09-12 12:37:51 +10:00
global_style_data.rs Reenable tight stacks sizes. 2017-08-25 21:29:18 -07:00
media_queries.rs Auto merge of #18422 - emilio:stale-todo, r=bholley 2017-09-08 16:30:26 -05:00
mod.rs Backed out changeset fec394734f83 (bug 17624) for build bustage a=backout CLOSED TREE 2017-07-06 21:58:15 +00:00
non_ts_pseudo_class_list.rs stylo: Expose -moz-system-metric and -moz-empty-except-children-with-localname. 2017-09-01 21:42:53 +02:00
pseudo_element.rs stylo: Remove a lot of the restyle damage related complexity. 2017-08-20 13:59:46 +02:00
pseudo_element_definition.mako.rs order derivable traits lists 2017-08-23 21:38:44 +02:00
regen_atoms.py Stylo's atom generation needs to deal with wrapper anon boxes. 2017-08-11 00:08:11 -04:00
restyle_damage.rs style: Stop the cascade when only reset structs change. 2017-09-06 12:56:29 +02:00
rules.rs Use integer for specified and computed font-weight 2017-07-06 15:31:24 +10:00
selector_parser.rs Replace some more uses of write! in components/style 2017-09-04 19:01:43 +02:00
snapshot.rs style: Implement a more fine-grained invalidation method. 2017-06-13 13:26:41 +02:00
snapshot_helpers.rs ID and class selectors are ASCII case-insensitive in quirks mode. 2017-06-12 23:33:53 +02:00
traversal.rs Eliminate the sequential/traversal parallel distinction in favor of a unified adaptive driver. 2017-08-25 10:00:27 -07:00
url.rs Do not use CVAS for gecko::SpecifiedUrl 2017-09-11 18:41:22 +02:00
values.rs Rewrite CounterStyleOrNone::from_gecko_value to use fewer binding functions 2017-08-31 14:03:59 +10:00
wrapper.rs style: Properly apply the display fixup for ::before and ::after. 2017-09-06 10:27:30 +02:00