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 StyleValue_h | 5 #ifndef StyleValue_h |
6 #define StyleValue_h | 6 #define StyleValue_h |
7 | 7 |
8 #include "bindings/core/v8/ScriptWrappable.h" | 8 #include "bindings/core/v8/ScriptWrappable.h" |
9 #include "core/CoreExport.h" | 9 #include "core/CoreExport.h" |
10 #include "core/css/CSSValue.h" | 10 #include "core/css/CSSValue.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 KeywordValueType, SimpleLengthType, CalcLengthType, NumberType, Transfor
mValueType | 23 KeywordValueType, SimpleLengthType, CalcLengthType, NumberType, Transfor
mValueType |
24 }; | 24 }; |
25 | 25 |
26 virtual ~StyleValue() { } | 26 virtual ~StyleValue() { } |
27 | 27 |
28 virtual StyleValueType type() const = 0; | 28 virtual StyleValueType type() const = 0; |
29 | 29 |
30 static StyleValue* create(const CSSValue&); | 30 static StyleValue* create(const CSSValue&); |
31 static ScriptValue parse(ScriptState*, const String& property, const String&
cssText); | 31 static ScriptValue parse(ScriptState*, const String& property, const String&
cssText); |
32 | 32 |
33 virtual String cssString() const = 0; | |
34 virtual PassRefPtrWillBeRawPtr<CSSValue> toCSSValue() const = 0; | 33 virtual PassRefPtrWillBeRawPtr<CSSValue> toCSSValue() const = 0; |
| 34 virtual String cssString() const |
| 35 { |
| 36 return toCSSValue()->cssText(); |
| 37 } |
35 | 38 |
36 DEFINE_INLINE_VIRTUAL_TRACE() { } | 39 DEFINE_INLINE_VIRTUAL_TRACE() { } |
37 | 40 |
38 protected: | 41 protected: |
39 StyleValue() {} | 42 StyleValue() {} |
40 }; | 43 }; |
41 | 44 |
42 } // namespace blink | 45 } // namespace blink |
43 | 46 |
44 #endif | 47 #endif |
OLD | NEW |