summaryrefslogtreecommitdiff
path: root/Source/WebCore/css/CSSRuleList.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/css/CSSRuleList.h')
-rw-r--r--Source/WebCore/css/CSSRuleList.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/WebCore/css/CSSRuleList.h b/Source/WebCore/css/CSSRuleList.h
index c6e75c86e..311ead529 100644
--- a/Source/WebCore/css/CSSRuleList.h
+++ b/Source/WebCore/css/CSSRuleList.h
@@ -22,6 +22,7 @@
#ifndef CSSRuleList_h
#define CSSRuleList_h
+#include "MemoryInstrumentation.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
#include <wtf/RefPtr.h>
@@ -45,6 +46,8 @@ public:
virtual CSSRule* item(unsigned index) const = 0;
virtual CSSStyleSheet* styleSheet() const = 0;
+
+ virtual void reportMemoryUsage(MemoryObjectInfo*) const = 0;
protected:
CSSRuleList();
@@ -61,6 +64,8 @@ public:
virtual CSSStyleSheet* styleSheet() const { return 0; }
+ virtual void reportMemoryUsage(MemoryObjectInfo*) const OVERRIDE;
+
private:
StaticCSSRuleList();
~StaticCSSRuleList();
@@ -80,6 +85,12 @@ public:
virtual void ref() { m_rule->ref(); }
virtual void deref() { m_rule->deref(); }
+
+ virtual void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const OVERRIDE
+ {
+ MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+ info.addInstrumentedMember(m_rule);
+ }
private:
virtual unsigned length() const { return m_rule->length(); }