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

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

Issue 19804005: 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
« no previous file with comments | « Source/core/html/HTMLObjectElement.cpp ('k') | Source/core/scripts/make_names.pl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 path.addRect(FloatRect(x, y, width, height)); 140 path.addRect(FloatRect(x, y, width, height));
141 } 141 }
142 142
143 void updatePathFromGraphicsElement(SVGElement* element, Path& path) 143 void updatePathFromGraphicsElement(SVGElement* element, Path& path)
144 { 144 {
145 ASSERT(element); 145 ASSERT(element);
146 ASSERT(path.isEmpty()); 146 ASSERT(path.isEmpty());
147 147
148 typedef void (*PathUpdateFunction)(SVGElement*, Path&); 148 typedef void (*PathUpdateFunction)(SVGElement*, Path&);
149 static HashMap<AtomicStringImpl*, PathUpdateFunction>* map = 0; 149 static HashMap<StringImpl*, PathUpdateFunction>* map = 0;
150 if (!map) { 150 if (!map) {
151 map = new HashMap<AtomicStringImpl*, PathUpdateFunction>; 151 map = new HashMap<StringImpl*, PathUpdateFunction>;
152 map->set(SVGNames::circleTag.localName().impl(), updatePathFromCircleEle ment); 152 map->set(SVGNames::circleTag.localName().impl(), updatePathFromCircleEle ment);
153 map->set(SVGNames::ellipseTag.localName().impl(), updatePathFromEllipseE lement); 153 map->set(SVGNames::ellipseTag.localName().impl(), updatePathFromEllipseE lement);
154 map->set(SVGNames::lineTag.localName().impl(), updatePathFromLineElement ); 154 map->set(SVGNames::lineTag.localName().impl(), updatePathFromLineElement );
155 map->set(SVGNames::pathTag.localName().impl(), updatePathFromPathElement ); 155 map->set(SVGNames::pathTag.localName().impl(), updatePathFromPathElement );
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
OLDNEW
« no previous file with comments | « Source/core/html/HTMLObjectElement.cpp ('k') | Source/core/scripts/make_names.pl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698