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

Side by Side Diff: Source/core/css/WebKitCSSKeyframesRule.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/WebKitCSSKeyframesRule.h ('k') | Source/core/css/WebKitCSSMixFunctionValue.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 14 matching lines...) Expand all
25 25
26 #include "config.h" 26 #include "config.h"
27 #include "WebKitCSSKeyframesRule.h" 27 #include "WebKitCSSKeyframesRule.h"
28 28
29 #include "CSSParser.h" 29 #include "CSSParser.h"
30 #include "CSSRuleList.h" 30 #include "CSSRuleList.h"
31 #include "CSSStyleSheet.h" 31 #include "CSSStyleSheet.h"
32 #include "StylePropertySet.h" 32 #include "StylePropertySet.h"
33 #include "StyleSheet.h" 33 #include "StyleSheet.h"
34 #include "WebKitCSSKeyframeRule.h" 34 #include "WebKitCSSKeyframeRule.h"
35 #include <wtf/MemoryInstrumentationVector.h>
36 #include <wtf/text/StringBuilder.h> 35 #include <wtf/text/StringBuilder.h>
37 36
38 namespace WebCore { 37 namespace WebCore {
39 38
40 StyleRuleKeyframes::StyleRuleKeyframes() 39 StyleRuleKeyframes::StyleRuleKeyframes()
41 : StyleRuleBase(Keyframes, 0) 40 : StyleRuleBase(Keyframes, 0)
42 { 41 {
43 } 42 }
44 43
45 StyleRuleKeyframes::StyleRuleKeyframes(const StyleRuleKeyframes& o) 44 StyleRuleKeyframes::StyleRuleKeyframes(const StyleRuleKeyframes& o)
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 else 79 else
81 percentageString = key; 80 percentageString = key;
82 81
83 for (unsigned i = 0; i < m_keyframes.size(); ++i) { 82 for (unsigned i = 0; i < m_keyframes.size(); ++i) {
84 if (m_keyframes[i]->keyText() == percentageString) 83 if (m_keyframes[i]->keyText() == percentageString)
85 return i; 84 return i;
86 } 85 }
87 return -1; 86 return -1;
88 } 87 }
89 88
90 void StyleRuleKeyframes::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObj ectInfo) const
91 {
92 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
93 info.addMember(m_keyframes, "keyframes");
94 info.addMember(m_name, "name");
95 }
96
97 WebKitCSSKeyframesRule::WebKitCSSKeyframesRule(StyleRuleKeyframes* keyframesRule , CSSStyleSheet* parent) 89 WebKitCSSKeyframesRule::WebKitCSSKeyframesRule(StyleRuleKeyframes* keyframesRule , CSSStyleSheet* parent)
98 : CSSRule(parent) 90 : CSSRule(parent)
99 , m_keyframesRule(keyframesRule) 91 , m_keyframesRule(keyframesRule)
100 , m_childRuleCSSOMWrappers(keyframesRule->keyframes().size()) 92 , m_childRuleCSSOMWrappers(keyframesRule->keyframes().size())
101 { 93 {
102 } 94 }
103 95
104 WebKitCSSKeyframesRule::~WebKitCSSKeyframesRule() 96 WebKitCSSKeyframesRule::~WebKitCSSKeyframesRule()
105 { 97 {
106 ASSERT(m_childRuleCSSOMWrappers.size() == m_keyframesRule->keyframes().size( )); 98 ASSERT(m_childRuleCSSOMWrappers.size() == m_keyframesRule->keyframes().size( ));
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 return m_ruleListCSSOMWrapper.get(); 192 return m_ruleListCSSOMWrapper.get();
201 } 193 }
202 194
203 void WebKitCSSKeyframesRule::reattach(StyleRuleBase* rule) 195 void WebKitCSSKeyframesRule::reattach(StyleRuleBase* rule)
204 { 196 {
205 ASSERT(rule); 197 ASSERT(rule);
206 ASSERT_WITH_SECURITY_IMPLICATION(rule->isKeyframesRule()); 198 ASSERT_WITH_SECURITY_IMPLICATION(rule->isKeyframesRule());
207 m_keyframesRule = static_cast<StyleRuleKeyframes*>(rule); 199 m_keyframesRule = static_cast<StyleRuleKeyframes*>(rule);
208 } 200 }
209 201
210 void WebKitCSSKeyframesRule::reportMemoryUsage(MemoryObjectInfo* memoryObjectInf o) const
211 {
212 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
213 CSSRule::reportMemoryUsage(memoryObjectInfo);
214 info.addMember(m_keyframesRule, "keyframesRule");
215 info.addMember(m_childRuleCSSOMWrappers, "childRuleCSSOMWrappers");
216 info.addMember(m_ruleListCSSOMWrapper, "ruleListCSSOMWrapper");
217 }
218
219 } // namespace WebCore 202 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/WebKitCSSKeyframesRule.h ('k') | Source/core/css/WebKitCSSMixFunctionValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698