servo/components/layout
Nicholas Nethercote 4506f0d30c Replace all uses of the heapsize crate with malloc_size_of.
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`.
2017-10-18 22:20:37 +11:00
..
animation.rs stylo: Remove a lot of the restyle damage related complexity. 2017-08-20 13:59:46 +02:00
block.rs Introduce an unsafe HasBaseFlow trait for base()/base_mut() casts. 2017-10-14 00:03:57 +02:00
Cargo.toml Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
construct.rs Remove usage of unstable box syntax, except in the script crate 2017-10-12 12:10:56 +02:00
context.rs Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
data.rs layout: Stop doing unsafe transmutes between refcell references. 2017-05-25 10:31:40 +02:00
display_list_builder.rs Fix commonmark Markdown warnings in docs, part 1 2017-10-17 11:24:57 -07:00
flex.rs Fix commonmark Markdown warnings in docs, part 1 2017-10-17 11:24:57 -07:00
floats.rs order derivable traits lists 2017-08-23 21:38:44 +02:00
flow.rs Introduce an unsafe HasBaseFlow trait for base()/base_mut() casts. 2017-10-14 00:03:57 +02:00
flow_list.rs Remove usage of unstable feature conservative_impl_trait in layout 2017-10-13 11:11:06 +02:00
flow_ref.rs order derivable traits lists 2017-08-23 21:38:44 +02:00
fragment.rs Remove usage of unstable feature box_patterns 2017-10-13 11:11:08 +02:00
generated_content.rs Remove usage of unstable box syntax, except in the script crate 2017-10-12 12:10:56 +02:00
incremental.rs Force reflow in the sequential fallback of block format context 2017-04-23 08:32:25 +08:00
inline.rs Introduce an unsafe HasBaseFlow trait for base()/base_mut() casts. 2017-10-14 00:03:57 +02:00
layout_debug.rs Remove usage of unstable box syntax, except in the script crate 2017-10-12 12:10:56 +02:00
lib.rs Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
linked_list.rs Move util::linked_list to layout 2016-06-29 17:23:04 +02:00
list_item.rs Introduce an unsafe HasBaseFlow trait for base()/base_mut() casts. 2017-10-14 00:03:57 +02:00
model.rs style: Make border-spacing serialization consistent, and move it to precomputed_type. 2017-09-17 21:33:17 +02:00
multicol.rs Introduce an unsafe HasBaseFlow trait for base()/base_mut() casts. 2017-10-14 00:03:57 +02:00
opaque_node.rs Introduce LayoutJS<Node>::opaque() to replace OpaqueNodeMethods::from_jsmanaged(). 2016-06-20 19:08:02 +02:00
parallel.rs Use raw pointers instead of transmute for UnsafeFlow 2017-10-04 20:00:31 -07:00
persistent_list.rs Make tidy aware of Rust multiline strings 2017-09-21 17:17:47 -04:00
query.rs Auto merge of #18704 - mrobinson:wr-hit-testing, r=jdm,glennw,mbrubeck 2017-10-17 17:09:25 -05:00
sequential.rs Separate stacking context collection and display list building state 2017-09-12 17:15:06 +02:00
table.rs Introduce an unsafe HasBaseFlow trait for base()/base_mut() casts. 2017-10-14 00:03:57 +02:00
table_caption.rs Introduce an unsafe HasBaseFlow trait for base()/base_mut() casts. 2017-10-14 00:03:57 +02:00
table_cell.rs Introduce an unsafe HasBaseFlow trait for base()/base_mut() casts. 2017-10-14 00:03:57 +02:00
table_colgroup.rs Introduce an unsafe HasBaseFlow trait for base()/base_mut() casts. 2017-10-14 00:03:57 +02:00
table_row.rs Introduce an unsafe HasBaseFlow trait for base()/base_mut() casts. 2017-10-14 00:03:57 +02:00
table_rowgroup.rs Introduce an unsafe HasBaseFlow trait for base()/base_mut() casts. 2017-10-14 00:03:57 +02:00
table_wrapper.rs Introduce an unsafe HasBaseFlow trait for base()/base_mut() casts. 2017-10-14 00:03:57 +02:00
text.rs Remove usage of unstable box syntax, except in the script crate 2017-10-12 12:10:56 +02:00
traversal.rs Eliminate RestyleData entirely. 2017-09-12 10:33:51 -07:00
webrender_helpers.rs Switch to using WebRender hit testing 2017-10-17 23:33:13 +02:00
wrapper.rs Rename LayoutJS<T> to LayoutDom<T> 2017-09-26 09:49:04 +02:00