OLD | NEW |
1 /* | 1 /* |
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. |
4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 Degrees, | 82 Degrees, |
83 Radians, | 83 Radians, |
84 Gradians, | 84 Gradians, |
85 Turns, | 85 Turns, |
86 Milliseconds, | 86 Milliseconds, |
87 Seconds, | 87 Seconds, |
88 Hertz, | 88 Hertz, |
89 Kilohertz, | 89 Kilohertz, |
90 CustomIdentifier, | 90 CustomIdentifier, |
91 URI, | 91 URI, |
92 Attribute, | |
93 RGBColor, | 92 RGBColor, |
94 ViewportWidth, | 93 ViewportWidth, |
95 ViewportHeight, | 94 ViewportHeight, |
96 ViewportMin, | 95 ViewportMin, |
97 ViewportMax, | 96 ViewportMax, |
98 DotsPerPixel, | 97 DotsPerPixel, |
99 DotsPerInch, | 98 DotsPerInch, |
100 DotsPerCentimeter, | 99 DotsPerCentimeter, |
101 Fraction, | 100 Fraction, |
102 Integer, | 101 Integer, |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 | 150 |
152 static UnitType fromName(const String& unit); | 151 static UnitType fromName(const String& unit); |
153 | 152 |
154 bool isAngle() const | 153 bool isAngle() const |
155 { | 154 { |
156 return type() == UnitType::Degrees | 155 return type() == UnitType::Degrees |
157 || type() == UnitType::Radians | 156 || type() == UnitType::Radians |
158 || type() == UnitType::Gradians | 157 || type() == UnitType::Gradians |
159 || type() == UnitType::Turns; | 158 || type() == UnitType::Turns; |
160 } | 159 } |
161 bool isAttr() const { return type() == UnitType::Attribute; } | |
162 bool isCustomIdent() const { return type() == UnitType::CustomIdentifier; } | 160 bool isCustomIdent() const { return type() == UnitType::CustomIdentifier; } |
163 bool isFontRelativeLength() const | 161 bool isFontRelativeLength() const |
164 { | 162 { |
165 return type() == UnitType::Ems | 163 return type() == UnitType::Ems |
166 || type() == UnitType::Exs | 164 || type() == UnitType::Exs |
167 || type() == UnitType::Rems | 165 || type() == UnitType::Rems |
168 || type() == UnitType::Chs; | 166 || type() == UnitType::Chs; |
169 } | 167 } |
170 bool isViewportPercentageLength() const { return isViewportPercentageLength(
type()); } | 168 bool isViewportPercentageLength() const { return isViewportPercentageLength(
type()); } |
171 static bool isViewportPercentageLength(UnitType type) { return type >= UnitT
ype::ViewportWidth && type <= UnitType::ViewportMax; } | 169 static bool isViewportPercentageLength(UnitType type) { return type >= UnitT
ype::ViewportWidth && type <= UnitType::ViewportMax; } |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 }; | 326 }; |
329 | 327 |
330 typedef CSSPrimitiveValue::CSSLengthArray CSSLengthArray; | 328 typedef CSSPrimitiveValue::CSSLengthArray CSSLengthArray; |
331 typedef CSSPrimitiveValue::CSSLengthTypeArray CSSLengthTypeArray; | 329 typedef CSSPrimitiveValue::CSSLengthTypeArray CSSLengthTypeArray; |
332 | 330 |
333 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPrimitiveValue, isPrimitiveValue()); | 331 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPrimitiveValue, isPrimitiveValue()); |
334 | 332 |
335 } // namespace blink | 333 } // namespace blink |
336 | 334 |
337 #endif // CSSPrimitiveValue_h | 335 #endif // CSSPrimitiveValue_h |
OLD | NEW |