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

Side by Side Diff: third_party/WebKit/Source/core/css/parser/CSSParser.cpp

Issue 2279133002: Remove CSSVariables RuntimeEnabledFeatures flag (status=stable) (Closed)
Patch Set: Created 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/css/parser/CSSParser.h" 5 #include "core/css/parser/CSSParser.h"
6 6
7 #include "core/css/CSSColorValue.h" 7 #include "core/css/CSSColorValue.h"
8 #include "core/css/CSSKeyframeRule.h" 8 #include "core/css/CSSKeyframeRule.h"
9 #include "core/css/StyleColor.h" 9 #include "core/css/StyleColor.h"
10 #include "core/css/StylePropertySet.h" 10 #include "core/css/StylePropertySet.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 CSSParserContext context(parserMode, nullptr); 71 CSSParserContext context(parserMode, nullptr);
72 if (styleSheet) { 72 if (styleSheet) {
73 context = styleSheet->parserContext(); 73 context = styleSheet->parserContext();
74 context.setMode(parserMode); 74 context.setMode(parserMode);
75 } 75 }
76 return parseValue(declaration, unresolvedProperty, string, important, contex t); 76 return parseValue(declaration, unresolvedProperty, string, important, contex t);
77 } 77 }
78 78
79 bool CSSParser::parseValueForCustomProperty(MutableStylePropertySet* declaration , const AtomicString& propertyName, const String& value, bool important, StyleSh eetContents* styleSheet) 79 bool CSSParser::parseValueForCustomProperty(MutableStylePropertySet* declaration , const AtomicString& propertyName, const String& value, bool important, StyleSh eetContents* styleSheet)
80 { 80 {
81 ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled() && CSSVariableParser::i sValidVariableName(propertyName)); 81 DCHECK(CSSVariableParser::isValidVariableName(propertyName));
82 if (value.isEmpty()) 82 if (value.isEmpty())
83 return false; 83 return false;
84 CSSParserMode parserMode = declaration->cssParserMode(); 84 CSSParserMode parserMode = declaration->cssParserMode();
85 CSSParserContext context(parserMode, nullptr); 85 CSSParserContext context(parserMode, nullptr);
86 if (styleSheet) { 86 if (styleSheet) {
87 context = styleSheet->parserContext(); 87 context = styleSheet->parserContext();
88 context.setMode(parserMode); 88 context.setMode(parserMode);
89 } 89 }
90 return CSSParserImpl::parseVariableValue(declaration, propertyName, value, i mportant, context); 90 return CSSParserImpl::parseVariableValue(declaration, propertyName, value, i mportant, context);
91 } 91 }
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 builder.append(" : "); 175 builder.append(" : ");
176 builder.append(propertyValue); 176 builder.append(propertyValue);
177 builder.append("; }"); 177 builder.append("; }");
178 StyleRuleBase* rule = parseRule(context, nullptr, builder.toString()); 178 StyleRuleBase* rule = parseRule(context, nullptr, builder.toString());
179 if (!rule || !rule->isFontFaceRule()) 179 if (!rule || !rule->isFontFaceRule())
180 return nullptr; 180 return nullptr;
181 return toStyleRuleFontFace(rule)->properties().getPropertyCSSValue(propertyI D); 181 return toStyleRuleFontFace(rule)->properties().getPropertyCSSValue(propertyI D);
182 } 182 }
183 183
184 } // namespace blink 184 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698