| 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 | 238 |
| 239 double getDoubleValue() const; | 239 double getDoubleValue() const; |
| 240 float getFloatValue() const { return getValue<float>(); } | 240 float getFloatValue() const { return getValue<float>(); } |
| 241 int getIntValue() const { return getValue<int>(); } | 241 int getIntValue() const { return getValue<int>(); } |
| 242 template <typename T> | 242 template <typename T> |
| 243 inline T getValue() const { | 243 inline T getValue() const { |
| 244 return clampTo<T>(getDoubleValue()); | 244 return clampTo<T>(getDoubleValue()); |
| 245 } | 245 } |
| 246 | 246 |
| 247 CSSCalcValue* cssCalcValue() const { | 247 CSSCalcValue* cssCalcValue() const { |
| 248 ASSERT(isCalculated()); | 248 DCHECK(isCalculated()); |
| 249 return m_value.calc; | 249 return m_value.calc; |
| 250 } | 250 } |
| 251 | 251 |
| 252 template <typename T> | 252 template <typename T> |
| 253 inline T convertTo() const; // Defined in CSSPrimitiveValueMappings.h | 253 inline T convertTo() const; // Defined in CSSPrimitiveValueMappings.h |
| 254 | 254 |
| 255 static const char* unitTypeToString(UnitType); | 255 static const char* unitTypeToString(UnitType); |
| 256 static UnitType stringToUnitType(StringView string) { | 256 static UnitType stringToUnitType(StringView string) { |
| 257 if (string.is8Bit()) | 257 if (string.is8Bit()) |
| 258 return stringToUnitType(string.characters8(), string.length()); | 258 return stringToUnitType(string.characters8(), string.length()); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 } m_value; | 312 } m_value; |
| 313 }; | 313 }; |
| 314 | 314 |
| 315 using CSSLengthArray = CSSPrimitiveValue::CSSLengthArray; | 315 using CSSLengthArray = CSSPrimitiveValue::CSSLengthArray; |
| 316 | 316 |
| 317 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPrimitiveValue, isPrimitiveValue()); | 317 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPrimitiveValue, isPrimitiveValue()); |
| 318 | 318 |
| 319 } // namespace blink | 319 } // namespace blink |
| 320 | 320 |
| 321 #endif // CSSPrimitiveValue_h | 321 #endif // CSSPrimitiveValue_h |
| OLD | NEW |