summaryrefslogtreecommitdiffstats
path: root/WebCore/css/StyleBase.cpp
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-03-05 14:34:32 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-05 14:34:32 -0800
commit635860845790a19bf50bbc51ba8fb66a96dde068 (patch)
treeef6ad9ff73a5b57f65249d4232a202fa77e6a140 /WebCore/css/StyleBase.cpp
parent8e35f3cfc7fba1d1c829dc557ebad6409cbe16a2 (diff)
downloadexternal_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.zip
external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.tar.gz
external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.tar.bz2
auto import from //depot/cupcake/@136594
Diffstat (limited to 'WebCore/css/StyleBase.cpp')
-rw-r--r--WebCore/css/StyleBase.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/WebCore/css/StyleBase.cpp b/WebCore/css/StyleBase.cpp
index 17b51bb..4d5c9c8 100644
--- a/WebCore/css/StyleBase.cpp
+++ b/WebCore/css/StyleBase.cpp
@@ -65,4 +65,25 @@ KURL StyleBase::baseURL() const
return sheet->ownerNode()->document()->baseURL();
}
+#ifdef ANDROID_INSTRUMENT
+static size_t styleSize = 0;
+
+void* StyleBase::operator new(size_t s) throw()
+{
+ styleSize += s;
+ return ::operator new(s);
+}
+
+void StyleBase::operator delete(void* ptr, size_t s)
+{
+ styleSize -= s;
+ ::operator delete(ptr);
+}
+
+size_t StyleBase::reportStyleSize()
+{
+ return styleSize;
+}
+#endif
+
}