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

Unified Diff: Source/core/svg/SVGClipPathElement.cpp

Issue 420193011: SVGElement::parseAttribute resolves property via property map (Step 2) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/svg/SVGClipPathElement.h ('k') | Source/core/svg/SVGComponentTransferFunctionElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGClipPathElement.cpp
diff --git a/Source/core/svg/SVGClipPathElement.cpp b/Source/core/svg/SVGClipPathElement.cpp
index 4de9d37af7a77d7f5b95606563cd4b34c9f1efb8..335a01350485ed9d290813f2942c866ade65376c 100644
--- a/Source/core/svg/SVGClipPathElement.cpp
+++ b/Source/core/svg/SVGClipPathElement.cpp
@@ -37,35 +37,14 @@ inline SVGClipPathElement::SVGClipPathElement(Document& document)
DEFINE_NODE_FACTORY(SVGClipPathElement)
-bool SVGClipPathElement::isSupportedAttribute(const QualifiedName& attrName)
-{
- DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
- if (supportedAttributes.isEmpty())
- supportedAttributes.add(SVGNames::clipPathUnitsAttr);
-
- return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
-}
-
void SVGClipPathElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
- if (!isSupportedAttribute(name)) {
- SVGGraphicsElement::parseAttribute(name, value);
- return;
- }
-
- SVGParsingError parseError = NoError;
-
- if (name == SVGNames::clipPathUnitsAttr)
- m_clipPathUnits->setBaseValueAsString(value, parseError);
- else
- ASSERT_NOT_REACHED();
-
- reportAttributeParsingError(parseError, name, value);
+ parseAttributeNew(name, value);
}
void SVGClipPathElement::svgAttributeChanged(const QualifiedName& attrName)
{
- if (!isSupportedAttribute(attrName)) {
+ if (attrName != SVGNames::clipPathUnitsAttr) {
SVGGraphicsElement::svgAttributeChanged(attrName);
return;
}
« no previous file with comments | « Source/core/svg/SVGClipPathElement.h ('k') | Source/core/svg/SVGComponentTransferFunctionElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698