| 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 #ifndef CSSSyntaxDescriptor_h | 5 #ifndef CSSSyntaxDescriptor_h |
| 6 #define CSSSyntaxDescriptor_h | 6 #define CSSSyntaxDescriptor_h |
| 7 | 7 |
| 8 #include "core/animation/InterpolationTypesMap.h" |
| 8 #include "core/css/parser/CSSParserTokenRange.h" | 9 #include "core/css/parser/CSSParserTokenRange.h" |
| 9 | 10 |
| 10 namespace blink { | 11 namespace blink { |
| 11 | 12 |
| 12 class CSSValue; | 13 class CSSValue; |
| 13 | 14 |
| 14 enum class CSSSyntaxType { | 15 enum class CSSSyntaxType { |
| 15 TokenStream, | 16 TokenStream, |
| 16 Ident, | 17 Ident, |
| 17 Length, | 18 Length, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 42 public: | 43 public: |
| 43 CSSSyntaxDescriptor(String syntax); | 44 CSSSyntaxDescriptor(String syntax); |
| 44 | 45 |
| 45 const CSSValue* parse(CSSParserTokenRange, bool isAnimationTainted) const; | 46 const CSSValue* parse(CSSParserTokenRange, bool isAnimationTainted) const; |
| 46 bool isValid() const { return !m_syntaxComponents.isEmpty(); } | 47 bool isValid() const { return !m_syntaxComponents.isEmpty(); } |
| 47 bool isTokenStream() const { | 48 bool isTokenStream() const { |
| 48 return m_syntaxComponents.size() == 1 && | 49 return m_syntaxComponents.size() == 1 && |
| 49 m_syntaxComponents[0].m_type == CSSSyntaxType::TokenStream; | 50 m_syntaxComponents[0].m_type == CSSSyntaxType::TokenStream; |
| 50 } | 51 } |
| 51 | 52 |
| 53 InterpolationTypes createInterpolationTypes( |
| 54 const AtomicString& propertyName) const; |
| 55 |
| 52 private: | 56 private: |
| 53 Vector<CSSSyntaxComponent> m_syntaxComponents; | 57 Vector<CSSSyntaxComponent> m_syntaxComponents; |
| 54 }; | 58 }; |
| 55 | 59 |
| 56 } // namespace blink | 60 } // namespace blink |
| 57 | 61 |
| 58 #endif // CSSSyntaxDescriptor_h | 62 #endif // CSSSyntaxDescriptor_h |
| OLD | NEW |