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

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

Issue 1318933002: Revert of Deprecate 'intrinsic' and 'min-intrinsic' CSS keywords (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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"
34 #include "core/frame/UseCounter.h" 33 #include "core/frame/UseCounter.h"
35 #include "wtf/text/StringBuilder.h" 34 #include "wtf/text/StringBuilder.h"
36 35
37 namespace blink { 36 namespace blink {
38 37
39 StyleRuleKeyframes::StyleRuleKeyframes() 38 StyleRuleKeyframes::StyleRuleKeyframes()
40 : StyleRuleBase(Keyframes) 39 : StyleRuleBase(Keyframes)
41 , m_version(0) 40 , m_version(0)
42 { 41 {
43 } 42 }
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 CSSStyleSheet::RuleMutationScope mutationScope(this); 115 CSSStyleSheet::RuleMutationScope mutationScope(this);
117 116
118 m_keyframesRule->setName(name); 117 m_keyframesRule->setName(name);
119 } 118 }
120 119
121 void CSSKeyframesRule::appendRule(const String& ruleText) 120 void CSSKeyframesRule::appendRule(const String& ruleText)
122 { 121 {
123 ASSERT(m_childRuleCSSOMWrappers.size() == m_keyframesRule->keyframes().size( )); 122 ASSERT(m_childRuleCSSOMWrappers.size() == m_keyframesRule->keyframes().size( ));
124 123
125 CSSStyleSheet* styleSheet = parentStyleSheet(); 124 CSSStyleSheet* styleSheet = parentStyleSheet();
126 Document* doc = styleSheet ? styleSheet->ownerDocument() : 0; 125 CSSParserContext context(parserContext(), UseCounter::getFrom(styleSheet));
127 CSSParserContext context(parserContext(), doc ? doc->frame() : 0, UseCounter ::getFrom(styleSheet));
128 RefPtrWillBeRawPtr<StyleRuleKeyframe> keyframe = CSSParser::parseKeyframeRul e(context, ruleText); 126 RefPtrWillBeRawPtr<StyleRuleKeyframe> keyframe = CSSParser::parseKeyframeRul e(context, ruleText);
129 if (!keyframe) 127 if (!keyframe)
130 return; 128 return;
131 129
132 CSSStyleSheet::RuleMutationScope mutationScope(this); 130 CSSStyleSheet::RuleMutationScope mutationScope(this);
133 131
134 m_keyframesRule->wrapperAppendKeyframe(keyframe); 132 m_keyframesRule->wrapperAppendKeyframe(keyframe);
135 133
136 m_childRuleCSSOMWrappers.grow(length()); 134 m_childRuleCSSOMWrappers.grow(length());
137 } 135 }
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 { 219 {
222 CSSRule::trace(visitor); 220 CSSRule::trace(visitor);
223 #if ENABLE(OILPAN) 221 #if ENABLE(OILPAN)
224 visitor->trace(m_childRuleCSSOMWrappers); 222 visitor->trace(m_childRuleCSSOMWrappers);
225 #endif 223 #endif
226 visitor->trace(m_keyframesRule); 224 visitor->trace(m_keyframesRule);
227 visitor->trace(m_ruleListCSSOMWrapper); 225 visitor->trace(m_ruleListCSSOMWrapper);
228 } 226 }
229 227
230 } // namespace blink 228 } // 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