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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 } | 179 } |
180 | 180 |
181 CSSKeyframeRule* CSSKeyframesRule::item(unsigned index) const | 181 CSSKeyframeRule* CSSKeyframesRule::item(unsigned index) const |
182 { | 182 { |
183 if (index >= length()) | 183 if (index >= length()) |
184 return 0; | 184 return 0; |
185 | 185 |
186 ASSERT(m_childRuleCSSOMWrappers.size() == m_keyframesRule->keyframes().size(
)); | 186 ASSERT(m_childRuleCSSOMWrappers.size() == m_keyframesRule->keyframes().size(
)); |
187 RefPtrWillBeMember<CSSKeyframeRule>& rule = m_childRuleCSSOMWrappers[index]; | 187 RefPtrWillBeMember<CSSKeyframeRule>& rule = m_childRuleCSSOMWrappers[index]; |
188 if (!rule) | 188 if (!rule) |
189 rule = adoptRefWillBeRefCountedGarbageCollected(new CSSKeyframeRule(m_ke
yframesRule->keyframes()[index].get(), const_cast<CSSKeyframesRule*>(this))); | 189 rule = adoptRefWillBeNoop(new CSSKeyframeRule(m_keyframesRule->keyframes
()[index].get(), const_cast<CSSKeyframesRule*>(this))); |
190 | 190 |
191 return rule.get(); | 191 return rule.get(); |
192 } | 192 } |
193 | 193 |
194 CSSRuleList* CSSKeyframesRule::cssRules() | 194 CSSRuleList* CSSKeyframesRule::cssRules() |
195 { | 195 { |
196 if (!m_ruleListCSSOMWrapper) | 196 if (!m_ruleListCSSOMWrapper) |
197 m_ruleListCSSOMWrapper = adoptPtr(new LiveCSSRuleList<CSSKeyframesRule>(
this)); | 197 m_ruleListCSSOMWrapper = LiveCSSRuleList<CSSKeyframesRule>::create(this)
; |
198 return m_ruleListCSSOMWrapper.get(); | 198 return m_ruleListCSSOMWrapper.get(); |
199 } | 199 } |
200 | 200 |
201 void CSSKeyframesRule::reattach(StyleRuleBase* rule) | 201 void CSSKeyframesRule::reattach(StyleRuleBase* rule) |
202 { | 202 { |
203 ASSERT(rule); | 203 ASSERT(rule); |
204 m_keyframesRule = toStyleRuleKeyframes(rule); | 204 m_keyframesRule = toStyleRuleKeyframes(rule); |
205 } | 205 } |
206 | 206 |
207 void CSSKeyframesRule::trace(Visitor* visitor) | 207 void CSSKeyframesRule::trace(Visitor* visitor) |
208 { | 208 { |
209 CSSRule::trace(visitor); | 209 CSSRule::trace(visitor); |
210 #if ENABLE(OILPAN) | 210 #if ENABLE(OILPAN) |
211 visitor->trace(m_childRuleCSSOMWrappers); | 211 visitor->trace(m_childRuleCSSOMWrappers); |
212 #endif | 212 #endif |
213 visitor->trace(m_keyframesRule); | 213 visitor->trace(m_keyframesRule); |
| 214 visitor->trace(m_ruleListCSSOMWrapper); |
214 } | 215 } |
215 | 216 |
216 } // namespace WebCore | 217 } // namespace WebCore |
OLD | NEW |