| 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 CSSUnparsedValue_h | 5 #ifndef CSSUnparsedValue_h |
| 6 #define CSSUnparsedValue_h | 6 #define CSSUnparsedValue_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/Iterable.h" | 8 #include "bindings/core/v8/Iterable.h" |
| 9 #include "bindings/core/v8/StringOrCSSVariableReferenceValue.h" | 9 #include "bindings/core/v8/StringOrCSSVariableReferenceValue.h" |
| 10 #include "core/css/CSSVariableReferenceValue.h" | 10 #include "core/css/CSSVariableReferenceValue.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 } | 43 } |
| 44 | 44 |
| 45 protected: | 45 protected: |
| 46 CSSUnparsedValue( | 46 CSSUnparsedValue( |
| 47 const HeapVector<StringOrCSSVariableReferenceValue>& fragments) | 47 const HeapVector<StringOrCSSVariableReferenceValue>& fragments) |
| 48 : CSSStyleValue(), m_fragments(fragments) {} | 48 : CSSStyleValue(), m_fragments(fragments) {} |
| 49 | 49 |
| 50 private: | 50 private: |
| 51 static CSSUnparsedValue* fromString(String string) { | 51 static CSSUnparsedValue* fromString(String string) { |
| 52 HeapVector<StringOrCSSVariableReferenceValue> fragments; | 52 HeapVector<StringOrCSSVariableReferenceValue> fragments; |
| 53 fragments.append(StringOrCSSVariableReferenceValue::fromString(string)); | 53 fragments.push_back(StringOrCSSVariableReferenceValue::fromString(string)); |
| 54 return create(fragments); | 54 return create(fragments); |
| 55 } | 55 } |
| 56 | 56 |
| 57 IterationSource* startIteration(ScriptState*, ExceptionState&) override; | 57 IterationSource* startIteration(ScriptState*, ExceptionState&) override; |
| 58 | 58 |
| 59 FRIEND_TEST_ALL_PREFIXES(CSSUnparsedValueTest, ListOfStrings); | 59 FRIEND_TEST_ALL_PREFIXES(CSSUnparsedValueTest, ListOfStrings); |
| 60 FRIEND_TEST_ALL_PREFIXES(CSSUnparsedValueTest, | 60 FRIEND_TEST_ALL_PREFIXES(CSSUnparsedValueTest, |
| 61 ListOfCSSVariableReferenceValues); | 61 ListOfCSSVariableReferenceValues); |
| 62 FRIEND_TEST_ALL_PREFIXES(CSSUnparsedValueTest, MixedList); | 62 FRIEND_TEST_ALL_PREFIXES(CSSUnparsedValueTest, MixedList); |
| 63 FRIEND_TEST_ALL_PREFIXES(CSSVariableReferenceValueTest, MixedList); | 63 FRIEND_TEST_ALL_PREFIXES(CSSVariableReferenceValueTest, MixedList); |
| 64 | 64 |
| 65 HeapVector<StringOrCSSVariableReferenceValue> m_fragments; | 65 HeapVector<StringOrCSSVariableReferenceValue> m_fragments; |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 } // namespace blink | 68 } // namespace blink |
| 69 | 69 |
| 70 #endif // CSSUnparsedValue_h | 70 #endif // CSSUnparsedValue_h |
| OLD | NEW |