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