| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 StyleCalcLength_h | 5 #ifndef StyleCalcLength_h |
| 6 #define StyleCalcLength_h | 6 #define StyleCalcLength_h |
| 7 | 7 |
| 8 #include "core/css/cssom/LengthValue.h" | 8 #include "core/css/cssom/LengthValue.h" |
| 9 #include "wtf/BitVector.h" | 9 #include "wtf/BitVector.h" |
| 10 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 GETTER_MACRO(vmin, LengthUnit::Vmin) | 37 GETTER_MACRO(vmin, LengthUnit::Vmin) |
| 38 GETTER_MACRO(vmax, LengthUnit::Vmax) | 38 GETTER_MACRO(vmax, LengthUnit::Vmax) |
| 39 GETTER_MACRO(cm, LengthUnit::Cm) | 39 GETTER_MACRO(cm, LengthUnit::Cm) |
| 40 GETTER_MACRO(mm, LengthUnit::Mm) | 40 GETTER_MACRO(mm, LengthUnit::Mm) |
| 41 GETTER_MACRO(in, LengthUnit::In) | 41 GETTER_MACRO(in, LengthUnit::In) |
| 42 GETTER_MACRO(pc, LengthUnit::Pc) | 42 GETTER_MACRO(pc, LengthUnit::Pc) |
| 43 GETTER_MACRO(pt, LengthUnit::Pt) | 43 GETTER_MACRO(pt, LengthUnit::Pt) |
| 44 | 44 |
| 45 #undef GETTER_MACRO | 45 #undef GETTER_MACRO |
| 46 | 46 |
| 47 String cssString() const override; |
| 47 PassRefPtrWillBeRawPtr<CSSValue> toCSSValue() const override; | 48 PassRefPtrWillBeRawPtr<CSSValue> toCSSValue() const override; |
| 48 | 49 |
| 49 StyleValueType type() const override { return CalcLengthType; } | 50 StyleValueType type() const override { return CalcLengthType; } |
| 50 protected: | 51 protected: |
| 51 LengthValue* addInternal(const LengthValue* other, ExceptionState&) override
; | 52 LengthValue* addInternal(const LengthValue* other, ExceptionState&) override
; |
| 52 LengthValue* subtractInternal(const LengthValue* other, ExceptionState&) ove
rride; | 53 LengthValue* subtractInternal(const LengthValue* other, ExceptionState&) ove
rride; |
| 53 LengthValue* multiplyInternal(double, ExceptionState&) override; | 54 LengthValue* multiplyInternal(double, ExceptionState&) override; |
| 54 LengthValue* divideInternal(double, ExceptionState&) override; | 55 LengthValue* divideInternal(double, ExceptionState&) override; |
| 55 | 56 |
| 56 private: | 57 private: |
| (...skipping 25 matching lines...) Expand all Loading... |
| 82 #define DEFINE_CALC_LENGTH_TYPE_CASTS(argumentType) \ | 83 #define DEFINE_CALC_LENGTH_TYPE_CASTS(argumentType) \ |
| 83 DEFINE_TYPE_CASTS(StyleCalcLength, argumentType, value, \ | 84 DEFINE_TYPE_CASTS(StyleCalcLength, argumentType, value, \ |
| 84 value->type() == LengthValue::StyleValueType::CalcLengthType, \ | 85 value->type() == LengthValue::StyleValueType::CalcLengthType, \ |
| 85 value.type() == LengthValue::StyleValueType::CalcLengthType) | 86 value.type() == LengthValue::StyleValueType::CalcLengthType) |
| 86 | 87 |
| 87 DEFINE_CALC_LENGTH_TYPE_CASTS(StyleValue); | 88 DEFINE_CALC_LENGTH_TYPE_CASTS(StyleValue); |
| 88 | 89 |
| 89 } // namespace blink | 90 } // namespace blink |
| 90 | 91 |
| 91 #endif | 92 #endif |
| OLD | NEW |