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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 UPercent, | 158 UPercent, |
159 ULength, | 159 ULength, |
160 UAngle, | 160 UAngle, |
161 UTime, | 161 UTime, |
162 UFrequency, | 162 UFrequency, |
163 UResolution, | 163 UResolution, |
164 UOther | 164 UOther |
165 }; | 165 }; |
166 static UnitCategory unitCategory(UnitType); | 166 static UnitCategory unitCategory(UnitType); |
167 | 167 |
| 168 static void initUnitTable(); |
| 169 |
168 static UnitType fromName(const String& unit); | 170 static UnitType fromName(const String& unit); |
169 | 171 |
170 bool isAngle() const | 172 bool isAngle() const |
171 { | 173 { |
172 return m_primitiveUnitType == CSS_DEG | 174 return m_primitiveUnitType == CSS_DEG |
173 || m_primitiveUnitType == CSS_RAD | 175 || m_primitiveUnitType == CSS_RAD |
174 || m_primitiveUnitType == CSS_GRAD | 176 || m_primitiveUnitType == CSS_GRAD |
175 || m_primitiveUnitType == CSS_TURN; | 177 || m_primitiveUnitType == CSS_TURN; |
176 } | 178 } |
177 bool isAttr() const { return m_primitiveUnitType == CSS_ATTR; } | 179 bool isAttr() const { return m_primitiveUnitType == CSS_ATTR; } |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 }; | 387 }; |
386 | 388 |
387 typedef CSSPrimitiveValue::CSSLengthArray CSSLengthArray; | 389 typedef CSSPrimitiveValue::CSSLengthArray CSSLengthArray; |
388 typedef CSSPrimitiveValue::CSSLengthTypeArray CSSLengthTypeArray; | 390 typedef CSSPrimitiveValue::CSSLengthTypeArray CSSLengthTypeArray; |
389 | 391 |
390 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPrimitiveValue, isPrimitiveValue()); | 392 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPrimitiveValue, isPrimitiveValue()); |
391 | 393 |
392 } // namespace blink | 394 } // namespace blink |
393 | 395 |
394 #endif // CSSPrimitiveValue_h | 396 #endif // CSSPrimitiveValue_h |
OLD | NEW |