| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 | 49 |
| 50 CSSPrimitiveValue::UnitType typeWithCalcResolved() const { return m_value->t
ypeWithCalcResolved(); } | 50 CSSPrimitiveValue::UnitType typeWithCalcResolved() const { return m_value->t
ypeWithCalcResolved(); } |
| 51 void setUnitType(CSSPrimitiveValue::UnitType); | 51 void setUnitType(CSSPrimitiveValue::UnitType); |
| 52 SVGLengthMode unitMode() const { return static_cast<SVGLengthMode>(m_unitMod
e); } | 52 SVGLengthMode unitMode() const { return static_cast<SVGLengthMode>(m_unitMod
e); } |
| 53 | 53 |
| 54 bool operator==(const SVGLength&) const; | 54 bool operator==(const SVGLength&) const; |
| 55 bool operator!=(const SVGLength& other) const { return !operator==(other); } | 55 bool operator!=(const SVGLength& other) const { return !operator==(other); } |
| 56 | 56 |
| 57 float value(const SVGLengthContext&) const; | 57 float value(const SVGLengthContext&) const; |
| 58 void setValue(float, const SVGLengthContext&); | 58 void setValue(float, const SVGLengthContext&); |
| 59 void setValueAsNumber(float); |
| 59 | 60 |
| 60 float valueInSpecifiedUnits() const { return m_value->getFloatValue(); } | 61 float valueInSpecifiedUnits() const { return m_value->getFloatValue(); } |
| 61 void setValueInSpecifiedUnits(float value) | 62 void setValueInSpecifiedUnits(float value) |
| 62 { | 63 { |
| 63 m_value = CSSPrimitiveValue::create(value, m_value->typeWithCalcResolved
()); | 64 m_value = CSSPrimitiveValue::create(value, m_value->typeWithCalcResolved
()); |
| 64 } | 65 } |
| 65 | 66 |
| 66 CSSPrimitiveValue* asCSSPrimitiveValue() const { return m_value.get(); } | 67 CSSPrimitiveValue* asCSSPrimitiveValue() const { return m_value.get(); } |
| 67 | 68 |
| 68 // Resolves LengthTypePercentage into a normalized floating point number (fu
ll value is 1.0). | 69 // Resolves LengthTypePercentage into a normalized floating point number (fu
ll value is 1.0). |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 | 105 |
| 105 Member<CSSPrimitiveValue> m_value; | 106 Member<CSSPrimitiveValue> m_value; |
| 106 unsigned m_unitMode : 2; | 107 unsigned m_unitMode : 2; |
| 107 }; | 108 }; |
| 108 | 109 |
| 109 DEFINE_SVG_PROPERTY_TYPE_CASTS(SVGLength); | 110 DEFINE_SVG_PROPERTY_TYPE_CASTS(SVGLength); |
| 110 | 111 |
| 111 } // namespace blink | 112 } // namespace blink |
| 112 | 113 |
| 113 #endif // SVGLength_h | 114 #endif // SVGLength_h |
| OLD | NEW |