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 StylePropertyMap_h | 5 #ifndef StylePropertyMap_h |
6 #define StylePropertyMap_h | 6 #define StylePropertyMap_h |
7 | 7 |
8 #include "bindings/core/v8/Iterable.h" | 8 #include "bindings/core/v8/Iterable.h" |
9 #include "bindings/core/v8/ScriptWrappable.h" | 9 #include "bindings/core/v8/ScriptWrappable.h" |
10 #include "bindings/core/v8/StyleValueOrStyleValueSequence.h" | 10 #include "bindings/core/v8/StyleValueOrStyleValueSequence.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 typedef HeapVector<Member<StyleValue>> StyleValueVector; | 24 typedef HeapVector<Member<StyleValue>> StyleValueVector; |
25 | 25 |
26 virtual ~StylePropertyMap() { } | 26 virtual ~StylePropertyMap() { } |
27 | 27 |
28 // Accessors. | 28 // Accessors. |
29 StyleValue* get(const String& propertyName, ExceptionState&); | 29 StyleValue* get(const String& propertyName, ExceptionState&); |
30 StyleValueVector getAll(const String& propertyName, ExceptionState&); | 30 StyleValueVector getAll(const String& propertyName, ExceptionState&); |
31 bool has(const String& propertyName, ExceptionState&); | 31 bool has(const String& propertyName, ExceptionState&); |
32 | 32 |
33 virtual StyleValueVector getAll(CSSPropertyID) = 0; | 33 virtual StyleValueVector getAll(CSSPropertyID) = 0; |
34 virtual bool has(CSSPropertyID) = 0; | |
35 | |
36 virtual Vector<String> getProperties() = 0; | 34 virtual Vector<String> getProperties() = 0; |
37 | 35 |
38 // Modifiers. | 36 // Modifiers. |
39 void set(const String& propertyName, StyleValueOrStyleValueSequenceOrString&
item, ExceptionState&); | 37 void set(const String& propertyName, StyleValueOrStyleValueSequenceOrString&
item, ExceptionState&); |
40 void append(const String& propertyName, StyleValueOrStyleValueSequenceOrStri
ng& item, ExceptionState&); | 38 void append(const String& propertyName, StyleValueOrStyleValueSequenceOrStri
ng& item, ExceptionState&); |
41 void remove(const String& propertyName, ExceptionState&); | 39 void remove(const String& propertyName, ExceptionState&); |
42 | 40 |
43 virtual void set(CSSPropertyID, StyleValueOrStyleValueSequenceOrString& item
, ExceptionState&) = 0; | 41 virtual void set(CSSPropertyID, StyleValueOrStyleValueSequenceOrString& item
, ExceptionState&) = 0; |
44 virtual void append(CSSPropertyID, StyleValueOrStyleValueSequenceOrString& i
tem, ExceptionState&) = 0; | 42 virtual void append(CSSPropertyID, StyleValueOrStyleValueSequenceOrString& i
tem, ExceptionState&) = 0; |
45 virtual void remove(CSSPropertyID, ExceptionState&) = 0; | 43 virtual void remove(CSSPropertyID, ExceptionState&) = 0; |
46 | 44 |
47 DEFINE_INLINE_VIRTUAL_TRACE() { } | 45 DEFINE_INLINE_VIRTUAL_TRACE() { } |
48 | 46 |
49 protected: | 47 protected: |
50 StylePropertyMap() { } | 48 StylePropertyMap() { } |
51 | 49 |
52 IterationSource* startIteration(ScriptState*, ExceptionState&) override { re
turn nullptr; } | 50 IterationSource* startIteration(ScriptState*, ExceptionState&) override { re
turn nullptr; } |
53 StyleValueVector cssValueToStyleValueVector(CSSPropertyID, const CSSValue&); | 51 StyleValueVector cssValueToStyleValueVector(CSSPropertyID, const CSSValue&); |
54 }; | 52 }; |
55 | 53 |
56 } // namespace blink | 54 } // namespace blink |
57 | 55 |
58 #endif | 56 #endif |
OLD | NEW |