| OLD | NEW |
| 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/CSSVariableData.h" | 5 #include "core/css/CSSVariableData.h" |
| 6 | 6 |
| 7 #include "core/css/CSSSyntaxDescriptor.h" | 7 #include "core/css/CSSSyntaxDescriptor.h" |
| 8 #include "core/css/parser/CSSParser.h" | 8 #include "core/css/parser/CSSParser.h" |
| 9 #include "core/css/parser/CSSParserTokenRange.h" | 9 #include "core/css/parser/CSSParserTokenRange.h" |
| 10 #include "wtf/text/StringBuilder.h" | 10 #include "platform/wtf/text/StringBuilder.h" |
| 11 #include "wtf/text/StringView.h" | 11 #include "platform/wtf/text/StringView.h" |
| 12 | 12 |
| 13 namespace blink { | 13 namespace blink { |
| 14 | 14 |
| 15 StylePropertySet* CSSVariableData::PropertySet() { | 15 StylePropertySet* CSSVariableData::PropertySet() { |
| 16 DCHECK(!needs_variable_resolution_); | 16 DCHECK(!needs_variable_resolution_); |
| 17 if (!cached_property_set_) { | 17 if (!cached_property_set_) { |
| 18 property_set_ = CSSParser::ParseCustomPropertySet(tokens_); | 18 property_set_ = CSSParser::ParseCustomPropertySet(tokens_); |
| 19 cached_property_set_ = true; | 19 cached_property_set_ = true; |
| 20 } | 20 } |
| 21 return property_set_.Get(); | 21 return property_set_.Get(); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 const CSSValue* CSSVariableData::ParseForSyntax( | 72 const CSSValue* CSSVariableData::ParseForSyntax( |
| 73 const CSSSyntaxDescriptor& syntax) const { | 73 const CSSSyntaxDescriptor& syntax) const { |
| 74 DCHECK(!NeedsVariableResolution()); | 74 DCHECK(!NeedsVariableResolution()); |
| 75 // TODO(timloh): This probably needs a proper parser context for | 75 // TODO(timloh): This probably needs a proper parser context for |
| 76 // relative URL resolution. | 76 // relative URL resolution. |
| 77 return syntax.Parse(TokenRange(), StrictCSSParserContext(), | 77 return syntax.Parse(TokenRange(), StrictCSSParserContext(), |
| 78 is_animation_tainted_); | 78 is_animation_tainted_); |
| 79 } | 79 } |
| 80 | 80 |
| 81 } // namespace blink | 81 } // namespace blink |
| OLD | NEW |