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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 UPercent, | 142 UPercent, |
143 ULength, | 143 ULength, |
144 UAngle, | 144 UAngle, |
145 UTime, | 145 UTime, |
146 UFrequency, | 146 UFrequency, |
147 UResolution, | 147 UResolution, |
148 UOther | 148 UOther |
149 }; | 149 }; |
150 static UnitCategory unitCategory(CSSPrimitiveValue::UnitTypes); | 150 static UnitCategory unitCategory(CSSPrimitiveValue::UnitTypes); |
151 | 151 |
152 typedef HashMap<String, CSSPrimitiveValue::UnitTypes> UnitTable; | |
153 static UnitTable& getUnitTable(); | |
154 | |
155 bool isAngle() const | 152 bool isAngle() const |
156 { | 153 { |
157 return m_primitiveUnitType == CSS_DEG | 154 return m_primitiveUnitType == CSS_DEG |
158 || m_primitiveUnitType == CSS_RAD | 155 || m_primitiveUnitType == CSS_RAD |
159 || m_primitiveUnitType == CSS_GRAD | 156 || m_primitiveUnitType == CSS_GRAD |
160 || m_primitiveUnitType == CSS_TURN; | 157 || m_primitiveUnitType == CSS_TURN; |
161 } | 158 } |
162 bool isAttr() const { return m_primitiveUnitType == CSS_ATTR; } | 159 bool isAttr() const { return m_primitiveUnitType == CSS_ATTR; } |
163 bool isCounter() const { return m_primitiveUnitType == CSS_COUNTER; } | 160 bool isCounter() const { return m_primitiveUnitType == CSS_COUNTER; } |
164 bool isFontIndependentLength() const { return m_primitiveUnitType >= CSS_PX
&& m_primitiveUnitType <= CSS_PC; } | 161 bool isFontIndependentLength() const { return m_primitiveUnitType >= CSS_PX
&& m_primitiveUnitType <= CSS_PC; } |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 Rect* rect; | 403 Rect* rect; |
407 Quad* quad; | 404 Quad* quad; |
408 } m_value; | 405 } m_value; |
409 }; | 406 }; |
410 | 407 |
411 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPrimitiveValue, isPrimitiveValue()); | 408 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPrimitiveValue, isPrimitiveValue()); |
412 | 409 |
413 } // namespace WebCore | 410 } // namespace WebCore |
414 | 411 |
415 #endif // CSSPrimitiveValue_h | 412 #endif // CSSPrimitiveValue_h |
OLD | NEW |