summaryrefslogtreecommitdiff
path: root/Source/WebCore/css/CSSGradientValue.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/css/CSSGradientValue.cpp')
-rw-r--r--Source/WebCore/css/CSSGradientValue.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/Source/WebCore/css/CSSGradientValue.cpp b/Source/WebCore/css/CSSGradientValue.cpp
index 3f1979fee..c7daacc87 100644
--- a/Source/WebCore/css/CSSGradientValue.cpp
+++ b/Source/WebCore/css/CSSGradientValue.cpp
@@ -33,6 +33,7 @@
#include "Image.h"
#include "IntSize.h"
#include "IntSizeHash.h"
+#include "MemoryInstrumentation.h"
#include "NodeRenderStyle.h"
#include "PlatformString.h"
#include "RenderObject.h"
@@ -42,6 +43,13 @@ using namespace std;
namespace WebCore {
+void CSSGradientColorStop::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
+{
+ MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+ info.addInstrumentedMember(m_position);
+ info.addInstrumentedMember(m_color);
+}
+
PassRefPtr<Image> CSSGradientValue::image(RenderObject* renderer, const IntSize& size)
{
if (size.isEmpty())
@@ -452,6 +460,17 @@ bool CSSGradientValue::isCacheable() const
return true;
}
+void CSSGradientValue::reportBaseClassMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
+{
+ MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+ CSSImageGeneratorValue::reportBaseClassMemoryUsage(memoryObjectInfo);
+ info.addInstrumentedMember(m_firstX);
+ info.addInstrumentedMember(m_firstY);
+ info.addInstrumentedMember(m_secondX);
+ info.addInstrumentedMember(m_secondY);
+ info.addInstrumentedVector(m_stops);
+}
+
String CSSLinearGradientValue::customCssText() const
{
String result;
@@ -594,6 +613,13 @@ PassRefPtr<Gradient> CSSLinearGradientValue::createGradient(RenderObject* render
return gradient.release();
}
+void CSSLinearGradientValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
+{
+ MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+ CSSGradientValue::reportBaseClassMemoryUsage(memoryObjectInfo);
+ info.addInstrumentedMember(m_angle);
+}
+
String CSSRadialGradientValue::customCssText() const
{
String result;
@@ -891,4 +917,16 @@ PassRefPtr<Gradient> CSSRadialGradientValue::createGradient(RenderObject* render
return gradient.release();
}
+void CSSRadialGradientValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
+{
+ MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
+ CSSGradientValue::reportBaseClassMemoryUsage(memoryObjectInfo);
+ info.addInstrumentedMember(m_firstRadius);
+ info.addInstrumentedMember(m_secondRadius);
+ info.addInstrumentedMember(m_shape);
+ info.addInstrumentedMember(m_sizingBehavior);
+ info.addInstrumentedMember(m_endHorizontalSize);
+ info.addInstrumentedMember(m_endVerticalSize);
+}
+
} // namespace WebCore