| OLD | NEW |
| 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/CSSParserImpl.h" | 5 #include "core/css/parser/CSSParserImpl.h" |
| 6 | 6 |
| 7 #include "core/css/CSSCustomIdentValue.h" | 7 #include "core/css/CSSCustomIdentValue.h" |
| 8 #include "core/css/CSSCustomPropertyDeclaration.h" | 8 #include "core/css/CSSCustomPropertyDeclaration.h" |
| 9 #include "core/css/CSSKeyframesRule.h" | 9 #include "core/css/CSSKeyframesRule.h" |
| 10 #include "core/css/CSSStyleSheet.h" | 10 #include "core/css/CSSStyleSheet.h" |
| (...skipping 930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 941 m_parsedProperties.size() != propertiesCount); | 941 m_parsedProperties.size() != propertiesCount); |
| 942 } | 942 } |
| 943 } | 943 } |
| 944 | 944 |
| 945 void CSSParserImpl::consumeVariableValue(CSSParserTokenRange range, | 945 void CSSParserImpl::consumeVariableValue(CSSParserTokenRange range, |
| 946 const AtomicString& variableName, | 946 const AtomicString& variableName, |
| 947 bool important, | 947 bool important, |
| 948 bool isAnimationTainted) { | 948 bool isAnimationTainted) { |
| 949 if (CSSCustomPropertyDeclaration* value = | 949 if (CSSCustomPropertyDeclaration* value = |
| 950 CSSVariableParser::parseDeclarationValue(variableName, range, | 950 CSSVariableParser::parseDeclarationValue(variableName, range, |
| 951 isAnimationTainted)) | 951 isAnimationTainted)) { |
| 952 m_parsedProperties.push_back( | 952 m_parsedProperties.push_back( |
| 953 CSSProperty(CSSPropertyVariable, *value, important)); | 953 CSSProperty(CSSPropertyVariable, *value, important)); |
| 954 m_context->count(m_context->mode(), CSSPropertyVariable); |
| 955 } |
| 954 } | 956 } |
| 955 | 957 |
| 956 void CSSParserImpl::consumeDeclarationValue(CSSParserTokenRange range, | 958 void CSSParserImpl::consumeDeclarationValue(CSSParserTokenRange range, |
| 957 CSSPropertyID unresolvedProperty, | 959 CSSPropertyID unresolvedProperty, |
| 958 bool important, | 960 bool important, |
| 959 StyleRule::RuleType ruleType) { | 961 StyleRule::RuleType ruleType) { |
| 960 CSSPropertyParser::parseValue(unresolvedProperty, important, range, m_context, | 962 CSSPropertyParser::parseValue(unresolvedProperty, important, range, m_context, |
| 961 m_parsedProperties, ruleType); | 963 m_parsedProperties, ruleType); |
| 962 } | 964 } |
| 963 | 965 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 979 else | 981 else |
| 980 return nullptr; // Parser error, invalid value in keyframe selector | 982 return nullptr; // Parser error, invalid value in keyframe selector |
| 981 if (range.atEnd()) | 983 if (range.atEnd()) |
| 982 return result; | 984 return result; |
| 983 if (range.consume().type() != CommaToken) | 985 if (range.consume().type() != CommaToken) |
| 984 return nullptr; // Parser error | 986 return nullptr; // Parser error |
| 985 } | 987 } |
| 986 } | 988 } |
| 987 | 989 |
| 988 } // namespace blink | 990 } // namespace blink |
| OLD | NEW |