Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(545)

Side by Side Diff: Source/core/css/WebKitCSSKeyframeRule.cpp

Issue 13973026: remove memoryinstrumentation Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove the rest part of MemoryInstrumentation Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/css/WebKitCSSKeyframeRule.h ('k') | Source/core/css/WebKitCSSKeyframesRule.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 result.append(keyText()); 89 result.append(keyText());
90 result.appendLiteral(" { "); 90 result.appendLiteral(" { ");
91 String decls = m_properties->asText(); 91 String decls = m_properties->asText();
92 result.append(decls); 92 result.append(decls);
93 if (!decls.isEmpty()) 93 if (!decls.isEmpty())
94 result.append(' '); 94 result.append(' ');
95 result.append('}'); 95 result.append('}');
96 return result.toString(); 96 return result.toString();
97 } 97 }
98 98
99 void StyleKeyframe::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
100 {
101 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
102 info.addMember(m_properties, "properties");
103 info.addMember(m_key, "key");
104 }
105
106 WebKitCSSKeyframeRule::WebKitCSSKeyframeRule(StyleKeyframe* keyframe, WebKitCSSK eyframesRule* parent) 99 WebKitCSSKeyframeRule::WebKitCSSKeyframeRule(StyleKeyframe* keyframe, WebKitCSSK eyframesRule* parent)
107 : CSSRule(0) 100 : CSSRule(0)
108 , m_keyframe(keyframe) 101 , m_keyframe(keyframe)
109 { 102 {
110 setParentRule(parent); 103 setParentRule(parent);
111 } 104 }
112 105
113 WebKitCSSKeyframeRule::~WebKitCSSKeyframeRule() 106 WebKitCSSKeyframeRule::~WebKitCSSKeyframeRule()
114 { 107 {
115 if (m_propertiesCSSOMWrapper) 108 if (m_propertiesCSSOMWrapper)
116 m_propertiesCSSOMWrapper->clearParentRule(); 109 m_propertiesCSSOMWrapper->clearParentRule();
117 } 110 }
118 111
119 CSSStyleDeclaration* WebKitCSSKeyframeRule::style() const 112 CSSStyleDeclaration* WebKitCSSKeyframeRule::style() const
120 { 113 {
121 if (!m_propertiesCSSOMWrapper) 114 if (!m_propertiesCSSOMWrapper)
122 m_propertiesCSSOMWrapper = StyleRuleCSSStyleDeclaration::create(m_keyfra me->mutableProperties(), const_cast<WebKitCSSKeyframeRule*>(this)); 115 m_propertiesCSSOMWrapper = StyleRuleCSSStyleDeclaration::create(m_keyfra me->mutableProperties(), const_cast<WebKitCSSKeyframeRule*>(this));
123 return m_propertiesCSSOMWrapper.get(); 116 return m_propertiesCSSOMWrapper.get();
124 } 117 }
125 118
126 void WebKitCSSKeyframeRule::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo ) const
127 {
128 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
129 CSSRule::reportMemoryUsage(memoryObjectInfo);
130 info.addMember(m_keyframe, "keyframe");
131 info.addMember(m_propertiesCSSOMWrapper, "propertiesCSSOMWrapper");
132 }
133
134 void WebKitCSSKeyframeRule::reattach(StyleRuleBase*) 119 void WebKitCSSKeyframeRule::reattach(StyleRuleBase*)
135 { 120 {
136 // No need to reattach, the underlying data is shareable on mutation. 121 // No need to reattach, the underlying data is shareable on mutation.
137 ASSERT_NOT_REACHED(); 122 ASSERT_NOT_REACHED();
138 } 123 }
139 124
140 } // namespace WebCore 125 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/WebKitCSSKeyframeRule.h ('k') | Source/core/css/WebKitCSSKeyframesRule.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698