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

Side by Side Diff: Source/core/svg/SVGGraphicsElement.cpp

Issue 421863002: SVGElement::parseAttribute resolves property via property map (Step 1) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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/svg/SVGElement.cpp ('k') | Source/core/svg/SVGRectElement.cpp » ('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) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
4 * Copyright (C) 2014 Google, Inc. 4 * Copyright (C) 2014 Google, Inc.
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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); 172 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
173 if (supportedAttributes.isEmpty()) { 173 if (supportedAttributes.isEmpty()) {
174 SVGTests::addSupportedAttributes(supportedAttributes); 174 SVGTests::addSupportedAttributes(supportedAttributes);
175 supportedAttributes.add(SVGNames::transformAttr); 175 supportedAttributes.add(SVGNames::transformAttr);
176 } 176 }
177 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); 177 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
178 } 178 }
179 179
180 void SVGGraphicsElement::parseAttribute(const QualifiedName& name, const AtomicS tring& value) 180 void SVGGraphicsElement::parseAttribute(const QualifiedName& name, const AtomicS tring& value)
181 { 181 {
182 if (!isSupportedAttribute(name)) { 182 parseAttributeNew(name, value);
183 SVGElement::parseAttribute(name, value);
184 return;
185 }
186
187 SVGParsingError parseError = NoError;
188
189 if (name == SVGNames::transformAttr)
190 m_transform->setBaseValueAsString(value, parseError);
191 else if (SVGTests::parseAttribute(name, value))
kouhei (in TOK) 2014/07/28 03:44:59 All attributes used in SVGTests are already regist
192 return;
193 else
194 ASSERT_NOT_REACHED();
195
196 reportAttributeParsingError(parseError, name, value);
197 } 183 }
198 184
199 void SVGGraphicsElement::svgAttributeChanged(const QualifiedName& attrName) 185 void SVGGraphicsElement::svgAttributeChanged(const QualifiedName& attrName)
200 { 186 {
201 if (!isSupportedAttribute(attrName)) { 187 if (!isSupportedAttribute(attrName)) {
202 SVGElement::svgAttributeChanged(attrName); 188 SVGElement::svgAttributeChanged(attrName);
203 return; 189 return;
204 } 190 }
205 191
206 SVGElement::InvalidationGuard invalidationGuard(this); 192 SVGElement::InvalidationGuard invalidationGuard(this);
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 } 253 }
268 254
269 void SVGGraphicsElement::toClipPath(Path& path) 255 void SVGGraphicsElement::toClipPath(Path& path)
270 { 256 {
271 updatePathFromGraphicsElement(this, path); 257 updatePathFromGraphicsElement(this, path);
272 // FIXME: How do we know the element has done a layout? 258 // FIXME: How do we know the element has done a layout?
273 path.transform(animatedLocalTransform()); 259 path.transform(animatedLocalTransform());
274 } 260 }
275 261
276 } 262 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGElement.cpp ('k') | Source/core/svg/SVGRectElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698