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

Side by Side Diff: Source/core/css/CSSKeyframesRule.cpp

Issue 1314923005: Deprecate 'intrinsic' and 'min-intrinsic' CSS keywords (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: a couple more tests... Created 5 years, 3 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/CSSGroupingRule.cpp ('k') | Source/core/css/CSSPageRule.cpp » ('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 12 matching lines...) Expand all
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #include "config.h" 26 #include "config.h"
27 #include "core/css/CSSKeyframesRule.h" 27 #include "core/css/CSSKeyframesRule.h"
28 28
29 #include "core/css/CSSKeyframeRule.h" 29 #include "core/css/CSSKeyframeRule.h"
30 #include "core/css/CSSRuleList.h" 30 #include "core/css/CSSRuleList.h"
31 #include "core/css/CSSStyleSheet.h" 31 #include "core/css/CSSStyleSheet.h"
32 #include "core/css/parser/CSSParser.h" 32 #include "core/css/parser/CSSParser.h"
33 #include "core/dom/Document.h"
33 #include "core/frame/UseCounter.h" 34 #include "core/frame/UseCounter.h"
34 #include "wtf/text/StringBuilder.h" 35 #include "wtf/text/StringBuilder.h"
35 36
36 namespace blink { 37 namespace blink {
37 38
38 StyleRuleKeyframes::StyleRuleKeyframes() 39 StyleRuleKeyframes::StyleRuleKeyframes()
39 : StyleRuleBase(Keyframes) 40 : StyleRuleBase(Keyframes)
40 , m_version(0) 41 , m_version(0)
41 { 42 {
42 } 43 }
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 CSSStyleSheet::RuleMutationScope mutationScope(this); 116 CSSStyleSheet::RuleMutationScope mutationScope(this);
116 117
117 m_keyframesRule->setName(name); 118 m_keyframesRule->setName(name);
118 } 119 }
119 120
120 void CSSKeyframesRule::appendRule(const String& ruleText) 121 void CSSKeyframesRule::appendRule(const String& ruleText)
121 { 122 {
122 ASSERT(m_childRuleCSSOMWrappers.size() == m_keyframesRule->keyframes().size( )); 123 ASSERT(m_childRuleCSSOMWrappers.size() == m_keyframesRule->keyframes().size( ));
123 124
124 CSSStyleSheet* styleSheet = parentStyleSheet(); 125 CSSStyleSheet* styleSheet = parentStyleSheet();
125 CSSParserContext context(parserContext(), UseCounter::getFrom(styleSheet)); 126 Document* doc = styleSheet ? styleSheet->ownerDocument() : 0;
127 CSSParserContext context(parserContext(), doc ? doc->frame() : 0, UseCounter ::getFrom(styleSheet));
126 RefPtrWillBeRawPtr<StyleRuleKeyframe> keyframe = CSSParser::parseKeyframeRul e(context, ruleText); 128 RefPtrWillBeRawPtr<StyleRuleKeyframe> keyframe = CSSParser::parseKeyframeRul e(context, ruleText);
127 if (!keyframe) 129 if (!keyframe)
128 return; 130 return;
129 131
130 CSSStyleSheet::RuleMutationScope mutationScope(this); 132 CSSStyleSheet::RuleMutationScope mutationScope(this);
131 133
132 m_keyframesRule->wrapperAppendKeyframe(keyframe); 134 m_keyframesRule->wrapperAppendKeyframe(keyframe);
133 135
134 m_childRuleCSSOMWrappers.grow(length()); 136 m_childRuleCSSOMWrappers.grow(length());
135 } 137 }
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 { 221 {
220 CSSRule::trace(visitor); 222 CSSRule::trace(visitor);
221 #if ENABLE(OILPAN) 223 #if ENABLE(OILPAN)
222 visitor->trace(m_childRuleCSSOMWrappers); 224 visitor->trace(m_childRuleCSSOMWrappers);
223 #endif 225 #endif
224 visitor->trace(m_keyframesRule); 226 visitor->trace(m_keyframesRule);
225 visitor->trace(m_ruleListCSSOMWrapper); 227 visitor->trace(m_ruleListCSSOMWrapper);
226 } 228 }
227 229
228 } // namespace blink 230 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/CSSGroupingRule.cpp ('k') | Source/core/css/CSSPageRule.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698