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