OLD | NEW |
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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 OwnPtr<Vector<double>> keys = CSSParser::parseKeyframeKeyList(key); | 77 OwnPtr<Vector<double>> keys = CSSParser::parseKeyframeKeyList(key); |
78 if (!keys) | 78 if (!keys) |
79 return -1; | 79 return -1; |
80 for (size_t i = m_keyframes.size(); i--; ) { | 80 for (size_t i = m_keyframes.size(); i--; ) { |
81 if (m_keyframes[i]->keys() == *keys) | 81 if (m_keyframes[i]->keys() == *keys) |
82 return i; | 82 return i; |
83 } | 83 } |
84 return -1; | 84 return -1; |
85 } | 85 } |
86 | 86 |
| 87 void StyleRuleKeyframes::purgeMemory() |
| 88 { |
| 89 for (StyleRuleKeyframe* keyframe : m_keyframes) |
| 90 keyframe->purgeMemory(); |
| 91 } |
| 92 |
87 DEFINE_TRACE_AFTER_DISPATCH(StyleRuleKeyframes) | 93 DEFINE_TRACE_AFTER_DISPATCH(StyleRuleKeyframes) |
88 { | 94 { |
89 visitor->trace(m_keyframes); | 95 visitor->trace(m_keyframes); |
90 StyleRuleBase::traceAfterDispatch(visitor); | 96 StyleRuleBase::traceAfterDispatch(visitor); |
91 } | 97 } |
92 | 98 |
93 CSSKeyframesRule::CSSKeyframesRule(StyleRuleKeyframes* keyframesRule, CSSStyleSh
eet* parent) | 99 CSSKeyframesRule::CSSKeyframesRule(StyleRuleKeyframes* keyframesRule, CSSStyleSh
eet* parent) |
94 : CSSRule(parent) | 100 : CSSRule(parent) |
95 , m_keyframesRule(keyframesRule) | 101 , m_keyframesRule(keyframesRule) |
96 , m_childRuleCSSOMWrappers(keyframesRule->keyframes().size()) | 102 , m_childRuleCSSOMWrappers(keyframesRule->keyframes().size()) |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 { | 224 { |
219 CSSRule::trace(visitor); | 225 CSSRule::trace(visitor); |
220 #if ENABLE(OILPAN) | 226 #if ENABLE(OILPAN) |
221 visitor->trace(m_childRuleCSSOMWrappers); | 227 visitor->trace(m_childRuleCSSOMWrappers); |
222 #endif | 228 #endif |
223 visitor->trace(m_keyframesRule); | 229 visitor->trace(m_keyframesRule); |
224 visitor->trace(m_ruleListCSSOMWrapper); | 230 visitor->trace(m_ruleListCSSOMWrapper); |
225 } | 231 } |
226 | 232 |
227 } // namespace blink | 233 } // namespace blink |
OLD | NEW |