| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 #include "SVGNames.h" | 23 #include "SVGNames.h" |
| 24 #include "core/platform/graphics/Path.h" | 24 #include "core/platform/graphics/Path.h" |
| 25 #include "core/svg/SVGCircleElement.h" | 25 #include "core/svg/SVGCircleElement.h" |
| 26 #include "core/svg/SVGEllipseElement.h" | 26 #include "core/svg/SVGEllipseElement.h" |
| 27 #include "core/svg/SVGLineElement.h" | 27 #include "core/svg/SVGLineElement.h" |
| 28 #include "core/svg/SVGPathElement.h" | 28 #include "core/svg/SVGPathElement.h" |
| 29 #include "core/svg/SVGPathUtilities.h" | 29 #include "core/svg/SVGPathUtilities.h" |
| 30 #include "core/svg/SVGPolygonElement.h" | 30 #include "core/svg/SVGPolygonElement.h" |
| 31 #include "core/svg/SVGPolylineElement.h" | 31 #include "core/svg/SVGPolylineElement.h" |
| 32 #include "core/svg/SVGRectElement.h" | 32 #include "core/svg/SVGRectElement.h" |
| 33 #include <wtf/HashMap.h> | 33 #include "wtf/HashMap.h" |
| 34 | 34 |
| 35 namespace WebCore { | 35 namespace WebCore { |
| 36 | 36 |
| 37 static void updatePathFromCircleElement(SVGElement* element, Path& path) | 37 static void updatePathFromCircleElement(SVGElement* element, Path& path) |
| 38 { | 38 { |
| 39 ASSERT(element->hasTagName(SVGNames::circleTag)); | 39 ASSERT(element->hasTagName(SVGNames::circleTag)); |
| 40 SVGCircleElement* circle = static_cast<SVGCircleElement*>(element); | 40 SVGCircleElement* circle = static_cast<SVGCircleElement*>(element); |
| 41 | 41 |
| 42 SVGLengthContext lengthContext(element); | 42 SVGLengthContext lengthContext(element); |
| 43 float r = circle->rCurrentValue().value(lengthContext); | 43 float r = circle->rCurrentValue().value(lengthContext); |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 map->set(SVGNames::polygonTag.localName().impl(), updatePathFromPolygonE
lement); | 156 map->set(SVGNames::polygonTag.localName().impl(), updatePathFromPolygonE
lement); |
| 157 map->set(SVGNames::polylineTag.localName().impl(), updatePathFromPolylin
eElement); | 157 map->set(SVGNames::polylineTag.localName().impl(), updatePathFromPolylin
eElement); |
| 158 map->set(SVGNames::rectTag.localName().impl(), updatePathFromRectElement
); | 158 map->set(SVGNames::rectTag.localName().impl(), updatePathFromRectElement
); |
| 159 } | 159 } |
| 160 | 160 |
| 161 if (PathUpdateFunction pathUpdateFunction = map->get(element->localName().im
pl())) | 161 if (PathUpdateFunction pathUpdateFunction = map->get(element->localName().im
pl())) |
| 162 (*pathUpdateFunction)(element, path); | 162 (*pathUpdateFunction)(element, path); |
| 163 } | 163 } |
| 164 | 164 |
| 165 } // namespace WebCore | 165 } // namespace WebCore |
| OLD | NEW |