| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 CSSNumericValue_h | 5 #ifndef CSSNumericValue_h |
| 6 #define CSSNumericValue_h | 6 #define CSSNumericValue_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/css/CSSPrimitiveValue.h" |
| 9 #include "core/css/cssom/CSSStyleValue.h" | 10 #include "core/css/cssom/CSSStyleValue.h" |
| 10 #include "platform/bindings/ScriptWrappable.h" | 11 #include "platform/bindings/ScriptWrappable.h" |
| 11 #include "platform/wtf/text/WTFString.h" | 12 #include "platform/wtf/text/WTFString.h" |
| 12 | 13 |
| 13 namespace blink { | 14 namespace blink { |
| 14 | 15 |
| 16 class CSSUnitValue; |
| 15 class ExceptionState; | 17 class ExceptionState; |
| 16 | 18 |
| 17 class CORE_EXPORT CSSNumericValue : public CSSStyleValue { | 19 class CORE_EXPORT CSSNumericValue : public CSSStyleValue { |
| 18 WTF_MAKE_NONCOPYABLE(CSSNumericValue); | 20 WTF_MAKE_NONCOPYABLE(CSSNumericValue); |
| 19 DEFINE_WRAPPERTYPEINFO(); | 21 DEFINE_WRAPPERTYPEINFO(); |
| 20 | 22 |
| 21 public: | 23 public: |
| 22 static CSSNumericValue* parse(const String& css_text, ExceptionState&); | 24 static CSSNumericValue* parse(const String& css_text, ExceptionState&); |
| 25 static CSSNumericValue* FromCSSValue(const CSSValue&) { |
| 26 // TODO(meade): Implement. |
| 27 return nullptr; |
| 28 } |
| 23 | 29 |
| 24 virtual CSSNumericValue* add(const CSSNumericValue*, ExceptionState&) { | 30 virtual CSSNumericValue* add(const CSSNumericValue*, ExceptionState&) { |
| 25 // TODO(meade): Implement. | 31 // TODO(meade): Implement. |
| 26 return nullptr; | 32 return nullptr; |
| 27 } | 33 } |
| 28 virtual CSSNumericValue* sub(const CSSNumericValue*, ExceptionState&) { | 34 virtual CSSNumericValue* sub(const CSSNumericValue*, ExceptionState&) { |
| 29 // TODO(meade): Implement. | 35 // TODO(meade): Implement. |
| 30 return nullptr; | 36 return nullptr; |
| 31 } | 37 } |
| 32 virtual CSSNumericValue* mul(double, ExceptionState&) { | 38 virtual CSSNumericValue* mul(double, ExceptionState&) { |
| 33 // TODO(meade): Implement. | 39 // TODO(meade): Implement. |
| 34 return nullptr; | 40 return nullptr; |
| 35 } | 41 } |
| 36 virtual CSSNumericValue* div(double, ExceptionState&) { | 42 virtual CSSNumericValue* div(double, ExceptionState&) { |
| 37 // TODO(meade): Implement. | 43 // TODO(meade): Implement. |
| 38 return nullptr; | 44 return nullptr; |
| 39 } | 45 } |
| 40 | 46 |
| 41 virtual CSSNumericValue* to(const String&, ExceptionState&) { | 47 virtual CSSNumericValue* to(const String&, ExceptionState&) { |
| 42 // TODO(meade): Implement. | 48 // TODO(meade): Implement. |
| 43 return nullptr; | 49 return nullptr; |
| 44 } | 50 } |
| 45 | 51 |
| 52 // Internal methods. |
| 53 virtual CSSUnitValue* to(CSSPrimitiveValue::UnitType) { return nullptr; } |
| 54 bool ContainsPercent() const { |
| 55 // TODO(meade): Implement. |
| 56 return false; |
| 57 } |
| 58 |
| 46 protected: | 59 protected: |
| 47 CSSNumericValue() {} | 60 CSSNumericValue() {} |
| 48 }; | 61 }; |
| 49 | 62 |
| 50 } // namespace blink | 63 } // namespace blink |
| 51 | 64 |
| 52 #endif // CSSNumericValue_h | 65 #endif // CSSNumericValue_h |
| OLD | NEW |