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/cssom/CSSUnparsedValue.h" | 5 #include "core/css/cssom/CSSUnparsedValue.h" |
6 | 6 |
7 #include "core/css/cssom/CSSStyleVariableReferenceValue.h" | 7 #include "core/css/cssom/CSSStyleVariableReferenceValue.h" |
8 #include "core/css/parser/CSSTokenizer.h" | 8 #include "core/css/parser/CSSTokenizer.h" |
9 #include "platform/wtf/text/StringBuilder.h" | 9 #include "platform/wtf/text/StringBuilder.h" |
10 | 10 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
80 if (fragments_[i].isString()) { | 80 if (fragments_[i].isString()) { |
81 tokens.Append(fragments_[i].getAsString()); | 81 tokens.Append(fragments_[i].getAsString()); |
82 } else if (fragments_[i].isCSSVariableReferenceValue()) { | 82 } else if (fragments_[i].isCSSVariableReferenceValue()) { |
83 tokens.Append(fragments_[i].getAsCSSVariableReferenceValue()->variable()); | 83 tokens.Append(fragments_[i].getAsCSSVariableReferenceValue()->variable()); |
84 } else { | 84 } else { |
85 NOTREACHED(); | 85 NOTREACHED(); |
86 } | 86 } |
87 } | 87 } |
88 | 88 |
89 CSSTokenizer tokenizer(tokens.ToString()); | 89 CSSTokenizer tokenizer(tokens.ToString()); |
90 return CSSVariableReferenceValue::Create(CSSVariableData::Create( | 90 return CSSVariableReferenceValue::Create( |
91 tokenizer.TokenRange(), false /* isAnimationTainted */, | 91 CSSVariableData::Create(tokenizer.TokenRange(), |
92 true /* needsVariableResolution */)); | 92 false /* isAnimationTainted */, |
93 true /* needsVariableResolution */), | |
94 *StrictCSSParserContext()); | |
Timothy Loh
2017/05/11 04:56:18
Add a TODO, this probably needs a real context her
| |
93 } | 95 } |
94 | 96 |
95 } // namespace blink | 97 } // namespace blink |
OLD | NEW |