| 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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 | 264 |
| 265 private: | 265 private: |
| 266 CSSPrimitiveValue(CSSValueID); | 266 CSSPrimitiveValue(CSSValueID); |
| 267 CSSPrimitiveValue(const Length&, float zoom); | 267 CSSPrimitiveValue(const Length&, float zoom); |
| 268 CSSPrimitiveValue(double, UnitType); | 268 CSSPrimitiveValue(double, UnitType); |
| 269 | 269 |
| 270 template<typename T> CSSPrimitiveValue(T); // Defined in CSSPrimitiveValueMa
ppings.h | 270 template<typename T> CSSPrimitiveValue(T); // Defined in CSSPrimitiveValueMa
ppings.h |
| 271 | 271 |
| 272 template<typename T> CSSPrimitiveValue(T* val) | 272 template<typename T> CSSPrimitiveValue(T* val) |
| 273 : CSSValue(PrimitiveClass) | 273 : CSSValue(PrimitiveClass) |
| 274 , m_primitiveUnitType(0) |
| 275 , m_hasCachedCSSText(false) |
| 274 { | 276 { |
| 275 init(val); | 277 init(val); |
| 276 } | 278 } |
| 277 | 279 |
| 278 static void create(int); // compile-time guard | 280 static void create(int); // compile-time guard |
| 279 static void create(unsigned); // compile-time guard | 281 static void create(unsigned); // compile-time guard |
| 280 template<typename T> operator T*(); // compile-time guard | 282 template<typename T> operator T*(); // compile-time guard |
| 281 | 283 |
| 282 // Code generated by CSSPrimitiveValueUnitTrie.cpp.tmpl | 284 // Code generated by CSSPrimitiveValueUnitTrie.cpp.tmpl |
| 283 static UnitType stringToUnitType(const LChar*, unsigned length); | 285 static UnitType stringToUnitType(const LChar*, unsigned length); |
| 284 static UnitType stringToUnitType(const UChar*, unsigned length); | 286 static UnitType stringToUnitType(const UChar*, unsigned length); |
| 285 | 287 |
| 286 void init(UnitType); | 288 void init(UnitType); |
| 287 void init(const Length&); | 289 void init(const Length&); |
| 288 void init(CSSCalcValue*); | 290 void init(CSSCalcValue*); |
| 289 | 291 |
| 290 double computeLengthDouble(const CSSToLengthConversionData&) const; | 292 double computeLengthDouble(const CSSToLengthConversionData&) const; |
| 291 | 293 |
| 292 inline UnitType type() const { return static_cast<UnitType>(m_primitiveUnitT
ype); } | 294 inline UnitType type() const { return static_cast<UnitType>(m_primitiveUnitT
ype); } |
| 293 | |
| 294 union { | 295 union { |
| 295 CSSValueID valueID; | 296 CSSValueID valueID; |
| 296 double num; | 297 double num; |
| 297 // FIXME: oilpan: Should be a member, but no support for members in unio
ns. Just trace the raw ptr for now. | 298 // FIXME: oilpan: Should be a member, but no support for members in unio
ns. Just trace the raw ptr for now. |
| 298 CSSCalcValue* calc; | 299 CSSCalcValue* calc; |
| 299 } m_value; | 300 } m_value; |
| 301 |
| 302 unsigned m_primitiveUnitType : 7; // CSSPrimitiveValue::UnitType |
| 303 mutable unsigned m_hasCachedCSSText : 1; |
| 300 }; | 304 }; |
| 301 | 305 |
| 302 using CSSLengthArray = CSSPrimitiveValue::CSSLengthArray; | 306 using CSSLengthArray = CSSPrimitiveValue::CSSLengthArray; |
| 303 | 307 |
| 304 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPrimitiveValue, isPrimitiveValue()); | 308 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPrimitiveValue, isPrimitiveValue()); |
| 305 | 309 |
| 306 } // namespace blink | 310 } // namespace blink |
| 307 | 311 |
| 308 #endif // CSSPrimitiveValue_h | 312 #endif // CSSPrimitiveValue_h |
| OLD | NEW |