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

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

Issue 651353004: SVGElement::parseAttribute resolves property via property map (Step 2.5) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git/+/master
Patch Set: Created 6 years, 2 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/SVGViewElement.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGViewElement.cpp
diff --git a/Source/core/svg/SVGViewElement.cpp b/Source/core/svg/SVGViewElement.cpp
index 4c7a9c2c8a516a93c1a4a78c94729f3a9ac5e890..21d938d30a812ccb2295e3d793a66db8e32d55e1 100644
--- a/Source/core/svg/SVGViewElement.cpp
+++ b/Source/core/svg/SVGViewElement.cpp
@@ -34,35 +34,12 @@ inline SVGViewElement::SVGViewElement(Document& document)
DEFINE_NODE_FACTORY(SVGViewElement)
-bool SVGViewElement::isSupportedAttribute(const QualifiedName& attrName)
-{
- DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
- if (supportedAttributes.isEmpty()) {
- SVGFitToViewBox::addSupportedAttributes(supportedAttributes);
- SVGZoomAndPan::addSupportedAttributes(supportedAttributes);
- supportedAttributes.add(SVGNames::viewTargetAttr);
- }
- return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
-}
-
void SVGViewElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
- if (!isSupportedAttribute(name)) {
- SVGElement::parseAttribute(name, value);
+ if (SVGZoomAndPan::parseAttribute(name, value))
return;
- }
-
- SVGParsingError parseError = NoError;
-
- if (SVGFitToViewBox::parseAttribute(name, value, document(), parseError)) {
- } else if (SVGZoomAndPan::parseAttribute(name, value)) {
- } else if (name == SVGNames::viewTargetAttr) {
- m_viewTarget->setBaseValueAsString(value, parseError);
- } else {
- ASSERT_NOT_REACHED();
- }
- reportAttributeParsingError(parseError, name, value);
+ parseAttributeNew(name, value);
}
} // namespace blink
« no previous file with comments | « Source/core/svg/SVGViewElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698