| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2007 Apple Inc. All rights reserved. | 4 * Copyright (C) 2007 Apple Inc. All rights reserved. |
| 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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 }; | 296 }; |
| 297 | 297 |
| 298 if (svgType == LengthTypeUnknown) | 298 if (svgType == LengthTypeUnknown) |
| 299 return SVGLength::create(); | 299 return SVGLength::create(); |
| 300 | 300 |
| 301 RefPtr<SVGLength> length = SVGLength::create(); | 301 RefPtr<SVGLength> length = SVGLength::create(); |
| 302 length->newValueSpecifiedUnits(svgType, value->getFloatValue()); | 302 length->newValueSpecifiedUnits(svgType, value->getFloatValue()); |
| 303 return length.release(); | 303 return length.release(); |
| 304 } | 304 } |
| 305 | 305 |
| 306 PassRefPtr<CSSPrimitiveValue> SVGLength::toCSSPrimitiveValue(PassRefPtr<SVGLengt
h> passLength) | 306 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> SVGLength::toCSSPrimitiveValue(PassRef
Ptr<SVGLength> passLength) |
| 307 { | 307 { |
| 308 RefPtr<SVGLength> length = passLength; | 308 RefPtr<SVGLength> length = passLength; |
| 309 | 309 |
| 310 CSSPrimitiveValue::UnitTypes cssType = CSSPrimitiveValue::CSS_UNKNOWN; | 310 CSSPrimitiveValue::UnitTypes cssType = CSSPrimitiveValue::CSS_UNKNOWN; |
| 311 switch (length->unitType()) { | 311 switch (length->unitType()) { |
| 312 case LengthTypeUnknown: | 312 case LengthTypeUnknown: |
| 313 break; | 313 break; |
| 314 case LengthTypeNumber: | 314 case LengthTypeNumber: |
| 315 cssType = CSSPrimitiveValue::CSS_NUMBER; | 315 cssType = CSSPrimitiveValue::CSS_NUMBER; |
| 316 break; | 316 break; |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 | 458 |
| 459 float SVGLength::calculateDistance(PassRefPtr<NewSVGPropertyBase> toValue, SVGEl
ement* contextElement) | 459 float SVGLength::calculateDistance(PassRefPtr<NewSVGPropertyBase> toValue, SVGEl
ement* contextElement) |
| 460 { | 460 { |
| 461 SVGLengthContext lengthContext(contextElement); | 461 SVGLengthContext lengthContext(contextElement); |
| 462 RefPtr<SVGLength> toLength = toSVGLength(toValue); | 462 RefPtr<SVGLength> toLength = toSVGLength(toValue); |
| 463 | 463 |
| 464 return fabsf(toLength->value(lengthContext, IGNORE_EXCEPTION) - value(length
Context, IGNORE_EXCEPTION)); | 464 return fabsf(toLength->value(lengthContext, IGNORE_EXCEPTION) - value(length
Context, IGNORE_EXCEPTION)); |
| 465 } | 465 } |
| 466 | 466 |
| 467 } | 467 } |
| OLD | NEW |