OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/CSSSyntaxDescriptor.h" | 5 #include "core/css/CSSSyntaxDescriptor.h" |
6 | 6 |
7 #include "core/animation/CSSColorInterpolationType.h" | 7 #include "core/animation/CSSColorInterpolationType.h" |
8 #include "core/animation/CSSLengthInterpolationType.h" | 8 #include "core/animation/CSSLengthInterpolationType.h" |
9 #include "core/animation/CSSValueInterpolationType.h" | 9 #include "core/animation/CSSValueInterpolationType.h" |
10 #include "core/css/CSSCustomPropertyDeclaration.h" | 10 #include "core/css/CSSCustomPropertyDeclaration.h" |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 if (!range.AtEnd()) | 196 if (!range.AtEnd()) |
197 return nullptr; | 197 return nullptr; |
198 return result; | 198 return result; |
199 } | 199 } |
200 | 200 |
201 const CSSValue* CSSSyntaxDescriptor::Parse(CSSParserTokenRange range, | 201 const CSSValue* CSSSyntaxDescriptor::Parse(CSSParserTokenRange range, |
202 const CSSParserContext* context, | 202 const CSSParserContext* context, |
203 bool is_animation_tainted) const { | 203 bool is_animation_tainted) const { |
204 if (IsTokenStream()) { | 204 if (IsTokenStream()) { |
205 return CSSVariableParser::ParseRegisteredPropertyValue( | 205 return CSSVariableParser::ParseRegisteredPropertyValue( |
206 range, false, is_animation_tainted); | 206 range, *context, false, is_animation_tainted); |
207 } | 207 } |
208 range.ConsumeWhitespace(); | 208 range.ConsumeWhitespace(); |
209 for (const CSSSyntaxComponent& component : syntax_components_) { | 209 for (const CSSSyntaxComponent& component : syntax_components_) { |
210 if (const CSSValue* result = | 210 if (const CSSValue* result = |
211 ConsumeSyntaxComponent(component, range, context)) | 211 ConsumeSyntaxComponent(component, range, context)) |
212 return result; | 212 return result; |
213 } | 213 } |
214 return CSSVariableParser::ParseRegisteredPropertyValue(range, true, | 214 return CSSVariableParser::ParseRegisteredPropertyValue(range, *context, true, |
215 is_animation_tainted); | 215 is_animation_tainted); |
216 } | 216 } |
217 | 217 |
218 } // namespace blink | 218 } // namespace blink |
OLD | NEW |