Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(316)

Side by Side Diff: third_party/WebKit/Source/core/css/cssom/CSSTokenStreamValue.h

Issue 2251663002: [Typed-OM] Get CSSTokenStreamValue from StyleMap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change test to expect CSSTokenStreamValue Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 CSSTokenStreamValue_h 5 #ifndef CSSTokenStreamValue_h
6 #define CSSTokenStreamValue_h 6 #define CSSTokenStreamValue_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/cssom/CSSStyleValue.h" 11 #include "core/css/cssom/CSSStyleValue.h"
12 #include "core/css/parser/CSSParserTokenRange.h"
Timothy Loh 2016/08/29 03:09:18 this include shouldn't be needed
11 #include "wtf/Vector.h" 13 #include "wtf/Vector.h"
12 14
13 namespace blink { 15 namespace blink {
14 16
15 class CORE_EXPORT CSSTokenStreamValue final : public CSSStyleValue, public Value Iterable<StringOrCSSVariableReferenceValue> { 17 class CORE_EXPORT CSSTokenStreamValue final : public CSSStyleValue, public Value Iterable<StringOrCSSVariableReferenceValue> {
16 WTF_MAKE_NONCOPYABLE(CSSTokenStreamValue); 18 WTF_MAKE_NONCOPYABLE(CSSTokenStreamValue);
17 DEFINE_WRAPPERTYPEINFO(); 19 DEFINE_WRAPPERTYPEINFO();
18 public: 20 public:
19 static CSSTokenStreamValue* create(const HeapVector<StringOrCSSVariableRefer enceValue>& fragments) 21 static CSSTokenStreamValue* create(const HeapVector<StringOrCSSVariableRefer enceValue>& fragments)
20 { 22 {
21 return new CSSTokenStreamValue(fragments); 23 return new CSSTokenStreamValue(fragments);
22 } 24 }
23 25
26 static CSSTokenStreamValue* fromCSSValue(const CSSVariableReferenceValue&);
27
24 CSSValue* toCSSValue() const override; 28 CSSValue* toCSSValue() const override;
25 29
26 StyleValueType type() const override { return TokenStreamType; } 30 StyleValueType type() const override { return TokenStreamType; }
27 31
28 StringOrCSSVariableReferenceValue fragmentAtIndex(int index) const { return m_fragments.at(index); } 32 StringOrCSSVariableReferenceValue fragmentAtIndex(int index) const { return m_fragments.at(index); }
29 33
30 size_t size() const { return m_fragments.size(); } 34 size_t size() const { return m_fragments.size(); }
31 35
32 DEFINE_INLINE_VIRTUAL_TRACE() 36 DEFINE_INLINE_VIRTUAL_TRACE()
33 { 37 {
(...skipping 10 matching lines...) Expand all
44 48
45 private: 49 private:
46 IterationSource* startIteration(ScriptState*, ExceptionState&) override; 50 IterationSource* startIteration(ScriptState*, ExceptionState&) override;
47 51
48 HeapVector<StringOrCSSVariableReferenceValue> m_fragments; 52 HeapVector<StringOrCSSVariableReferenceValue> m_fragments;
49 }; 53 };
50 54
51 } // namespace blink 55 } // namespace blink
52 56
53 #endif // CSSTokenStreamValue_h 57 #endif // CSSTokenStreamValue_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698