OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CSSStyleValue_h | 5 #ifndef CSSStyleValue_h |
6 #define CSSStyleValue_h | 6 #define CSSStyleValue_h |
7 | 7 |
8 #include "bindings/core/v8/ScriptWrappable.h" | 8 #include "bindings/core/v8/ScriptWrappable.h" |
9 #include "core/CSSPropertyNames.h" | 9 #include "core/CSSPropertyNames.h" |
10 #include "core/CoreExport.h" | 10 #include "core/CoreExport.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 AngleType, | 25 AngleType, |
26 CalcLengthType, | 26 CalcLengthType, |
27 ImageType, | 27 ImageType, |
28 KeywordType, | 28 KeywordType, |
29 NumberType, | 29 NumberType, |
30 PositionType, | 30 PositionType, |
31 ResourceType, | 31 ResourceType, |
32 SimpleLengthType, | 32 SimpleLengthType, |
33 TokenStreamType, | 33 TokenStreamType, |
34 TransformType, | 34 TransformType, |
| 35 URLImageType, |
35 }; | 36 }; |
36 | 37 |
37 virtual ~CSSStyleValue() { } | 38 virtual ~CSSStyleValue() { } |
38 | 39 |
39 virtual StyleValueType type() const = 0; | 40 virtual StyleValueType type() const = 0; |
40 | 41 |
41 static ScriptValue parse(ScriptState*, const String& propertyName, const Str
ing& value, ExceptionState&); | 42 static ScriptValue parse(ScriptState*, const String& propertyName, const Str
ing& value, ExceptionState&); |
42 | 43 |
43 virtual const CSSValue* toCSSValue() const = 0; | 44 virtual const CSSValue* toCSSValue() const = 0; |
44 virtual const CSSValue* toCSSValueWithProperty(CSSPropertyID) const | 45 virtual const CSSValue* toCSSValueWithProperty(CSSPropertyID) const |
45 { | 46 { |
46 return toCSSValue(); | 47 return toCSSValue(); |
47 } | 48 } |
48 virtual String cssText() const | 49 virtual String cssText() const |
49 { | 50 { |
50 return toCSSValue()->cssText(); | 51 return toCSSValue()->cssText(); |
51 } | 52 } |
52 | 53 |
53 DEFINE_INLINE_VIRTUAL_TRACE() { } | 54 DEFINE_INLINE_VIRTUAL_TRACE() { } |
54 | 55 |
55 protected: | 56 protected: |
56 CSSStyleValue() {} | 57 CSSStyleValue() {} |
57 }; | 58 }; |
58 | 59 |
59 typedef HeapVector<Member<CSSStyleValue>> CSSStyleValueVector; | 60 typedef HeapVector<Member<CSSStyleValue>> CSSStyleValueVector; |
60 | 61 |
61 } // namespace blink | 62 } // namespace blink |
62 | 63 |
63 #endif | 64 #endif |
OLD | NEW |