Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Side by Side Diff: Source/core/rendering/svg/SVGPathData.cpp

Issue 734053005: Remove globalSVGPath* from SVGPathUtilities.cpp (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 { 67 {
68 SVGLineElement* line = toSVGLineElement(element); 68 SVGLineElement* line = toSVGLineElement(element);
69 69
70 SVGLengthContext lengthContext(element); 70 SVGLengthContext lengthContext(element);
71 path.moveTo(FloatPoint(line->x1()->currentValue()->value(lengthContext), lin e->y1()->currentValue()->value(lengthContext))); 71 path.moveTo(FloatPoint(line->x1()->currentValue()->value(lengthContext), lin e->y1()->currentValue()->value(lengthContext)));
72 path.addLineTo(FloatPoint(line->x2()->currentValue()->value(lengthContext), line->y2()->currentValue()->value(lengthContext))); 72 path.addLineTo(FloatPoint(line->x2()->currentValue()->value(lengthContext), line->y2()->currentValue()->value(lengthContext)));
73 } 73 }
74 74
75 static void updatePathFromPathElement(SVGElement* element, Path& path) 75 static void updatePathFromPathElement(SVGElement* element, Path& path)
76 { 76 {
77 buildPathFromByteStream(toSVGPathElement(element)->pathByteStream(), path); 77 buildPathFromByteStream(*toSVGPathElement(element)->pathByteStream(), path);
78 } 78 }
79 79
80 static void updatePathFromPolylineElement(SVGElement* element, Path& path) 80 static void updatePathFromPolylineElement(SVGElement* element, Path& path)
81 { 81 {
82 RefPtrWillBeRawPtr<SVGPointList> points = toSVGPolyElement(element)->points( )->currentValue(); 82 RefPtrWillBeRawPtr<SVGPointList> points = toSVGPolyElement(element)->points( )->currentValue();
83 if (points->isEmpty()) 83 if (points->isEmpty())
84 return; 84 return;
85 85
86 SVGPointList::ConstIterator it = points->begin(); 86 SVGPointList::ConstIterator it = points->begin();
87 SVGPointList::ConstIterator itEnd = points->end(); 87 SVGPointList::ConstIterator itEnd = points->end();
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 map->set(polygonTag.localName().impl(), updatePathFromPolygonElement); 147 map->set(polygonTag.localName().impl(), updatePathFromPolygonElement);
148 map->set(polylineTag.localName().impl(), updatePathFromPolylineElement); 148 map->set(polylineTag.localName().impl(), updatePathFromPolylineElement);
149 map->set(rectTag.localName().impl(), updatePathFromRectElement); 149 map->set(rectTag.localName().impl(), updatePathFromRectElement);
150 } 150 }
151 151
152 if (PathUpdateFunction pathUpdateFunction = map->get(element->localName().im pl())) 152 if (PathUpdateFunction pathUpdateFunction = map->get(element->localName().im pl()))
153 (*pathUpdateFunction)(element, path); 153 (*pathUpdateFunction)(element, path);
154 } 154 }
155 155
156 } // namespace blink 156 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/core/rendering/svg/SVGRenderTreeAsText.cpp » ('j') | Source/core/svg/SVGPathBlender.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698