| 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 "wtf/text/StringBuilder.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 stringBuilder.append(token.value()); | 54 stringBuilder.append(token.value()); |
| 55 } | 55 } |
| 56 m_backingString = stringBuilder.toString(); | 56 m_backingString = stringBuilder.toString(); |
| 57 if (m_backingString.is8Bit()) | 57 if (m_backingString.is8Bit()) |
| 58 updateTokens<LChar>(range); | 58 updateTokens<LChar>(range); |
| 59 else | 59 else |
| 60 updateTokens<UChar>(range); | 60 updateTokens<UChar>(range); |
| 61 } | 61 } |
| 62 | 62 |
| 63 CSSVariableData::CSSVariableData(const CSSParserTokenRange& range, | 63 CSSVariableData::CSSVariableData(const CSSParserTokenRange& range, |
| 64 bool isAnimationTainted, |
| 64 bool needsVariableResolution) | 65 bool needsVariableResolution) |
| 65 : m_needsVariableResolution(needsVariableResolution), | 66 : m_isAnimationTainted(isAnimationTainted), |
| 67 m_needsVariableResolution(needsVariableResolution), |
| 66 m_cachedPropertySet(false) { | 68 m_cachedPropertySet(false) { |
| 67 ASSERT(!range.atEnd()); | 69 ASSERT(!range.atEnd()); |
| 68 consumeAndUpdateTokens(range); | 70 consumeAndUpdateTokens(range); |
| 69 } | 71 } |
| 70 | 72 |
| 71 const CSSValue* CSSVariableData::parseForSyntax( | 73 const CSSValue* CSSVariableData::parseForSyntax( |
| 72 const CSSSyntaxDescriptor& syntax) const { | 74 const CSSSyntaxDescriptor& syntax) const { |
| 73 DCHECK(!needsVariableResolution()); | 75 DCHECK(!needsVariableResolution()); |
| 74 return syntax.parse(tokenRange()); | 76 return syntax.parse(tokenRange(), m_isAnimationTainted); |
| 75 } | 77 } |
| 76 | 78 |
| 77 } // namespace blink | 79 } // namespace blink |
| OLD | NEW |