aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/mem.rs
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2015-10-14 12:47:48 -0600
committerbors-servo <metajack+bors@gmail.com>2015-10-14 12:47:48 -0600
commit32daa17d5cbcad02db0713e21e52410cdc60480e (patch)
treed5cf3137ab06523b1c8958d830751b74642f048e /components/script/mem.rs
parent8db8a86ab1e943b5102a05d6d31800579fdb7875 (diff)
parentaab2c40389c71c4b0db3ffa75bdec99cd440b8af (diff)
downloadservo-32daa17d5cbcad02db0713e21e52410cdc60480e.tar.gz
servo-32daa17d5cbcad02db0713e21e52410cdc60480e.zip
Auto merge of #7873 - nox:codegen-typeid, r=Ms2ger
Generate the various TypeId enums in codegen This frees us forever from caring about maintaining these enums. The last commit removes their use from the initialisation of interface objects derived from Node. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7873) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/mem.rs')
-rw-r--r--components/script/mem.rs17
1 files changed, 5 insertions, 12 deletions
diff --git a/components/script/mem.rs b/components/script/mem.rs
index 51eaa9359df..039b33f24a9 100644
--- a/components/script/mem.rs
+++ b/components/script/mem.rs
@@ -5,14 +5,7 @@
//! Routines for handling measuring the memory usage of arbitrary DOM nodes.
use dom::bindings::codegen::InheritTypes::*;
-use dom::element::ElementTypeId;
-use dom::eventtarget::{EventTarget, EventTargetTypeId};
-use dom::htmlelement::HTMLElementTypeId;
-use dom::htmlmediaelement::HTMLMediaElementTypeId::HTMLAudioElement;
-use dom::htmlmediaelement::HTMLMediaElementTypeId::HTMLVideoElement;
-use dom::htmltablecellelement::HTMLTableCellElementTypeId::HTMLTableDataCellElement;
-use dom::htmltablecellelement::HTMLTableCellElementTypeId::HTMLTableHeaderCellElement;
-use dom::node::NodeTypeId;
+use dom::eventtarget::EventTarget;
use libc;
use util::mem::{HeapSizeOf, heap_size_of};
@@ -137,10 +130,10 @@ pub fn heap_size_of_eventtarget(target: &EventTarget) -> usize {
ElementTypeId::HTMLElement(HTMLElementTypeId::HTMLMapElement))) =>
heap_size_of_self_and_children(HTMLMapElementCast::to_ref(target).unwrap()),
EventTargetTypeId::Node(NodeTypeId::Element(ElementTypeId::HTMLElement(
- HTMLElementTypeId::HTMLMediaElement(HTMLAudioElement)))) =>
+ HTMLElementTypeId::HTMLMediaElement(HTMLMediaElementTypeId::HTMLAudioElement)))) =>
heap_size_of_self_and_children(HTMLAudioElementCast::to_ref(target).unwrap()),
EventTargetTypeId::Node(NodeTypeId::Element(ElementTypeId::HTMLElement(
- HTMLElementTypeId::HTMLMediaElement(HTMLVideoElement)))) =>
+ HTMLElementTypeId::HTMLMediaElement(HTMLMediaElementTypeId::HTMLVideoElement)))) =>
heap_size_of_self_and_children(HTMLVideoElementCast::to_ref(target).unwrap()),
EventTargetTypeId::Node(NodeTypeId::Element(
ElementTypeId::HTMLElement(HTMLElementTypeId::HTMLMetaElement))) =>
@@ -203,10 +196,10 @@ pub fn heap_size_of_eventtarget(target: &EventTarget) -> usize {
ElementTypeId::HTMLElement(HTMLElementTypeId::HTMLTableCaptionElement))) =>
heap_size_of_self_and_children(HTMLTableCaptionElementCast::to_ref(target).unwrap()),
EventTargetTypeId::Node(NodeTypeId::Element(ElementTypeId::HTMLElement(
- HTMLElementTypeId::HTMLTableCellElement(HTMLTableDataCellElement)))) =>
+ HTMLElementTypeId::HTMLTableCellElement(HTMLTableCellElementTypeId::HTMLTableDataCellElement)))) =>
heap_size_of_self_and_children(HTMLTableDataCellElementCast::to_ref(target).unwrap()),
EventTargetTypeId::Node(NodeTypeId::Element(ElementTypeId::HTMLElement(
- HTMLElementTypeId::HTMLTableCellElement(HTMLTableHeaderCellElement)))) =>
+ HTMLElementTypeId::HTMLTableCellElement(HTMLTableCellElementTypeId::HTMLTableHeaderCellElement)))) =>
heap_size_of_self_and_children(HTMLTableHeaderCellElementCast::to_ref(target).unwrap()),
EventTargetTypeId::Node(NodeTypeId::Element(
ElementTypeId::HTMLElement(HTMLElementTypeId::HTMLTableColElement))) =>