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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 CSSStyleSheet::RuleMutationScope mutationScope(this); | 92 CSSStyleSheet::RuleMutationScope mutationScope(this); |
93 | 93 |
94 m_keyframesRule->setName(name); | 94 m_keyframesRule->setName(name); |
95 } | 95 } |
96 | 96 |
97 void CSSKeyframesRule::appendRule(const String& ruleText) { | 97 void CSSKeyframesRule::appendRule(const String& ruleText) { |
98 ASSERT(m_childRuleCSSOMWrappers.size() == | 98 ASSERT(m_childRuleCSSOMWrappers.size() == |
99 m_keyframesRule->keyframes().size()); | 99 m_keyframesRule->keyframes().size()); |
100 | 100 |
101 CSSStyleSheet* styleSheet = parentStyleSheet(); | 101 CSSStyleSheet* styleSheet = parentStyleSheet(); |
102 CSSParserContext context(parserContext(), UseCounter::getFrom(styleSheet)); | 102 CSSParserContext* context = |
| 103 CSSParserContext::create(parserContext(), styleSheet); |
103 StyleRuleKeyframe* keyframe = CSSParser::parseKeyframeRule(context, ruleText); | 104 StyleRuleKeyframe* keyframe = CSSParser::parseKeyframeRule(context, ruleText); |
104 if (!keyframe) | 105 if (!keyframe) |
105 return; | 106 return; |
106 | 107 |
107 CSSStyleSheet::RuleMutationScope mutationScope(this); | 108 CSSStyleSheet::RuleMutationScope mutationScope(this); |
108 | 109 |
109 m_keyframesRule->wrapperAppendKeyframe(keyframe); | 110 m_keyframesRule->wrapperAppendKeyframe(keyframe); |
110 | 111 |
111 m_childRuleCSSOMWrappers.grow(length()); | 112 m_childRuleCSSOMWrappers.grow(length()); |
112 } | 113 } |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 } | 191 } |
191 | 192 |
192 DEFINE_TRACE(CSSKeyframesRule) { | 193 DEFINE_TRACE(CSSKeyframesRule) { |
193 CSSRule::trace(visitor); | 194 CSSRule::trace(visitor); |
194 visitor->trace(m_childRuleCSSOMWrappers); | 195 visitor->trace(m_childRuleCSSOMWrappers); |
195 visitor->trace(m_keyframesRule); | 196 visitor->trace(m_keyframesRule); |
196 visitor->trace(m_ruleListCSSOMWrapper); | 197 visitor->trace(m_ruleListCSSOMWrapper); |
197 } | 198 } |
198 | 199 |
199 } // namespace blink | 200 } // namespace blink |
OLD | NEW |