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

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

Issue 1883983003: Remove CSSParserValues (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/CSSVariableParser.h" 5 #include "core/css/parser/CSSVariableParser.h"
6 6
7 #include "core/css/CSSCustomPropertyDeclaration.h" 7 #include "core/css/CSSCustomPropertyDeclaration.h"
8 #include "core/css/parser/CSSParserTokenRange.h" 8 #include "core/css/parser/CSSParserTokenRange.h"
9 #include "core/css/parser/CSSParserValues.h"
10 9
11 namespace blink { 10 namespace blink {
12 11
13 bool CSSVariableParser::isValidVariableName(const CSSParserToken& token) 12 bool CSSVariableParser::isValidVariableName(const CSSParserToken& token)
14 { 13 {
15 if (token.type() != IdentToken) 14 if (token.type() != IdentToken)
16 return false; 15 return false;
17 16
18 CSSParserString value = token.value(); 17 CSSParserString value = token.value();
19 return value.length() >= 2 && value[0] == '-' && value[1] == '-'; 18 return value.length() >= 2 && value[0] == '-' && value[1] == '-';
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 CSSValueID type = classifyVariableRange(range, hasReferences, hasAtApplyRule ); 131 CSSValueID type = classifyVariableRange(range, hasReferences, hasAtApplyRule );
133 132
134 if (type == CSSValueInvalid) 133 if (type == CSSValueInvalid)
135 return nullptr; 134 return nullptr;
136 if (type == CSSValueInternalVariableValue) 135 if (type == CSSValueInternalVariableValue)
137 return CSSCustomPropertyDeclaration::create(variableName, CSSVariableDat a::create(range, hasReferences || hasAtApplyRule)); 136 return CSSCustomPropertyDeclaration::create(variableName, CSSVariableDat a::create(range, hasReferences || hasAtApplyRule));
138 return CSSCustomPropertyDeclaration::create(variableName, type); 137 return CSSCustomPropertyDeclaration::create(variableName, type);
139 } 138 }
140 139
141 } // namespace blink 140 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698