| 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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 s_lengthModeMap.set(SVGNames::y2Attr, SVGLengthMode::Height); | 200 s_lengthModeMap.set(SVGNames::y2Attr, SVGLengthMode::Height); |
| 201 s_lengthModeMap.set(SVGNames::refXAttr, SVGLengthMode::Width); | 201 s_lengthModeMap.set(SVGNames::refXAttr, SVGLengthMode::Width); |
| 202 s_lengthModeMap.set(SVGNames::refYAttr, SVGLengthMode::Height); | 202 s_lengthModeMap.set(SVGNames::refYAttr, SVGLengthMode::Height); |
| 203 s_lengthModeMap.set(SVGNames::markerWidthAttr, SVGLengthMode::Width); | 203 s_lengthModeMap.set(SVGNames::markerWidthAttr, SVGLengthMode::Width); |
| 204 s_lengthModeMap.set(SVGNames::markerHeightAttr, SVGLengthMode::Height); | 204 s_lengthModeMap.set(SVGNames::markerHeightAttr, SVGLengthMode::Height); |
| 205 s_lengthModeMap.set(SVGNames::textLengthAttr, SVGLengthMode::Width); | 205 s_lengthModeMap.set(SVGNames::textLengthAttr, SVGLengthMode::Width); |
| 206 s_lengthModeMap.set(SVGNames::startOffsetAttr, SVGLengthMode::Width); | 206 s_lengthModeMap.set(SVGNames::startOffsetAttr, SVGLengthMode::Width); |
| 207 } | 207 } |
| 208 | 208 |
| 209 if (s_lengthModeMap.contains(attrName)) | 209 if (s_lengthModeMap.contains(attrName)) |
| 210 return s_lengthModeMap.get(attrName); | 210 return s_lengthModeMap.at(attrName); |
| 211 | 211 |
| 212 return SVGLengthMode::Other; | 212 return SVGLengthMode::Other; |
| 213 } | 213 } |
| 214 | 214 |
| 215 bool SVGLength::negativeValuesForbiddenForAnimatedLengthAttribute( | 215 bool SVGLength::negativeValuesForbiddenForAnimatedLengthAttribute( |
| 216 const QualifiedName& attrName) { | 216 const QualifiedName& attrName) { |
| 217 DEFINE_STATIC_LOCAL( | 217 DEFINE_STATIC_LOCAL( |
| 218 HashSet<QualifiedName>, noNegativeValuesSet, | 218 HashSet<QualifiedName>, noNegativeValuesSet, |
| 219 ({ | 219 ({ |
| 220 SVGNames::frAttr, SVGNames::rAttr, SVGNames::rxAttr, SVGNames::ryAttr, | 220 SVGNames::frAttr, SVGNames::rAttr, SVGNames::rxAttr, SVGNames::ryAttr, |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 | 268 |
| 269 float SVGLength::calculateDistance(SVGPropertyBase* toValue, | 269 float SVGLength::calculateDistance(SVGPropertyBase* toValue, |
| 270 SVGElement* contextElement) { | 270 SVGElement* contextElement) { |
| 271 SVGLengthContext lengthContext(contextElement); | 271 SVGLengthContext lengthContext(contextElement); |
| 272 SVGLength* toLength = toSVGLength(toValue); | 272 SVGLength* toLength = toSVGLength(toValue); |
| 273 | 273 |
| 274 return fabsf(toLength->value(lengthContext) - value(lengthContext)); | 274 return fabsf(toLength->value(lengthContext) - value(lengthContext)); |
| 275 } | 275 } |
| 276 | 276 |
| 277 } // namespace blink | 277 } // namespace blink |
| OLD | NEW |