OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef StylePropertyMap_h | |
6 #define StylePropertyMap_h | |
7 | |
8 #include "bindings/core/v8/Iterable.h" | |
9 #include "bindings/core/v8/ScriptWrappable.h" | |
10 #include "bindings/core/v8/UnionTypesCore.h" | |
11 #include "core/CSSPropertyNames.h" | |
12 #include "core/CoreExport.h" | |
13 #include "core/css/cssom/StyleValue.h" | |
14 | |
15 namespace blink { | |
16 | |
17 class ExceptionState; | |
18 | |
19 class CORE_EXPORT StylePropertyMap : public GarbageCollectedFinalized<StylePrope rtyMap>, public ScriptWrappable, public PairIterable<String, StyleValueOrStyleVa lueSequence> { | |
20 WTF_MAKE_NONCOPYABLE(StylePropertyMap); | |
21 DEFINE_WRAPPERTYPEINFO(); | |
22 public: | |
23 // Accessors. | |
24 StyleValue* get(const String& propertyName); | |
25 HeapVector<StyleValue*> getAll(const String& propertyName); | |
Timothy Loh
2016/01/19 05:30:46
Is the code generator expecting HeapVector<StyleVa
meade_UTC10
2016/01/20 03:39:34
Nope, it's not. I can't remember why I made it lik
| |
26 bool has(const String& propertyName); | |
27 | |
28 virtual StyleValue* get(CSSPropertyID) = 0; | |
29 virtual HeapVector<StyleValue*> getAll(CSSPropertyID) = 0; | |
30 virtual bool has(CSSPropertyID) = 0; | |
31 | |
32 virtual Vector<String> getProperties() = 0; | |
33 | |
34 // Modifiers. | |
35 void set(const String& propertyName, StyleValueOrStyleValueSequenceOrString& item, ExceptionState&); | |
36 void append(const String& propertyName, StyleValueOrStyleValueSequenceOrStri ng& item, ExceptionState&); | |
37 void remove(const String& propertyName, ExceptionState&); | |
38 | |
39 virtual void set(CSSPropertyID, StyleValueOrStyleValueSequenceOrString& item , ExceptionState&) = 0; | |
40 virtual void append(CSSPropertyID, StyleValueOrStyleValueSequenceOrString& i tem, ExceptionState&) = 0; | |
41 virtual void remove(CSSPropertyID, ExceptionState&) = 0; | |
42 | |
43 DEFINE_INLINE_VIRTUAL_TRACE() { } | |
44 | |
45 protected: | |
46 StylePropertyMap() {} | |
Timothy Loh
2016/01/19 05:30:46
{ } is more common (at least be consistent with ab
meade_UTC10
2016/01/20 03:39:34
Done.
| |
47 }; | |
48 | |
49 } // namespace blink | |
50 | |
51 #endif | |
OLD | NEW |