| 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 11 matching lines...) Expand all Loading... |
| 22 enum StyleValueType { | 22 enum StyleValueType { |
| 23 KeywordType, SimpleLengthType, CalcLengthType, NumberType, TransformValu
eType, PositionType | 23 KeywordType, SimpleLengthType, CalcLengthType, NumberType, TransformValu
eType, PositionType |
| 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 ScriptValue parse(ScriptState*, const String& property, const String&
cssText); | 30 static ScriptValue parse(ScriptState*, const String& property, const String&
cssText); |
| 31 | 31 |
| 32 virtual PassRefPtrWillBeRawPtr<CSSValue> toCSSValue() const = 0; | 32 virtual RawPtr<CSSValue> toCSSValue() const = 0; |
| 33 virtual String cssString() const | 33 virtual String cssString() const |
| 34 { | 34 { |
| 35 return toCSSValue()->cssText(); | 35 return toCSSValue()->cssText(); |
| 36 } | 36 } |
| 37 | 37 |
| 38 DEFINE_INLINE_VIRTUAL_TRACE() { } | 38 DEFINE_INLINE_VIRTUAL_TRACE() { } |
| 39 | 39 |
| 40 protected: | 40 protected: |
| 41 StyleValue() {} | 41 StyleValue() {} |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 } // namespace blink | 44 } // namespace blink |
| 45 | 45 |
| 46 #endif | 46 #endif |
| OLD | NEW |