| 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 template<int> Length convertToLength(const RenderStyle* currStyle, const Ren
derStyle* rootStyle, double multiplier = 1.0, bool computingFontSize = false); | 260 template<int> Length convertToLength(const RenderStyle* currStyle, const Ren
derStyle* rootStyle, double multiplier = 1.0, bool computingFontSize = false); |
| 261 | 261 |
| 262 // use with care!!! | 262 // use with care!!! |
| 263 void setPrimitiveType(unsigned short type) { m_primitiveUnitType = type; } | 263 void setPrimitiveType(unsigned short type) { m_primitiveUnitType = type; } |
| 264 | 264 |
| 265 double getDoubleValue(unsigned short unitType, ExceptionState&) const; | 265 double getDoubleValue(unsigned short unitType, ExceptionState&) const; |
| 266 double getDoubleValue(unsigned short unitType) const; | 266 double getDoubleValue(unsigned short unitType) const; |
| 267 double getDoubleValue() const; | 267 double getDoubleValue() const; |
| 268 | 268 |
| 269 void setFloatValue(unsigned short unitType, double floatValue, ExceptionStat
e&); | 269 void setFloatValue(unsigned short unitType, double floatValue, ExceptionStat
e&); |
| 270 float getFloatValue(unsigned short unitType, ExceptionState& es) const { ret
urn getValue<float>(unitType, es); } | 270 float getFloatValue(unsigned short unitType, ExceptionState& exceptionState)
const { return getValue<float>(unitType, exceptionState); } |
| 271 float getFloatValue(unsigned short unitType) const { return getValue<float>(
unitType); } | 271 float getFloatValue(unsigned short unitType) const { return getValue<float>(
unitType); } |
| 272 float getFloatValue() const { return getValue<float>(); } | 272 float getFloatValue() const { return getValue<float>(); } |
| 273 | 273 |
| 274 int getIntValue(unsigned short unitType, ExceptionState& es) const { return
getValue<int>(unitType, es); } | 274 int getIntValue(unsigned short unitType, ExceptionState& exceptionState) con
st { return getValue<int>(unitType, exceptionState); } |
| 275 int getIntValue(unsigned short unitType) const { return getValue<int>(unitTy
pe); } | 275 int getIntValue(unsigned short unitType) const { return getValue<int>(unitTy
pe); } |
| 276 int getIntValue() const { return getValue<int>(); } | 276 int getIntValue() const { return getValue<int>(); } |
| 277 | 277 |
| 278 template<typename T> inline T getValue(unsigned short unitType, ExceptionSta
te& es) const { return clampTo<T>(getDoubleValue(unitType, es)); } | 278 template<typename T> inline T getValue(unsigned short unitType, ExceptionSta
te& exceptionState) const { return clampTo<T>(getDoubleValue(unitType, exception
State)); } |
| 279 template<typename T> inline T getValue(unsigned short unitType) const { retu
rn clampTo<T>(getDoubleValue(unitType)); } | 279 template<typename T> inline T getValue(unsigned short unitType) const { retu
rn clampTo<T>(getDoubleValue(unitType)); } |
| 280 template<typename T> inline T getValue() const { return clampTo<T>(getDouble
Value()); } | 280 template<typename T> inline T getValue() const { return clampTo<T>(getDouble
Value()); } |
| 281 | 281 |
| 282 void setStringValue(unsigned short stringType, const String& stringValue, Ex
ceptionState&); | 282 void setStringValue(unsigned short stringType, const String& stringValue, Ex
ceptionState&); |
| 283 String getStringValue(ExceptionState&) const; | 283 String getStringValue(ExceptionState&) const; |
| 284 String getStringValue() const; | 284 String getStringValue() const; |
| 285 | 285 |
| 286 Counter* getCounterValue(ExceptionState&) const; | 286 Counter* getCounterValue(ExceptionState&) const; |
| 287 Counter* getCounterValue() const { return m_primitiveUnitType != CSS_COUNTER
? 0 : m_value.counter; } | 287 Counter* getCounterValue() const { return m_primitiveUnitType != CSS_COUNTER
? 0 : m_value.counter; } |
| 288 | 288 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 CSSBasicShape* shape; | 382 CSSBasicShape* shape; |
| 383 CSSCalcValue* calc; | 383 CSSCalcValue* calc; |
| 384 } m_value; | 384 } m_value; |
| 385 }; | 385 }; |
| 386 | 386 |
| 387 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPrimitiveValue, isPrimitiveValue()); | 387 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPrimitiveValue, isPrimitiveValue()); |
| 388 | 388 |
| 389 } // namespace WebCore | 389 } // namespace WebCore |
| 390 | 390 |
| 391 #endif // CSSPrimitiveValue_h | 391 #endif // CSSPrimitiveValue_h |
| OLD | NEW |