| 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 ULength, | 151 ULength, |
| 152 UAngle, | 152 UAngle, |
| 153 UTime, | 153 UTime, |
| 154 UFrequency, | 154 UFrequency, |
| 155 UResolution, | 155 UResolution, |
| 156 UOther | 156 UOther |
| 157 }; | 157 }; |
| 158 static UnitCategory unitTypeToUnitCategory(UnitType); | 158 static UnitCategory unitTypeToUnitCategory(UnitType); |
| 159 static float clampToCSSLengthRange(double); | 159 static float clampToCSSLengthRange(double); |
| 160 | 160 |
| 161 static void initUnitTable(); | |
| 162 | |
| 163 static UnitType fromName(const String& unit); | |
| 164 | |
| 165 bool isAngle() const | 161 bool isAngle() const |
| 166 { | 162 { |
| 167 return type() == UnitType::Degrees | 163 return type() == UnitType::Degrees |
| 168 || type() == UnitType::Radians | 164 || type() == UnitType::Radians |
| 169 || type() == UnitType::Gradians | 165 || type() == UnitType::Gradians |
| 170 || type() == UnitType::Turns; | 166 || type() == UnitType::Turns; |
| 171 } | 167 } |
| 172 bool isFontRelativeLength() const | 168 bool isFontRelativeLength() const |
| 173 { | 169 { |
| 174 return type() == UnitType::QuirkyEms | 170 return type() == UnitType::QuirkyEms |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 } m_value; | 292 } m_value; |
| 297 }; | 293 }; |
| 298 | 294 |
| 299 using CSSLengthArray = CSSPrimitiveValue::CSSLengthArray; | 295 using CSSLengthArray = CSSPrimitiveValue::CSSLengthArray; |
| 300 | 296 |
| 301 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPrimitiveValue, isPrimitiveValue()); | 297 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPrimitiveValue, isPrimitiveValue()); |
| 302 | 298 |
| 303 } // namespace blink | 299 } // namespace blink |
| 304 | 300 |
| 305 #endif // CSSPrimitiveValue_h | 301 #endif // CSSPrimitiveValue_h |
| OLD | NEW |