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

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

Issue 18228003: Remove AtomicStringImpl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 months 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 142
143 path.addRect(FloatRect(x, y, width, height)); 143 path.addRect(FloatRect(x, y, width, height));
144 } 144 }
145 145
146 void updatePathFromGraphicsElement(SVGElement* element, Path& path) 146 void updatePathFromGraphicsElement(SVGElement* element, Path& path)
147 { 147 {
148 ASSERT(element); 148 ASSERT(element);
149 ASSERT(path.isEmpty()); 149 ASSERT(path.isEmpty());
150 150
151 typedef void (*PathUpdateFunction)(SVGElement*, Path&); 151 typedef void (*PathUpdateFunction)(SVGElement*, Path&);
152 static HashMap<AtomicStringImpl*, PathUpdateFunction>* map = 0; 152 static HashMap<StringImpl*, PathUpdateFunction>* map = 0;
153 if (!map) { 153 if (!map) {
154 map = new HashMap<AtomicStringImpl*, PathUpdateFunction>; 154 map = new HashMap<StringImpl*, PathUpdateFunction>;
155 map->set(SVGNames::circleTag.localName().impl(), updatePathFromCircleEle ment); 155 map->set(SVGNames::circleTag.localName().impl(), updatePathFromCircleEle ment);
156 map->set(SVGNames::ellipseTag.localName().impl(), updatePathFromEllipseE lement); 156 map->set(SVGNames::ellipseTag.localName().impl(), updatePathFromEllipseE lement);
157 map->set(SVGNames::lineTag.localName().impl(), updatePathFromLineElement ); 157 map->set(SVGNames::lineTag.localName().impl(), updatePathFromLineElement );
158 map->set(SVGNames::pathTag.localName().impl(), updatePathFromPathElement ); 158 map->set(SVGNames::pathTag.localName().impl(), updatePathFromPathElement );
159 map->set(SVGNames::polygonTag.localName().impl(), updatePathFromPolygonE lement); 159 map->set(SVGNames::polygonTag.localName().impl(), updatePathFromPolygonE lement);
160 map->set(SVGNames::polylineTag.localName().impl(), updatePathFromPolylin eElement); 160 map->set(SVGNames::polylineTag.localName().impl(), updatePathFromPolylin eElement);
161 map->set(SVGNames::rectTag.localName().impl(), updatePathFromRectElement ); 161 map->set(SVGNames::rectTag.localName().impl(), updatePathFromRectElement );
162 } 162 }
163 163
164 if (PathUpdateFunction pathUpdateFunction = map->get(element->localName().im pl())) 164 if (PathUpdateFunction pathUpdateFunction = map->get(element->localName().im pl()))
165 (*pathUpdateFunction)(element, path); 165 (*pathUpdateFunction)(element, path);
166 } 166 }
167 167
168 } // namespace WebCore 168 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698