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 LengthValue_h | 5 #ifndef LengthValue_h |
6 #define LengthValue_h | 6 #define LengthValue_h |
7 | 7 |
8 #include "core/css/cssom/StyleValue.h" | 8 #include "core/css/cssom/StyleValue.h" |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 static LengthValue* parse(const String& cssString, ExceptionState&); | 43 static LengthValue* parse(const String& cssString, ExceptionState&); |
44 static LengthValue* fromValue(double value, const String& typeStr, Exception
State&); | 44 static LengthValue* fromValue(double value, const String& typeStr, Exception
State&); |
45 static LengthValue* fromDictionary(const CalcDictionary&, ExceptionState&); | 45 static LengthValue* fromDictionary(const CalcDictionary&, ExceptionState&); |
46 | 46 |
47 LengthValue* clone(); | 47 LengthValue* clone(); |
48 | 48 |
49 protected: | 49 protected: |
50 LengthValue() {} | 50 LengthValue() {} |
51 | 51 |
52 static LengthUnit lengthUnitFromName(const String&); | 52 static LengthUnit lengthUnitFromName(const String&); |
53 static const String& lengthTypeToString(LengthUnit type); | 53 static const String& lengthTypeToString(LengthUnit); |
| 54 static CSSPrimitiveValue::UnitType lengthTypeToPrimitiveType(LengthUnit); |
54 | 55 |
55 virtual LengthValue* addInternal(const LengthValue* other, ExceptionState&); | 56 virtual LengthValue* addInternal(const LengthValue* other, ExceptionState&); |
56 virtual LengthValue* subtractInternal(const LengthValue* other, ExceptionSta
te&); | 57 virtual LengthValue* subtractInternal(const LengthValue* other, ExceptionSta
te&); |
57 virtual LengthValue* multiplyInternal(double, ExceptionState&); | 58 virtual LengthValue* multiplyInternal(double, ExceptionState&); |
58 virtual LengthValue* divideInternal(double, ExceptionState&); | 59 virtual LengthValue* divideInternal(double, ExceptionState&); |
59 }; | 60 }; |
60 | 61 |
61 } // namespace blink | 62 } // namespace blink |
62 | 63 |
63 #endif | 64 #endif |
OLD | NEW |