| 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 "core/CSSPropertyNames.h" | 8 #include "core/CSSPropertyNames.h" |
| 9 #include "core/CoreExport.h" | 9 #include "core/CoreExport.h" |
| 10 #include "core/css/CSSValue.h" | 10 #include "core/css/CSSValue.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 47 |
| 48 static ScriptValue parse(ScriptState*, | 48 static ScriptValue parse(ScriptState*, |
| 49 const String& property_name, | 49 const String& property_name, |
| 50 const String& value, | 50 const String& value, |
| 51 ExceptionState&); | 51 ExceptionState&); |
| 52 | 52 |
| 53 virtual const CSSValue* ToCSSValue() const = 0; | 53 virtual const CSSValue* ToCSSValue() const = 0; |
| 54 virtual const CSSValue* ToCSSValueWithProperty(CSSPropertyID) const { | 54 virtual const CSSValue* ToCSSValueWithProperty(CSSPropertyID) const { |
| 55 return ToCSSValue(); | 55 return ToCSSValue(); |
| 56 } | 56 } |
| 57 virtual String cssText() const { return ToCSSValue()->CssText(); } | 57 virtual String cssText() const { |
| 58 const CSSValue* result = ToCSSValue(); |
| 59 // TODO(meade): Remove this once all the number and length types are |
| 60 // rewritten. |
| 61 return result ? result->CssText() : ""; |
| 62 } |
| 58 | 63 |
| 59 DEFINE_INLINE_VIRTUAL_TRACE() {} | 64 DEFINE_INLINE_VIRTUAL_TRACE() {} |
| 60 | 65 |
| 61 protected: | 66 protected: |
| 62 CSSStyleValue() {} | 67 CSSStyleValue() {} |
| 63 }; | 68 }; |
| 64 | 69 |
| 65 typedef HeapVector<Member<CSSStyleValue>> CSSStyleValueVector; | 70 typedef HeapVector<Member<CSSStyleValue>> CSSStyleValueVector; |
| 66 | 71 |
| 67 } // namespace blink | 72 } // namespace blink |
| 68 | 73 |
| 69 #endif | 74 #endif |
| OLD | NEW |