| 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 ULength, | 149 ULength, |
| 150 UAngle, | 150 UAngle, |
| 151 UTime, | 151 UTime, |
| 152 UFrequency, | 152 UFrequency, |
| 153 UResolution, | 153 UResolution, |
| 154 UOther | 154 UOther |
| 155 }; | 155 }; |
| 156 static UnitCategory unitCategory(UnitType); | 156 static UnitCategory unitCategory(UnitType); |
| 157 static float clampToCSSLengthRange(double); | 157 static float clampToCSSLengthRange(double); |
| 158 | 158 |
| 159 static void initUnitTable(); | 159 static UnitType fromName(const UChar* unit, unsigned length); |
| 160 | 160 static UnitType fromName(const LChar* unit, unsigned length); |
| 161 static UnitType fromName(const String& unit); | |
| 162 | 161 |
| 163 bool isAngle() const | 162 bool isAngle() const |
| 164 { | 163 { |
| 165 return type() == UnitType::Degrees | 164 return type() == UnitType::Degrees |
| 166 || type() == UnitType::Radians | 165 || type() == UnitType::Radians |
| 167 || type() == UnitType::Gradians | 166 || type() == UnitType::Gradians |
| 168 || type() == UnitType::Turns; | 167 || type() == UnitType::Turns; |
| 169 } | 168 } |
| 170 bool isAttr() const { return type() == UnitType::Attribute; } | 169 bool isAttr() const { return type() == UnitType::Attribute; } |
| 171 bool isCounter() const { return type() == UnitType::Counter; } | 170 bool isCounter() const { return type() == UnitType::Counter; } |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 }; | 360 }; |
| 362 | 361 |
| 363 typedef CSSPrimitiveValue::CSSLengthArray CSSLengthArray; | 362 typedef CSSPrimitiveValue::CSSLengthArray CSSLengthArray; |
| 364 typedef CSSPrimitiveValue::CSSLengthTypeArray CSSLengthTypeArray; | 363 typedef CSSPrimitiveValue::CSSLengthTypeArray CSSLengthTypeArray; |
| 365 | 364 |
| 366 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPrimitiveValue, isPrimitiveValue()); | 365 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPrimitiveValue, isPrimitiveValue()); |
| 367 | 366 |
| 368 } // namespace blink | 367 } // namespace blink |
| 369 | 368 |
| 370 #endif // CSSPrimitiveValue_h | 369 #endif // CSSPrimitiveValue_h |
| OLD | NEW |