summaryrefslogtreecommitdiff
path: root/Source/WebCore/css/WebKitCSSKeyframeRule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/css/WebKitCSSKeyframeRule.cpp')
-rw-r--r--Source/WebCore/css/WebKitCSSKeyframeRule.cpp34
1 files changed, 14 insertions, 20 deletions
diff --git a/Source/WebCore/css/WebKitCSSKeyframeRule.cpp b/Source/WebCore/css/WebKitCSSKeyframeRule.cpp
index 36f5c02f4..af85b97f4 100644
--- a/Source/WebCore/css/WebKitCSSKeyframeRule.cpp
+++ b/Source/WebCore/css/WebKitCSSKeyframeRule.cpp
@@ -27,16 +27,25 @@
#include "WebKitCSSKeyframeRule.h"
#include "PropertySetCSSStyleDeclaration.h"
+#include "StylePropertySet.h"
#include "WebKitCSSKeyframesRule.h"
#include <wtf/text/StringBuilder.h>
namespace WebCore {
-StylePropertySet* StyleKeyframe::mutableProperties()
+StyleKeyframe::StyleKeyframe()
+{
+}
+
+StyleKeyframe::~StyleKeyframe()
+{
+}
+
+MutableStylePropertySet* StyleKeyframe::mutableProperties()
{
if (!m_properties->isMutable())
- m_properties = m_properties->copy();
- return m_properties.get();
+ m_properties = m_properties->mutableCopy();
+ return static_cast<MutableStylePropertySet*>(m_properties.get());
}
void StyleKeyframe::setProperties(PassRefPtr<StylePropertySet> properties)
@@ -87,13 +96,6 @@ String StyleKeyframe::cssText() const
return result.toString();
}
-void StyleKeyframe::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
-{
- MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
- info.addMember(m_properties);
- info.addMember(m_key);
-}
-
WebKitCSSKeyframeRule::WebKitCSSKeyframeRule(StyleKeyframe* keyframe, WebKitCSSKeyframesRule* parent)
: CSSRule(0)
, m_keyframe(keyframe)
@@ -107,21 +109,13 @@ WebKitCSSKeyframeRule::~WebKitCSSKeyframeRule()
m_propertiesCSSOMWrapper->clearParentRule();
}
-CSSStyleDeclaration* WebKitCSSKeyframeRule::style() const
+CSSStyleDeclaration* WebKitCSSKeyframeRule::style()
{
if (!m_propertiesCSSOMWrapper)
- m_propertiesCSSOMWrapper = StyleRuleCSSStyleDeclaration::create(m_keyframe->mutableProperties(), const_cast<WebKitCSSKeyframeRule*>(this));
+ m_propertiesCSSOMWrapper = StyleRuleCSSStyleDeclaration::create(m_keyframe->mutableProperties(), this);
return m_propertiesCSSOMWrapper.get();
}
-void WebKitCSSKeyframeRule::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
-{
- MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
- CSSRule::reportMemoryUsage(memoryObjectInfo);
- info.addMember(m_keyframe);
- info.addMember(m_propertiesCSSOMWrapper);
-}
-
void WebKitCSSKeyframeRule::reattach(StyleRuleBase*)
{
// No need to reattach, the underlying data is shareable on mutation.