From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- .../svg/SVGComponentTransferFunctionElement.cpp | 40 ++++++++-------------- 1 file changed, 15 insertions(+), 25 deletions(-) (limited to 'Source/WebCore/svg/SVGComponentTransferFunctionElement.cpp') diff --git a/Source/WebCore/svg/SVGComponentTransferFunctionElement.cpp b/Source/WebCore/svg/SVGComponentTransferFunctionElement.cpp index 6fefcf596..ae2dc6521 100644 --- a/Source/WebCore/svg/SVGComponentTransferFunctionElement.cpp +++ b/Source/WebCore/svg/SVGComponentTransferFunctionElement.cpp @@ -19,15 +19,12 @@ */ #include "config.h" - -#if ENABLE(SVG) && ENABLE(FILTERS) #include "SVGComponentTransferFunctionElement.h" -#include "Attribute.h" -#include "SVGElementInstance.h" #include "SVGFEComponentTransferElement.h" #include "SVGNames.h" -#include "SVGNumberList.h" +#include "SVGNumberListValues.h" +#include namespace WebCore { @@ -62,26 +59,21 @@ SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement(const Q bool SVGComponentTransferFunctionElement::isSupportedAttribute(const QualifiedName& attrName) { - DEFINE_STATIC_LOCAL(HashSet, supportedAttributes, ()); - if (supportedAttributes.isEmpty()) { - supportedAttributes.add(SVGNames::typeAttr); - supportedAttributes.add(SVGNames::tableValuesAttr); - supportedAttributes.add(SVGNames::slopeAttr); - supportedAttributes.add(SVGNames::interceptAttr); - supportedAttributes.add(SVGNames::amplitudeAttr); - supportedAttributes.add(SVGNames::exponentAttr); - supportedAttributes.add(SVGNames::offsetAttr); + static NeverDestroyed> supportedAttributes; + if (supportedAttributes.get().isEmpty()) { + supportedAttributes.get().add(SVGNames::typeAttr); + supportedAttributes.get().add(SVGNames::tableValuesAttr); + supportedAttributes.get().add(SVGNames::slopeAttr); + supportedAttributes.get().add(SVGNames::interceptAttr); + supportedAttributes.get().add(SVGNames::amplitudeAttr); + supportedAttributes.get().add(SVGNames::exponentAttr); + supportedAttributes.get().add(SVGNames::offsetAttr); } - return supportedAttributes.contains(attrName); + return supportedAttributes.get().contains(attrName); } void SVGComponentTransferFunctionElement::parseAttribute(const QualifiedName& name, const AtomicString& value) { - if (!isSupportedAttribute(name)) { - SVGElement::parseAttribute(name, value); - return; - } - if (name == SVGNames::typeAttr) { ComponentTransferType propertyValue = SVGPropertyTraits::fromString(value); if (propertyValue > 0) @@ -90,7 +82,7 @@ void SVGComponentTransferFunctionElement::parseAttribute(const QualifiedName& na } if (name == SVGNames::tableValuesAttr) { - SVGNumberList newList; + SVGNumberListValues newList; newList.parse(value); detachAnimatedTableValuesListWrappers(newList.size()); setTableValuesBaseValue(newList); @@ -122,7 +114,7 @@ void SVGComponentTransferFunctionElement::parseAttribute(const QualifiedName& na return; } - ASSERT_NOT_REACHED(); + SVGElement::parseAttribute(name, value); } void SVGComponentTransferFunctionElement::svgAttributeChanged(const QualifiedName& attrName) @@ -132,7 +124,7 @@ void SVGComponentTransferFunctionElement::svgAttributeChanged(const QualifiedNam return; } - SVGElementInstance::InvalidationGuard invalidationGuard(this); + InstanceInvalidationGuard guard(*this); invalidateFilterPrimitiveParent(this); } @@ -151,5 +143,3 @@ ComponentTransferFunction SVGComponentTransferFunctionElement::transferFunction( } } - -#endif // ENABLE(SVG) -- cgit v1.2.1