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

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: Remove unused header 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"
11 #include "wtf/Vector.h" 12 #include "wtf/Vector.h"
12 13
13 namespace blink { 14 namespace blink {
14 15
15 class CORE_EXPORT CSSTokenStreamValue final : public CSSStyleValue, public Value Iterable<StringOrCSSVariableReferenceValue> { 16 class CORE_EXPORT CSSTokenStreamValue final : public CSSStyleValue, public Value Iterable<StringOrCSSVariableReferenceValue> {
16 WTF_MAKE_NONCOPYABLE(CSSTokenStreamValue); 17 WTF_MAKE_NONCOPYABLE(CSSTokenStreamValue);
17 DEFINE_WRAPPERTYPEINFO(); 18 DEFINE_WRAPPERTYPEINFO();
18 public: 19 public:
19 static CSSTokenStreamValue* create(const HeapVector<StringOrCSSVariableRefer enceValue>& fragments) 20 static CSSTokenStreamValue* create(const HeapVector<StringOrCSSVariableRefer enceValue>& fragments)
20 { 21 {
21 return new CSSTokenStreamValue(fragments); 22 return new CSSTokenStreamValue(fragments);
22 } 23 }
23 24
25 static CSSTokenStreamValue* fromCSSValue(const CSSVariableReferenceValue&);
26
24 CSSValue* toCSSValue() const override; 27 CSSValue* toCSSValue() const override;
25 28
26 StyleValueType type() const override { return TokenStreamType; } 29 StyleValueType type() const override { return TokenStreamType; }
27 30
28 StringOrCSSVariableReferenceValue fragmentAtIndex(int index) const { return m_fragments.at(index); } 31 StringOrCSSVariableReferenceValue fragmentAtIndex(int index) const { return m_fragments.at(index); }
29 32
30 size_t size() const { return m_fragments.size(); } 33 size_t size() const { return m_fragments.size(); }
31 34
32 DEFINE_INLINE_VIRTUAL_TRACE() 35 DEFINE_INLINE_VIRTUAL_TRACE()
33 { 36 {
(...skipping 10 matching lines...) Expand all
44 47
45 private: 48 private:
46 IterationSource* startIteration(ScriptState*, ExceptionState&) override; 49 IterationSource* startIteration(ScriptState*, ExceptionState&) override;
47 50
48 HeapVector<StringOrCSSVariableReferenceValue> m_fragments; 51 HeapVector<StringOrCSSVariableReferenceValue> m_fragments;
49 }; 52 };
50 53
51 } // namespace blink 54 } // namespace blink
52 55
53 #endif // CSSTokenStreamValue_h 56 #endif // CSSTokenStreamValue_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698