Source/WebCore/ChangeLog

 12014-05-07 Sergio Villar Senin <svillar@igalia.com>
 2
 3 Replace DEPRECATED_DEFINE_STATIC_LOCAL by static NeverDestroyed<T> in svg/
 4 https://bugs.webkit.org/show_bug.cgi?id=132647
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 * svg/SVGAElement.cpp:
 9 (WebCore::SVGAElement::isSupportedAttribute):
 10 * svg/SVGAnimateMotionElement.cpp:
 11 (WebCore::SVGAnimateMotionElement::isSupportedAttribute):
 12 * svg/SVGAnimateTransformElement.cpp:
 13 (WebCore::SVGAnimateTransformElement::isSupportedAttribute):
 14 * svg/SVGAnimatedLength.cpp:
 15 (WebCore::sharedSVGLength):
 16 * svg/SVGAnimationElement.cpp:
 17 (WebCore::SVGAnimationElement::isSupportedAttribute):
 18 * svg/SVGCircleElement.cpp:
 19 (WebCore::SVGCircleElement::isSupportedAttribute):
 20 * svg/SVGClipPathElement.cpp:
 21 (WebCore::SVGClipPathElement::isSupportedAttribute):
 22 * svg/SVGComponentTransferFunctionElement.cpp:
 23 (WebCore::SVGComponentTransferFunctionElement::isSupportedAttribute):
 24 * svg/SVGCursorElement.cpp:
 25 (WebCore::SVGCursorElement::isSupportedAttribute):
 26 * svg/SVGElement.cpp:
 27 (WebCore::SVGElement::instancesForElement):
 28 (WebCore::SVGElement::childShouldCreateRenderer):
 29 * svg/SVGEllipseElement.cpp:
 30 (WebCore::SVGEllipseElement::isSupportedAttribute):
 31 * svg/SVGFEBlendElement.cpp:
 32 (WebCore::SVGFEBlendElement::isSupportedAttribute):
 33 * svg/SVGFEColorMatrixElement.cpp:
 34 (WebCore::SVGFEColorMatrixElement::isSupportedAttribute):
 35 * svg/SVGFEComponentTransferElement.cpp:
 36 (WebCore::SVGFEComponentTransferElement::isSupportedAttribute):
 37 * svg/SVGFECompositeElement.cpp:
 38 (WebCore::SVGFECompositeElement::isSupportedAttribute):
 39 * svg/SVGFEConvolveMatrixElement.cpp:
 40 (WebCore::SVGFEConvolveMatrixElement::isSupportedAttribute):
 41 * svg/SVGFEDiffuseLightingElement.cpp:
 42 (WebCore::SVGFEDiffuseLightingElement::isSupportedAttribute):
 43 * svg/SVGFEDisplacementMapElement.cpp:
 44 (WebCore::SVGFEDisplacementMapElement::isSupportedAttribute):
 45 * svg/SVGFEDropShadowElement.cpp:
 46 (WebCore::SVGFEDropShadowElement::isSupportedAttribute):
 47 * svg/SVGFEGaussianBlurElement.cpp:
 48 (WebCore::SVGFEGaussianBlurElement::isSupportedAttribute):
 49 * svg/SVGFEImageElement.cpp:
 50 (WebCore::SVGFEImageElement::isSupportedAttribute):
 51 * svg/SVGFELightElement.cpp:
 52 (WebCore::SVGFELightElement::isSupportedAttribute):
 53 * svg/SVGFEMergeNodeElement.cpp:
 54 (WebCore::SVGFEMergeNodeElement::isSupportedAttribute):
 55 * svg/SVGFEMorphologyElement.cpp:
 56 (WebCore::SVGFEMorphologyElement::isSupportedAttribute):
 57 * svg/SVGFEOffsetElement.cpp:
 58 (WebCore::SVGFEOffsetElement::isSupportedAttribute):
 59 * svg/SVGFESpecularLightingElement.cpp:
 60 (WebCore::SVGFESpecularLightingElement::isSupportedAttribute):
 61 * svg/SVGFETileElement.cpp:
 62 (WebCore::SVGFETileElement::isSupportedAttribute):
 63 * svg/SVGFETurbulenceElement.cpp:
 64 (WebCore::SVGFETurbulenceElement::isSupportedAttribute):
 65 * svg/SVGFilterElement.cpp:
 66 (WebCore::SVGFilterElement::isSupportedAttribute):
 67 (WebCore::SVGFilterElement::childShouldCreateRenderer):
 68 * svg/SVGFilterPrimitiveStandardAttributes.cpp:
 69 (WebCore::SVGFilterPrimitiveStandardAttributes::isSupportedAttribute):
 70 * svg/SVGForeignObjectElement.cpp:
 71 (WebCore::SVGForeignObjectElement::isSupportedAttribute):
 72 * svg/SVGGElement.cpp:
 73 (WebCore::SVGGElement::isSupportedAttribute):
 74 * svg/SVGGradientElement.cpp:
 75 (WebCore::SVGGradientElement::isSupportedAttribute):
 76 * svg/SVGGraphicsElement.cpp:
 77 (WebCore::SVGGraphicsElement::isSupportedAttribute):
 78 * svg/SVGImageElement.cpp:
 79 (WebCore::SVGImageElement::isSupportedAttribute):
 80 * svg/SVGLength.cpp:
 81 (WebCore::SVGLength::lengthModeForAnimatedLengthAttribute):
 82 * svg/SVGLineElement.cpp:
 83 (WebCore::SVGLineElement::isSupportedAttribute):
 84 * svg/SVGLinearGradientElement.cpp:
 85 (WebCore::SVGLinearGradientElement::isSupportedAttribute):
 86 * svg/SVGMPathElement.cpp:
 87 (WebCore::SVGMPathElement::isSupportedAttribute):
 88 * svg/SVGMarkerElement.cpp:
 89 (WebCore::SVGMarkerElement::isSupportedAttribute):
 90 * svg/SVGMaskElement.cpp:
 91 (WebCore::SVGMaskElement::isSupportedAttribute):
 92 * svg/SVGPathElement.cpp:
 93 (WebCore::SVGPathElement::isSupportedAttribute):
 94 * svg/SVGPatternElement.cpp:
 95 (WebCore::SVGPatternElement::isSupportedAttribute):
 96 * svg/SVGPolyElement.cpp:
 97 (WebCore::SVGPolyElement::isSupportedAttribute):
 98 * svg/SVGRadialGradientElement.cpp:
 99 (WebCore::SVGRadialGradientElement::isSupportedAttribute):
 100 * svg/SVGRectElement.cpp:
 101 (WebCore::SVGRectElement::isSupportedAttribute):
 102 * svg/SVGScriptElement.cpp:
 103 (WebCore::SVGScriptElement::isSupportedAttribute):
 104 * svg/SVGStopElement.cpp:
 105 (WebCore::SVGStopElement::isSupportedAttribute):
 106 * svg/SVGStyleElement.cpp:
 107 (WebCore::SVGStyleElement::isSupportedAttribute):
 108 * svg/SVGSymbolElement.cpp:
 109 (WebCore::SVGSymbolElement::isSupportedAttribute):
 110 * svg/SVGTRefElement.cpp:
 111 (WebCore::SVGTRefElement::isSupportedAttribute):
 112 * svg/SVGTests.cpp:
 113 (WebCore::SVGTests::attributeToPropertyMap):
 114 * svg/SVGTextContentElement.cpp:
 115 (WebCore::SVGTextContentElement::textLengthAnimated):
 116 (WebCore::SVGTextContentElement::isSupportedAttribute):
 117 * svg/SVGTextPathElement.cpp:
 118 (WebCore::SVGTextPathElement::isSupportedAttribute):
 119 * svg/SVGTextPositioningElement.cpp:
 120 (WebCore::SVGTextPositioningElement::isSupportedAttribute):
 121 * svg/SVGUseElement.cpp:
 122 (WebCore::SVGUseElement::isSupportedAttribute):
 123 (WebCore::isDisallowedElement):
 124 * svg/SVGViewElement.cpp:
 125 (WebCore::SVGViewElement::isSupportedAttribute):
 126
11272014-05-05 Andrei Bucur <abucur@adobe.com>
2128
3129 [CSS Regions] ASSERT when hovering over region

Source/WebCore/svg/SVGAElement.cpp

4444#include "SVGNames.h"
4545#include "SVGSMILElement.h"
4646#include "XLinkNames.h"
 47#include <wtf/NeverDestroyed.h>
4748
4849namespace WebCore {
4950

@@String SVGAElement::title() const
8687
8788bool SVGAElement::isSupportedAttribute(const QualifiedName& attrName)
8889{
89  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
90  if (supportedAttributes.isEmpty()) {
 90 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 91 if (supportedAttributes.get().isEmpty()) {
9192 SVGURIReference::addSupportedAttributes(supportedAttributes);
9293 SVGLangSpace::addSupportedAttributes(supportedAttributes);
9394 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes);
94  supportedAttributes.add(SVGNames::targetAttr);
 95 supportedAttributes.get().add(SVGNames::targetAttr);
9596 }
96  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 97 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
9798}
9899
99100void SVGAElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGAnimateMotionElement.cpp

3737#include "SVGPathUtilities.h"
3838#include "SVGTransformList.h"
3939#include <wtf/MathExtras.h>
 40#include <wtf/NeverDestroyed.h>
4041#include <wtf/StdLibExtras.h>
4142#include <wtf/text/StringView.h>
4243

@@bool SVGAnimateMotionElement::hasValidAttributeName()
9899
99100bool SVGAnimateMotionElement::isSupportedAttribute(const QualifiedName& attrName)
100101{
101  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
102  if (supportedAttributes.isEmpty())
103  supportedAttributes.add(SVGNames::pathAttr);
104  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 102 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 103 if (supportedAttributes.get().isEmpty())
 104 supportedAttributes.get().add(SVGNames::pathAttr);
 105 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
105106}
106107
107108void SVGAnimateMotionElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGAnimateTransformElement.cpp

2626#include "Attribute.h"
2727#include "SVGNames.h"
2828#include "SVGTransformable.h"
 29#include <wtf/NeverDestroyed.h>
2930
3031namespace WebCore {
3132

@@bool SVGAnimateTransformElement::hasValidAttributeType()
5556
5657bool SVGAnimateTransformElement::isSupportedAttribute(const QualifiedName& attrName)
5758{
58  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
59  if (supportedAttributes.isEmpty())
60  supportedAttributes.add(SVGNames::typeAttr);
61  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 59 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 60 if (supportedAttributes.get().isEmpty())
 61 supportedAttributes.get().add(SVGNames::typeAttr);
 62 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
6263}
6364
6465void SVGAnimateTransformElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGAnimatedLength.cpp

2222
2323#include "SVGAnimateElement.h"
2424#include "SVGAnimatedNumber.h"
 25#include <wtf/NeverDestroyed.h>
2526
2627namespace WebCore {
2728

@@SVGAnimatedLengthAnimator::SVGAnimatedLengthAnimator(SVGAnimationElement* animat
3334
3435static inline SVGLength& sharedSVGLength(SVGLengthMode mode, const String& valueAsString)
3536{
36  DEPRECATED_DEFINE_STATIC_LOCAL(SVGLength, sharedLength, ());
37  sharedLength.setValueAsString(valueAsString, mode, ASSERT_NO_EXCEPTION);
 37 static NeverDestroyed<SVGLength> sharedLength;
 38 sharedLength.get().setValueAsString(valueAsString, mode, ASSERT_NO_EXCEPTION);
3839 return sharedLength;
3940}
4041

Source/WebCore/svg/SVGAnimationElement.cpp

3838#include "SVGNames.h"
3939#include "SVGParserUtilities.h"
4040#include <wtf/MathExtras.h>
 41#include <wtf/NeverDestroyed.h>
4142#include <wtf/text/StringView.h>
4243
4344namespace WebCore {

@@static void parseKeySplines(const String& parse, Vector<UnitBezier>& result)
143144
144145bool SVGAnimationElement::isSupportedAttribute(const QualifiedName& attrName)
145146{
146  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
147  if (supportedAttributes.isEmpty()) {
 147 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 148 if (supportedAttributes.get().isEmpty()) {
148149 SVGTests::addSupportedAttributes(supportedAttributes);
149150 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes);
150  supportedAttributes.add(SVGNames::valuesAttr);
151  supportedAttributes.add(SVGNames::keyTimesAttr);
152  supportedAttributes.add(SVGNames::keyPointsAttr);
153  supportedAttributes.add(SVGNames::keySplinesAttr);
154  supportedAttributes.add(SVGNames::attributeTypeAttr);
155  supportedAttributes.add(SVGNames::calcModeAttr);
156  supportedAttributes.add(SVGNames::fromAttr);
157  supportedAttributes.add(SVGNames::toAttr);
158  supportedAttributes.add(SVGNames::byAttr);
 151 supportedAttributes.get().add(SVGNames::valuesAttr);
 152 supportedAttributes.get().add(SVGNames::keyTimesAttr);
 153 supportedAttributes.get().add(SVGNames::keyPointsAttr);
 154 supportedAttributes.get().add(SVGNames::keySplinesAttr);
 155 supportedAttributes.get().add(SVGNames::attributeTypeAttr);
 156 supportedAttributes.get().add(SVGNames::calcModeAttr);
 157 supportedAttributes.get().add(SVGNames::fromAttr);
 158 supportedAttributes.get().add(SVGNames::toAttr);
 159 supportedAttributes.get().add(SVGNames::byAttr);
159160 }
160  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 161 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
161162}
162163
163164void SVGAnimationElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGCircleElement.cpp

3131#include "SVGException.h"
3232#include "SVGLength.h"
3333#include "SVGNames.h"
 34#include <wtf/NeverDestroyed.h>
3435
3536namespace WebCore {
3637

@@PassRefPtr<SVGCircleElement> SVGCircleElement::create(const QualifiedName& tagNa
6566
6667bool SVGCircleElement::isSupportedAttribute(const QualifiedName& attrName)
6768{
68  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
69  if (supportedAttributes.isEmpty()) {
 69 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 70 if (supportedAttributes.get().isEmpty()) {
7071 SVGLangSpace::addSupportedAttributes(supportedAttributes);
7172 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes);
72  supportedAttributes.add(SVGNames::cxAttr);
73  supportedAttributes.add(SVGNames::cyAttr);
74  supportedAttributes.add(SVGNames::rAttr);
 73 supportedAttributes.get().add(SVGNames::cxAttr);
 74 supportedAttributes.get().add(SVGNames::cyAttr);
 75 supportedAttributes.get().add(SVGNames::rAttr);
7576 }
76  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 77 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
7778}
7879
7980void SVGCircleElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGClipPathElement.cpp

2929#include "SVGNames.h"
3030#include "SVGTransformList.h"
3131#include "StyleResolver.h"
 32#include <wtf/NeverDestroyed.h>
3233
3334namespace WebCore {
3435

@@PassRefPtr<SVGClipPathElement> SVGClipPathElement::create(const QualifiedName& t
5758
5859bool SVGClipPathElement::isSupportedAttribute(const QualifiedName& attrName)
5960{
60  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
61  if (supportedAttributes.isEmpty()) {
 61 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 62 if (supportedAttributes.get().isEmpty()) {
6263 SVGLangSpace::addSupportedAttributes(supportedAttributes);
6364 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes);
64  supportedAttributes.add(SVGNames::clipPathUnitsAttr);
 65 supportedAttributes.get().add(SVGNames::clipPathUnitsAttr);
6566 }
66  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 67 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
6768}
6869
6970void SVGClipPathElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGComponentTransferFunctionElement.cpp

2828#include "SVGFEComponentTransferElement.h"
2929#include "SVGNames.h"
3030#include "SVGNumberList.h"
 31#include <wtf/NeverDestroyed.h>
3132
3233namespace WebCore {
3334

@@SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement(const Q
6263
6364bool SVGComponentTransferFunctionElement::isSupportedAttribute(const QualifiedName& attrName)
6465{
65  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
66  if (supportedAttributes.isEmpty()) {
67  supportedAttributes.add(SVGNames::typeAttr);
68  supportedAttributes.add(SVGNames::tableValuesAttr);
69  supportedAttributes.add(SVGNames::slopeAttr);
70  supportedAttributes.add(SVGNames::interceptAttr);
71  supportedAttributes.add(SVGNames::amplitudeAttr);
72  supportedAttributes.add(SVGNames::exponentAttr);
73  supportedAttributes.add(SVGNames::offsetAttr);
 66 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 67 if (supportedAttributes.get().isEmpty()) {
 68 supportedAttributes.get().add(SVGNames::typeAttr);
 69 supportedAttributes.get().add(SVGNames::tableValuesAttr);
 70 supportedAttributes.get().add(SVGNames::slopeAttr);
 71 supportedAttributes.get().add(SVGNames::interceptAttr);
 72 supportedAttributes.get().add(SVGNames::amplitudeAttr);
 73 supportedAttributes.get().add(SVGNames::exponentAttr);
 74 supportedAttributes.get().add(SVGNames::offsetAttr);
7475 }
75  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 76 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
7677}
7778
7879void SVGComponentTransferFunctionElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGCursorElement.cpp

2626#include "SVGElementInstance.h"
2727#include "SVGNames.h"
2828#include "XLinkNames.h"
 29#include <wtf/NeverDestroyed.h>
2930
3031namespace WebCore {
3132

@@SVGCursorElement::~SVGCursorElement()
6667
6768bool SVGCursorElement::isSupportedAttribute(const QualifiedName& attrName)
6869{
69  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
70  if (supportedAttributes.isEmpty()) {
 70 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 71 if (supportedAttributes.get().isEmpty()) {
7172 SVGTests::addSupportedAttributes(supportedAttributes);
7273 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes);
7374 SVGURIReference::addSupportedAttributes(supportedAttributes);
74  supportedAttributes.add(SVGNames::xAttr);
75  supportedAttributes.add(SVGNames::yAttr);
 75 supportedAttributes.get().add(SVGNames::xAttr);
 76 supportedAttributes.get().add(SVGNames::yAttr);
7677 }
77  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 78 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
7879}
7980
8081void SVGCursorElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGElement.cpp

@@void SVGElement::removeInstanceMapping(SVGElementInstance* instance)
402402const HashSet<SVGElementInstance*>& SVGElement::instancesForElement() const
403403{
404404 if (!m_svgRareData) {
405  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<SVGElementInstance*>, emptyInstances, ());
 405 static NeverDestroyed<HashSet<SVGElementInstance*>> emptyInstances;
406406 return emptyInstances;
407407 }
408408 return m_svgRareData->elementInstances();

@@void SVGElement::finishParsingChildren()
686686
687687bool SVGElement::childShouldCreateRenderer(const Node& child) const
688688{
689  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, invalidTextContent, ());
 689 static NeverDestroyed<HashSet<QualifiedName>> invalidTextContent;
690690
691  if (invalidTextContent.isEmpty()) {
692  invalidTextContent.add(SVGNames::textPathTag);
 691 if (invalidTextContent.get().isEmpty()) {
 692 invalidTextContent.get().add(SVGNames::textPathTag);
693693#if ENABLE(SVG_FONTS)
694  invalidTextContent.add(SVGNames::altGlyphTag);
 694 invalidTextContent.get().add(SVGNames::altGlyphTag);
695695#endif
696  invalidTextContent.add(SVGNames::trefTag);
697  invalidTextContent.add(SVGNames::tspanTag);
 696 invalidTextContent.get().add(SVGNames::trefTag);
 697 invalidTextContent.get().add(SVGNames::tspanTag);
698698 }
699699 if (child.isSVGElement()) {
700700 const SVGElement& svgChild = toSVGElement(child);
701  if (invalidTextContent.contains(svgChild.tagQName()))
 701 if (invalidTextContent.get().contains(svgChild.tagQName()))
702702 return false;
703703
704704 return svgChild.isValid();

Source/WebCore/svg/SVGEllipseElement.cpp

2929#include "SVGElementInstance.h"
3030#include "SVGLength.h"
3131#include "SVGNames.h"
 32#include <wtf/NeverDestroyed.h>
3233
3334namespace WebCore {
3435

@@PassRefPtr<SVGEllipseElement> SVGEllipseElement::create(const QualifiedName& tag
6667
6768bool SVGEllipseElement::isSupportedAttribute(const QualifiedName& attrName)
6869{
69  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
70  if (supportedAttributes.isEmpty()) {
 70 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 71 if (supportedAttributes.get().isEmpty()) {
7172 SVGLangSpace::addSupportedAttributes(supportedAttributes);
7273 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes);
73  supportedAttributes.add(SVGNames::cxAttr);
74  supportedAttributes.add(SVGNames::cyAttr);
75  supportedAttributes.add(SVGNames::rxAttr);
76  supportedAttributes.add(SVGNames::ryAttr);
 74 supportedAttributes.get().add(SVGNames::cxAttr);
 75 supportedAttributes.get().add(SVGNames::cyAttr);
 76 supportedAttributes.get().add(SVGNames::rxAttr);
 77 supportedAttributes.get().add(SVGNames::ryAttr);
7778 }
78  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 79 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
7980}
8081
8182void SVGEllipseElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGFEBlendElement.cpp

2828#include "SVGElementInstance.h"
2929#include "SVGFilterBuilder.h"
3030#include "SVGNames.h"
 31#include <wtf/NeverDestroyed.h>
3132
3233namespace WebCore {
3334

@@PassRefPtr<SVGFEBlendElement> SVGFEBlendElement::create(const QualifiedName& tag
5859
5960bool SVGFEBlendElement::isSupportedAttribute(const QualifiedName& attrName)
6061{
61  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
62  if (supportedAttributes.isEmpty()) {
63  supportedAttributes.add(SVGNames::modeAttr);
64  supportedAttributes.add(SVGNames::inAttr);
65  supportedAttributes.add(SVGNames::in2Attr);
 62 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 63 if (supportedAttributes.get().isEmpty()) {
 64 supportedAttributes.get().add(SVGNames::modeAttr);
 65 supportedAttributes.get().add(SVGNames::inAttr);
 66 supportedAttributes.get().add(SVGNames::in2Attr);
6667 }
67  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 68 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
6869}
6970
7071void SVGFEBlendElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGFEColorMatrixElement.cpp

2828#include "SVGElementInstance.h"
2929#include "SVGFilterBuilder.h"
3030#include "SVGNames.h"
 31#include <wtf/NeverDestroyed.h>
3132
3233namespace WebCore {
3334

@@PassRefPtr<SVGFEColorMatrixElement> SVGFEColorMatrixElement::create(const Qualif
5859
5960bool SVGFEColorMatrixElement::isSupportedAttribute(const QualifiedName& attrName)
6061{
61  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
62  if (supportedAttributes.isEmpty()) {
63  supportedAttributes.add(SVGNames::typeAttr);
64  supportedAttributes.add(SVGNames::valuesAttr);
65  supportedAttributes.add(SVGNames::inAttr);
 62 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 63 if (supportedAttributes.get().isEmpty()) {
 64 supportedAttributes.get().add(SVGNames::typeAttr);
 65 supportedAttributes.get().add(SVGNames::valuesAttr);
 66 supportedAttributes.get().add(SVGNames::inAttr);
6667 }
67  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 68 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
6869}
6970
7071void SVGFEColorMatrixElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGFEComponentTransferElement.cpp

3232#include "SVGFEFuncRElement.h"
3333#include "SVGFilterBuilder.h"
3434#include "SVGNames.h"
 35#include <wtf/NeverDestroyed.h>
3536
3637namespace WebCore {
3738

@@PassRefPtr<SVGFEComponentTransferElement> SVGFEComponentTransferElement::create(
5758
5859bool SVGFEComponentTransferElement::isSupportedAttribute(const QualifiedName& attrName)
5960{
60  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
61  if (supportedAttributes.isEmpty())
62  supportedAttributes.add(SVGNames::inAttr);
63  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 61 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 62 if (supportedAttributes.get().isEmpty())
 63 supportedAttributes.get().add(SVGNames::inAttr);
 64 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
6465}
6566
6667void SVGFEComponentTransferElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGFECompositeElement.cpp

2828#include "SVGElementInstance.h"
2929#include "SVGFilterBuilder.h"
3030#include "SVGNames.h"
 31#include <wtf/NeverDestroyed.h>
3132
3233namespace WebCore {
3334

@@PassRefPtr<SVGFECompositeElement> SVGFECompositeElement::create(const QualifiedN
6667
6768bool SVGFECompositeElement::isSupportedAttribute(const QualifiedName& attrName)
6869{
69  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
70  if (supportedAttributes.isEmpty()) {
71  supportedAttributes.add(SVGNames::inAttr);
72  supportedAttributes.add(SVGNames::in2Attr);
73  supportedAttributes.add(SVGNames::operatorAttr);
74  supportedAttributes.add(SVGNames::k1Attr);
75  supportedAttributes.add(SVGNames::k2Attr);
76  supportedAttributes.add(SVGNames::k3Attr);
77  supportedAttributes.add(SVGNames::k4Attr);
 70 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 71 if (supportedAttributes.get().isEmpty()) {
 72 supportedAttributes.get().add(SVGNames::inAttr);
 73 supportedAttributes.get().add(SVGNames::in2Attr);
 74 supportedAttributes.get().add(SVGNames::operatorAttr);
 75 supportedAttributes.get().add(SVGNames::k1Attr);
 76 supportedAttributes.get().add(SVGNames::k2Attr);
 77 supportedAttributes.get().add(SVGNames::k3Attr);
 78 supportedAttributes.get().add(SVGNames::k4Attr);
7879 }
79  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 80 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
8081}
8182
8283void SVGFECompositeElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGFEConvolveMatrixElement.cpp

3131#include "SVGFilterBuilder.h"
3232#include "SVGNames.h"
3333#include "SVGParserUtilities.h"
 34#include <wtf/NeverDestroyed.h>
3435
3536namespace WebCore {
3637

@@const AtomicString& SVGFEConvolveMatrixElement::orderYIdentifier()
103104
104105bool SVGFEConvolveMatrixElement::isSupportedAttribute(const QualifiedName& attrName)
105106{
106  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
107  if (supportedAttributes.isEmpty()) {
108  supportedAttributes.add(SVGNames::inAttr);
109  supportedAttributes.add(SVGNames::orderAttr);
110  supportedAttributes.add(SVGNames::kernelMatrixAttr);
111  supportedAttributes.add(SVGNames::edgeModeAttr);
112  supportedAttributes.add(SVGNames::divisorAttr);
113  supportedAttributes.add(SVGNames::biasAttr);
114  supportedAttributes.add(SVGNames::targetXAttr);
115  supportedAttributes.add(SVGNames::targetYAttr);
116  supportedAttributes.add(SVGNames::kernelUnitLengthAttr);
117  supportedAttributes.add(SVGNames::preserveAlphaAttr);
 107 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 108 if (supportedAttributes.get().isEmpty()) {
 109 supportedAttributes.get().add(SVGNames::inAttr);
 110 supportedAttributes.get().add(SVGNames::orderAttr);
 111 supportedAttributes.get().add(SVGNames::kernelMatrixAttr);
 112 supportedAttributes.get().add(SVGNames::edgeModeAttr);
 113 supportedAttributes.get().add(SVGNames::divisorAttr);
 114 supportedAttributes.get().add(SVGNames::biasAttr);
 115 supportedAttributes.get().add(SVGNames::targetXAttr);
 116 supportedAttributes.get().add(SVGNames::targetYAttr);
 117 supportedAttributes.get().add(SVGNames::kernelUnitLengthAttr);
 118 supportedAttributes.get().add(SVGNames::preserveAlphaAttr);
118119 }
119  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 120 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
120121}
121122
122123void SVGFEConvolveMatrixElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGFEDiffuseLightingElement.cpp

3232#include "SVGFilterBuilder.h"
3333#include "SVGNames.h"
3434#include "SVGParserUtilities.h"
 35#include <wtf/NeverDestroyed.h>
3536
3637namespace WebCore {
3738

@@const AtomicString& SVGFEDiffuseLightingElement::kernelUnitLengthYIdentifier()
7980
8081bool SVGFEDiffuseLightingElement::isSupportedAttribute(const QualifiedName& attrName)
8182{
82  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
83  if (supportedAttributes.isEmpty()) {
84  supportedAttributes.add(SVGNames::inAttr);
85  supportedAttributes.add(SVGNames::diffuseConstantAttr);
86  supportedAttributes.add(SVGNames::surfaceScaleAttr);
87  supportedAttributes.add(SVGNames::kernelUnitLengthAttr);
88  supportedAttributes.add(SVGNames::lighting_colorAttr); // Even though it's a SVG-CSS property, we override its handling here.
 83 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 84 if (supportedAttributes.get().isEmpty()) {
 85 supportedAttributes.get().add(SVGNames::inAttr);
 86 supportedAttributes.get().add(SVGNames::diffuseConstantAttr);
 87 supportedAttributes.get().add(SVGNames::surfaceScaleAttr);
 88 supportedAttributes.get().add(SVGNames::kernelUnitLengthAttr);
 89 supportedAttributes.get().add(SVGNames::lighting_colorAttr); // Even though it's a SVG-CSS property, we override its handling here.
8990 }
90  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 91 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
9192}
9293
9394void SVGFEDiffuseLightingElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGFEDisplacementMapElement.cpp

2727#include "SVGElementInstance.h"
2828#include "SVGFilterBuilder.h"
2929#include "SVGNames.h"
 30#include <wtf/NeverDestroyed.h>
3031
3132namespace WebCore {
3233

@@PassRefPtr<SVGFEDisplacementMapElement> SVGFEDisplacementMapElement::create(cons
6263
6364bool SVGFEDisplacementMapElement::isSupportedAttribute(const QualifiedName& attrName)
6465{
65  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
66  if (supportedAttributes.isEmpty()) {
67  supportedAttributes.add(SVGNames::inAttr);
68  supportedAttributes.add(SVGNames::in2Attr);
69  supportedAttributes.add(SVGNames::xChannelSelectorAttr);
70  supportedAttributes.add(SVGNames::yChannelSelectorAttr);
71  supportedAttributes.add(SVGNames::scaleAttr);
 66 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 67 if (supportedAttributes.get().isEmpty()) {
 68 supportedAttributes.get().add(SVGNames::inAttr);
 69 supportedAttributes.get().add(SVGNames::in2Attr);
 70 supportedAttributes.get().add(SVGNames::xChannelSelectorAttr);
 71 supportedAttributes.get().add(SVGNames::yChannelSelectorAttr);
 72 supportedAttributes.get().add(SVGNames::scaleAttr);
7273 }
73  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 74 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
7475}
7576
7677void SVGFEDisplacementMapElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGFEDropShadowElement.cpp

2929#include "SVGNames.h"
3030#include "SVGParserUtilities.h"
3131#include "SVGRenderStyle.h"
 32#include <wtf/NeverDestroyed.h>
3233
3334namespace WebCore {
3435

@@void SVGFEDropShadowElement::setStdDeviation(float x, float y)
8586
8687bool SVGFEDropShadowElement::isSupportedAttribute(const QualifiedName& attrName)
8788{
88  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
89  if (supportedAttributes.isEmpty()) {
90  supportedAttributes.add(SVGNames::inAttr);
91  supportedAttributes.add(SVGNames::dxAttr);
92  supportedAttributes.add(SVGNames::dyAttr);
93  supportedAttributes.add(SVGNames::stdDeviationAttr);
 89 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 90 if (supportedAttributes.get().isEmpty()) {
 91 supportedAttributes.get().add(SVGNames::inAttr);
 92 supportedAttributes.get().add(SVGNames::dxAttr);
 93 supportedAttributes.get().add(SVGNames::dyAttr);
 94 supportedAttributes.get().add(SVGNames::stdDeviationAttr);
9495 }
95  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 96 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
9697}
9798
9899void SVGFEDropShadowElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGFEGaussianBlurElement.cpp

2929#include "SVGFilterBuilder.h"
3030#include "SVGNames.h"
3131#include "SVGParserUtilities.h"
 32#include <wtf/NeverDestroyed.h>
3233
3334namespace WebCore {
3435

@@void SVGFEGaussianBlurElement::setStdDeviation(float x, float y)
8081
8182bool SVGFEGaussianBlurElement::isSupportedAttribute(const QualifiedName& attrName)
8283{
83  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
84  if (supportedAttributes.isEmpty()) {
85  supportedAttributes.add(SVGNames::inAttr);
86  supportedAttributes.add(SVGNames::stdDeviationAttr);
87  supportedAttributes.add(SVGNames::edgeModeAttr);
 84 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 85 if (supportedAttributes.get().isEmpty()) {
 86 supportedAttributes.get().add(SVGNames::inAttr);
 87 supportedAttributes.get().add(SVGNames::stdDeviationAttr);
 88 supportedAttributes.get().add(SVGNames::edgeModeAttr);
8889 }
89  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 90 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
9091}
9192
9293void SVGFEGaussianBlurElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGFEImageElement.cpp

3737#include "SVGNames.h"
3838#include "SVGPreserveAspectRatio.h"
3939#include "XLinkNames.h"
 40#include <wtf/NeverDestroyed.h>
4041
4142namespace WebCore {
4243

@@void SVGFEImageElement::buildPendingResource()
115116
116117bool SVGFEImageElement::isSupportedAttribute(const QualifiedName& attrName)
117118{
118  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
119  if (supportedAttributes.isEmpty()) {
 119 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 120 if (supportedAttributes.get().isEmpty()) {
120121 SVGURIReference::addSupportedAttributes(supportedAttributes);
121122 SVGLangSpace::addSupportedAttributes(supportedAttributes);
122123 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes);
123  supportedAttributes.add(SVGNames::preserveAspectRatioAttr);
 124 supportedAttributes.get().add(SVGNames::preserveAspectRatioAttr);
124125 }
125  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 126 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
126127}
127128
128129void SVGFEImageElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGFELightElement.cpp

3434#include "SVGFilterElement.h"
3535#include "SVGFilterPrimitiveStandardAttributes.h"
3636#include "SVGNames.h"
 37#include <wtf/NeverDestroyed.h>
3738
3839namespace WebCore {
3940

@@PassRefPtr<LightSource> SVGFELightElement::findLightSource(const SVGElement* svg
8889
8990bool SVGFELightElement::isSupportedAttribute(const QualifiedName& attrName)
9091{
91  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
92  if (supportedAttributes.isEmpty()) {
93  supportedAttributes.add(SVGNames::azimuthAttr);
94  supportedAttributes.add(SVGNames::elevationAttr);
95  supportedAttributes.add(SVGNames::xAttr);
96  supportedAttributes.add(SVGNames::yAttr);
97  supportedAttributes.add(SVGNames::zAttr);
98  supportedAttributes.add(SVGNames::pointsAtXAttr);
99  supportedAttributes.add(SVGNames::pointsAtYAttr);
100  supportedAttributes.add(SVGNames::pointsAtZAttr);
101  supportedAttributes.add(SVGNames::specularExponentAttr);
102  supportedAttributes.add(SVGNames::limitingConeAngleAttr);
 92 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 93 if (supportedAttributes.get().isEmpty()) {
 94 supportedAttributes.get().add(SVGNames::azimuthAttr);
 95 supportedAttributes.get().add(SVGNames::elevationAttr);
 96 supportedAttributes.get().add(SVGNames::xAttr);
 97 supportedAttributes.get().add(SVGNames::yAttr);
 98 supportedAttributes.get().add(SVGNames::zAttr);
 99 supportedAttributes.get().add(SVGNames::pointsAtXAttr);
 100 supportedAttributes.get().add(SVGNames::pointsAtYAttr);
 101 supportedAttributes.get().add(SVGNames::pointsAtZAttr);
 102 supportedAttributes.get().add(SVGNames::specularExponentAttr);
 103 supportedAttributes.get().add(SVGNames::limitingConeAngleAttr);
103104 }
104  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 105 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
105106}
106107
107108void SVGFELightElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGFEMergeNodeElement.cpp

3030#include "SVGFilterElement.h"
3131#include "SVGFilterPrimitiveStandardAttributes.h"
3232#include "SVGNames.h"
 33#include <wtf/NeverDestroyed.h>
3334
3435namespace WebCore {
3536

@@PassRefPtr<SVGFEMergeNodeElement> SVGFEMergeNodeElement::create(const QualifiedN
5455
5556bool SVGFEMergeNodeElement::isSupportedAttribute(const QualifiedName& attrName)
5657{
57  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
58  if (supportedAttributes.isEmpty())
59  supportedAttributes.add(SVGNames::inAttr);
60  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 58 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 59 if (supportedAttributes.get().isEmpty())
 60 supportedAttributes.get().add(SVGNames::inAttr);
 61 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
6162}
6263
6364void SVGFEMergeNodeElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGFEMorphologyElement.cpp

2828#include "SVGFilterBuilder.h"
2929#include "SVGNames.h"
3030#include "SVGParserUtilities.h"
 31#include <wtf/NeverDestroyed.h>
3132
3233namespace WebCore {
3334

@@void SVGFEMorphologyElement::setRadius(float x, float y)
7980
8081bool SVGFEMorphologyElement::isSupportedAttribute(const QualifiedName& attrName)
8182{
82  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
83  if (supportedAttributes.isEmpty()) {
84  supportedAttributes.add(SVGNames::inAttr);
85  supportedAttributes.add(SVGNames::operatorAttr);
86  supportedAttributes.add(SVGNames::radiusAttr);
 83 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 84 if (supportedAttributes.get().isEmpty()) {
 85 supportedAttributes.get().add(SVGNames::inAttr);
 86 supportedAttributes.get().add(SVGNames::operatorAttr);
 87 supportedAttributes.get().add(SVGNames::radiusAttr);
8788 }
88  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 89 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
8990}
9091
9192void SVGFEMorphologyElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGFEOffsetElement.cpp

2828#include "SVGElementInstance.h"
2929#include "SVGFilterBuilder.h"
3030#include "SVGNames.h"
 31#include <wtf/NeverDestroyed.h>
3132
3233namespace WebCore {
3334

@@PassRefPtr<SVGFEOffsetElement> SVGFEOffsetElement::create(const QualifiedName& t
5758
5859bool SVGFEOffsetElement::isSupportedAttribute(const QualifiedName& attrName)
5960{
60  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
61  if (supportedAttributes.isEmpty()) {
62  supportedAttributes.add(SVGNames::inAttr);
63  supportedAttributes.add(SVGNames::dxAttr);
64  supportedAttributes.add(SVGNames::dyAttr);
 61 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 62 if (supportedAttributes.get().isEmpty()) {
 63 supportedAttributes.get().add(SVGNames::inAttr);
 64 supportedAttributes.get().add(SVGNames::dxAttr);
 65 supportedAttributes.get().add(SVGNames::dyAttr);
6566 }
66  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 67 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
6768}
6869
6970void SVGFEOffsetElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGFESpecularLightingElement.cpp

3333#include "SVGFilterBuilder.h"
3434#include "SVGNames.h"
3535#include "SVGParserUtilities.h"
 36#include <wtf/NeverDestroyed.h>
3637
3738namespace WebCore {
3839

@@const AtomicString& SVGFESpecularLightingElement::kernelUnitLengthYIdentifier()
8384
8485bool SVGFESpecularLightingElement::isSupportedAttribute(const QualifiedName& attrName)
8586{
86  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
87  if (supportedAttributes.isEmpty()) {
88  supportedAttributes.add(SVGNames::inAttr);
89  supportedAttributes.add(SVGNames::specularConstantAttr);
90  supportedAttributes.add(SVGNames::specularExponentAttr);
91  supportedAttributes.add(SVGNames::surfaceScaleAttr);
92  supportedAttributes.add(SVGNames::kernelUnitLengthAttr);
 87 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 88 if (supportedAttributes.get().isEmpty()) {
 89 supportedAttributes.get().add(SVGNames::inAttr);
 90 supportedAttributes.get().add(SVGNames::specularConstantAttr);
 91 supportedAttributes.get().add(SVGNames::specularExponentAttr);
 92 supportedAttributes.get().add(SVGNames::surfaceScaleAttr);
 93 supportedAttributes.get().add(SVGNames::kernelUnitLengthAttr);
9394 }
94  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 95 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
9596}
9697
9798void SVGFESpecularLightingElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGFETileElement.cpp

2929#include "SVGFilterBuilder.h"
3030#include "SVGNames.h"
3131#include "SVGRenderStyle.h"
 32#include <wtf/NeverDestroyed.h>
3233
3334namespace WebCore {
3435

@@PassRefPtr<SVGFETileElement> SVGFETileElement::create(const QualifiedName& tagNa
5455
5556bool SVGFETileElement::isSupportedAttribute(const QualifiedName& attrName)
5657{
57  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
58  if (supportedAttributes.isEmpty())
59  supportedAttributes.add(SVGNames::inAttr);
60  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 58 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 59 if (supportedAttributes.get().isEmpty())
 60 supportedAttributes.get().add(SVGNames::inAttr);
 61 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
6162}
6263
6364void SVGFETileElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGFETurbulenceElement.cpp

2727#include "SVGElementInstance.h"
2828#include "SVGNames.h"
2929#include "SVGParserUtilities.h"
 30#include <wtf/NeverDestroyed.h>
3031
3132namespace WebCore {
3233

@@const AtomicString& SVGFETurbulenceElement::baseFrequencyYIdentifier()
7778
7879bool SVGFETurbulenceElement::isSupportedAttribute(const QualifiedName& attrName)
7980{
80  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
81  if (supportedAttributes.isEmpty()) {
82  supportedAttributes.add(SVGNames::baseFrequencyAttr);
83  supportedAttributes.add(SVGNames::numOctavesAttr);
84  supportedAttributes.add(SVGNames::seedAttr);
85  supportedAttributes.add(SVGNames::stitchTilesAttr);
86  supportedAttributes.add(SVGNames::typeAttr);
 81 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 82 if (supportedAttributes.get().isEmpty()) {
 83 supportedAttributes.get().add(SVGNames::baseFrequencyAttr);
 84 supportedAttributes.get().add(SVGNames::numOctavesAttr);
 85 supportedAttributes.get().add(SVGNames::seedAttr);
 86 supportedAttributes.get().add(SVGNames::stitchTilesAttr);
 87 supportedAttributes.get().add(SVGNames::typeAttr);
8788 }
88  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 89 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
8990}
9091
9192void SVGFETurbulenceElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGFilterElement.cpp

3434#include "SVGNames.h"
3535#include "SVGParserUtilities.h"
3636#include "XLinkNames.h"
 37#include <wtf/NeverDestroyed.h>
3738
3839namespace WebCore {
3940

@@void SVGFilterElement::setFilterRes(unsigned filterResX, unsigned filterResY)
105106
106107bool SVGFilterElement::isSupportedAttribute(const QualifiedName& attrName)
107108{
108  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
109  if (supportedAttributes.isEmpty()) {
 109 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 110 if (supportedAttributes.get().isEmpty()) {
110111 SVGURIReference::addSupportedAttributes(supportedAttributes);
111112 SVGLangSpace::addSupportedAttributes(supportedAttributes);
112113 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes);
113  supportedAttributes.add(SVGNames::filterUnitsAttr);
114  supportedAttributes.add(SVGNames::primitiveUnitsAttr);
115  supportedAttributes.add(SVGNames::xAttr);
116  supportedAttributes.add(SVGNames::yAttr);
117  supportedAttributes.add(SVGNames::widthAttr);
118  supportedAttributes.add(SVGNames::heightAttr);
119  supportedAttributes.add(SVGNames::filterResAttr);
 114 supportedAttributes.get().add(SVGNames::filterUnitsAttr);
 115 supportedAttributes.get().add(SVGNames::primitiveUnitsAttr);
 116 supportedAttributes.get().add(SVGNames::xAttr);
 117 supportedAttributes.get().add(SVGNames::yAttr);
 118 supportedAttributes.get().add(SVGNames::widthAttr);
 119 supportedAttributes.get().add(SVGNames::heightAttr);
 120 supportedAttributes.get().add(SVGNames::filterResAttr);
120121 }
121  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 122 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
122123}
123124
124125void SVGFilterElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

@@bool SVGFilterElement::childShouldCreateRenderer(const Node& child) const
200201
201202 const SVGElement& svgElement = toSVGElement(child);
202203
203  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, allowedChildElementTags, ());
204  if (allowedChildElementTags.isEmpty()) {
205  allowedChildElementTags.add(SVGNames::feBlendTag);
206  allowedChildElementTags.add(SVGNames::feColorMatrixTag);
207  allowedChildElementTags.add(SVGNames::feComponentTransferTag);
208  allowedChildElementTags.add(SVGNames::feCompositeTag);
209  allowedChildElementTags.add(SVGNames::feConvolveMatrixTag);
210  allowedChildElementTags.add(SVGNames::feDiffuseLightingTag);
211  allowedChildElementTags.add(SVGNames::feDisplacementMapTag);
212  allowedChildElementTags.add(SVGNames::feDistantLightTag);
213  allowedChildElementTags.add(SVGNames::feDropShadowTag);
214  allowedChildElementTags.add(SVGNames::feFloodTag);
215  allowedChildElementTags.add(SVGNames::feFuncATag);
216  allowedChildElementTags.add(SVGNames::feFuncBTag);
217  allowedChildElementTags.add(SVGNames::feFuncGTag);
218  allowedChildElementTags.add(SVGNames::feFuncRTag);
219  allowedChildElementTags.add(SVGNames::feGaussianBlurTag);
220  allowedChildElementTags.add(SVGNames::feImageTag);
221  allowedChildElementTags.add(SVGNames::feMergeTag);
222  allowedChildElementTags.add(SVGNames::feMergeNodeTag);
223  allowedChildElementTags.add(SVGNames::feMorphologyTag);
224  allowedChildElementTags.add(SVGNames::feOffsetTag);
225  allowedChildElementTags.add(SVGNames::fePointLightTag);
226  allowedChildElementTags.add(SVGNames::feSpecularLightingTag);
227  allowedChildElementTags.add(SVGNames::feSpotLightTag);
228  allowedChildElementTags.add(SVGNames::feTileTag);
229  allowedChildElementTags.add(SVGNames::feTurbulenceTag);
 204 static NeverDestroyed<HashSet<QualifiedName>> allowedChildElementTags;
 205 if (allowedChildElementTags.get().isEmpty()) {
 206 allowedChildElementTags.get().add(SVGNames::feBlendTag);
 207 allowedChildElementTags.get().add(SVGNames::feColorMatrixTag);
 208 allowedChildElementTags.get().add(SVGNames::feComponentTransferTag);
 209 allowedChildElementTags.get().add(SVGNames::feCompositeTag);
 210 allowedChildElementTags.get().add(SVGNames::feConvolveMatrixTag);
 211 allowedChildElementTags.get().add(SVGNames::feDiffuseLightingTag);
 212 allowedChildElementTags.get().add(SVGNames::feDisplacementMapTag);
 213 allowedChildElementTags.get().add(SVGNames::feDistantLightTag);
 214 allowedChildElementTags.get().add(SVGNames::feDropShadowTag);
 215 allowedChildElementTags.get().add(SVGNames::feFloodTag);
 216 allowedChildElementTags.get().add(SVGNames::feFuncATag);
 217 allowedChildElementTags.get().add(SVGNames::feFuncBTag);
 218 allowedChildElementTags.get().add(SVGNames::feFuncGTag);
 219 allowedChildElementTags.get().add(SVGNames::feFuncRTag);
 220 allowedChildElementTags.get().add(SVGNames::feGaussianBlurTag);
 221 allowedChildElementTags.get().add(SVGNames::feImageTag);
 222 allowedChildElementTags.get().add(SVGNames::feMergeTag);
 223 allowedChildElementTags.get().add(SVGNames::feMergeNodeTag);
 224 allowedChildElementTags.get().add(SVGNames::feMorphologyTag);
 225 allowedChildElementTags.get().add(SVGNames::feOffsetTag);
 226 allowedChildElementTags.get().add(SVGNames::fePointLightTag);
 227 allowedChildElementTags.get().add(SVGNames::feSpecularLightingTag);
 228 allowedChildElementTags.get().add(SVGNames::feSpotLightTag);
 229 allowedChildElementTags.get().add(SVGNames::feTileTag);
 230 allowedChildElementTags.get().add(SVGNames::feTurbulenceTag);
230231 }
231232
232  return allowedChildElementTags.contains<SVGAttributeHashTranslator>(svgElement.tagQName());
 233 return allowedChildElementTags.get().contains<SVGAttributeHashTranslator>(svgElement.tagQName());
233234}
234235
235236bool SVGFilterElement::selfHasRelativeLengths() const

Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp

3333#include "SVGLength.h"
3434#include "SVGNames.h"
3535#include "SVGUnitTypes.h"
 36#include <wtf/NeverDestroyed.h>
3637
3738namespace WebCore {
3839

@@SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes(const
6667
6768bool SVGFilterPrimitiveStandardAttributes::isSupportedAttribute(const QualifiedName& attrName)
6869{
69  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
70  if (supportedAttributes.isEmpty()) {
71  supportedAttributes.add(SVGNames::xAttr);
72  supportedAttributes.add(SVGNames::yAttr);
73  supportedAttributes.add(SVGNames::widthAttr);
74  supportedAttributes.add(SVGNames::heightAttr);
75  supportedAttributes.add(SVGNames::resultAttr);
 70 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 71 if (supportedAttributes.get().isEmpty()) {
 72 supportedAttributes.get().add(SVGNames::xAttr);
 73 supportedAttributes.get().add(SVGNames::yAttr);
 74 supportedAttributes.get().add(SVGNames::widthAttr);
 75 supportedAttributes.get().add(SVGNames::heightAttr);
 76 supportedAttributes.get().add(SVGNames::resultAttr);
7677 }
77  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 78 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
7879}
7980
8081void SVGFilterPrimitiveStandardAttributes::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGForeignObjectElement.cpp

3030#include "SVGNames.h"
3131#include "XLinkNames.h"
3232#include <wtf/Assertions.h>
 33#include <wtf/NeverDestroyed.h>
3334
3435namespace WebCore {
3536

@@PassRefPtr<SVGForeignObjectElement> SVGForeignObjectElement::create(const Qualif
6970
7071bool SVGForeignObjectElement::isSupportedAttribute(const QualifiedName& attrName)
7172{
72  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
73  if (supportedAttributes.isEmpty()) {
 73 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 74 if (supportedAttributes.get().isEmpty()) {
7475 SVGLangSpace::addSupportedAttributes(supportedAttributes);
7576 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes);
76  supportedAttributes.add(SVGNames::xAttr);
77  supportedAttributes.add(SVGNames::yAttr);
78  supportedAttributes.add(SVGNames::widthAttr);
79  supportedAttributes.add(SVGNames::heightAttr);
 77 supportedAttributes.get().add(SVGNames::xAttr);
 78 supportedAttributes.get().add(SVGNames::yAttr);
 79 supportedAttributes.get().add(SVGNames::widthAttr);
 80 supportedAttributes.get().add(SVGNames::heightAttr);
8081 }
81  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 82 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
8283}
8384
8485void SVGForeignObjectElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGGElement.cpp

2626#include "RenderSVGTransformableContainer.h"
2727#include "SVGElementInstance.h"
2828#include "SVGNames.h"
 29#include <wtf/NeverDestroyed.h>
2930
3031namespace WebCore {
3132

@@PassRefPtr<SVGGElement> SVGGElement::create(const QualifiedName& tagName, Docume
5152
5253bool SVGGElement::isSupportedAttribute(const QualifiedName& attrName)
5354{
54  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
55  if (supportedAttributes.isEmpty()) {
 55 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 56 if (supportedAttributes.get().isEmpty()) {
5657 SVGLangSpace::addSupportedAttributes(supportedAttributes);
5758 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes);
5859 }
59  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 60 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
6061}
6162
6263void SVGGElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGGradientElement.cpp

3434#include "SVGTransformable.h"
3535#include "StyleResolver.h"
3636#include "XLinkNames.h"
 37#include <wtf/NeverDestroyed.h>
3738
3839namespace WebCore {
3940

@@SVGGradientElement::SVGGradientElement(const QualifiedName& tagName, Document& d
6364
6465bool SVGGradientElement::isSupportedAttribute(const QualifiedName& attrName)
6566{
66  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
67  if (supportedAttributes.isEmpty()) {
 67 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 68 if (supportedAttributes.get().isEmpty()) {
6869 SVGURIReference::addSupportedAttributes(supportedAttributes);
6970 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes);
70  supportedAttributes.add(SVGNames::gradientUnitsAttr);
71  supportedAttributes.add(SVGNames::gradientTransformAttr);
72  supportedAttributes.add(SVGNames::spreadMethodAttr);
 71 supportedAttributes.get().add(SVGNames::gradientUnitsAttr);
 72 supportedAttributes.get().add(SVGNames::gradientTransformAttr);
 73 supportedAttributes.get().add(SVGNames::spreadMethodAttr);
7374 }
74  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 75 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
7576}
7677
7778void SVGGradientElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGGraphicsElement.cpp

2828#include "SVGElementInstance.h"
2929#include "SVGNames.h"
3030#include "SVGPathData.h"
 31#include <wtf/NeverDestroyed.h>
3132
3233namespace WebCore {
3334

@@AffineTransform* SVGGraphicsElement::supplementalTransform()
100101
101102bool SVGGraphicsElement::isSupportedAttribute(const QualifiedName& attrName)
102103{
103  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
104  if (supportedAttributes.isEmpty()) {
 104 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 105 if (supportedAttributes.get().isEmpty()) {
105106 SVGTests::addSupportedAttributes(supportedAttributes);
106  supportedAttributes.add(SVGNames::transformAttr);
 107 supportedAttributes.get().add(SVGNames::transformAttr);
107108 }
108  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 109 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
109110}
110111
111112void SVGGraphicsElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGImageElement.cpp

3131#include "SVGNames.h"
3232#include "SVGSVGElement.h"
3333#include "XLinkNames.h"
 34#include <wtf/NeverDestroyed.h>
3435
3536namespace WebCore {
3637

@@PassRefPtr<SVGImageElement> SVGImageElement::create(const QualifiedName& tagName
7273
7374bool SVGImageElement::isSupportedAttribute(const QualifiedName& attrName)
7475{
75  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
76  if (supportedAttributes.isEmpty()) {
 76 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 77 if (supportedAttributes.get().isEmpty()) {
7778 SVGLangSpace::addSupportedAttributes(supportedAttributes);
7879 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes);
7980 SVGURIReference::addSupportedAttributes(supportedAttributes);
80  supportedAttributes.add(SVGNames::xAttr);
81  supportedAttributes.add(SVGNames::yAttr);
82  supportedAttributes.add(SVGNames::widthAttr);
83  supportedAttributes.add(SVGNames::heightAttr);
84  supportedAttributes.add(SVGNames::preserveAspectRatioAttr);
 81 supportedAttributes.get().add(SVGNames::xAttr);
 82 supportedAttributes.get().add(SVGNames::yAttr);
 83 supportedAttributes.get().add(SVGNames::widthAttr);
 84 supportedAttributes.get().add(SVGNames::heightAttr);
 85 supportedAttributes.get().add(SVGNames::preserveAspectRatioAttr);
8586 }
86  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 87 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
8788}
8889
8990bool SVGImageElement::isPresentationAttribute(const QualifiedName& name) const

Source/WebCore/svg/SVGLength.cpp

3030#include "SVGNames.h"
3131#include "SVGParserUtilities.h"
3232#include <wtf/MathExtras.h>
 33#include <wtf/NeverDestroyed.h>
3334#include <wtf/text/StringView.h>
3435
3536namespace WebCore {

@@PassRefPtr<CSSPrimitiveValue> SVGLength::toCSSPrimitiveValue(const SVGLength& le
378379SVGLengthMode SVGLength::lengthModeForAnimatedLengthAttribute(const QualifiedName& attrName)
379380{
380381 typedef HashMap<QualifiedName, SVGLengthMode> LengthModeForLengthAttributeMap;
381  DEPRECATED_DEFINE_STATIC_LOCAL(LengthModeForLengthAttributeMap, s_lengthModeMap, ());
 382 static NeverDestroyed<LengthModeForLengthAttributeMap> s_lengthModeMap;
382383
383  if (s_lengthModeMap.isEmpty()) {
384  s_lengthModeMap.set(SVGNames::xAttr, LengthModeWidth);
385  s_lengthModeMap.set(SVGNames::yAttr, LengthModeHeight);
386  s_lengthModeMap.set(SVGNames::cxAttr, LengthModeWidth);
387  s_lengthModeMap.set(SVGNames::cyAttr, LengthModeHeight);
388  s_lengthModeMap.set(SVGNames::dxAttr, LengthModeWidth);
389  s_lengthModeMap.set(SVGNames::dyAttr, LengthModeHeight);
390  s_lengthModeMap.set(SVGNames::fxAttr, LengthModeWidth);
391  s_lengthModeMap.set(SVGNames::fyAttr, LengthModeHeight);
392  s_lengthModeMap.set(SVGNames::rAttr, LengthModeOther);
393  s_lengthModeMap.set(SVGNames::widthAttr, LengthModeWidth);
394  s_lengthModeMap.set(SVGNames::heightAttr, LengthModeHeight);
395  s_lengthModeMap.set(SVGNames::x1Attr, LengthModeWidth);
396  s_lengthModeMap.set(SVGNames::x2Attr, LengthModeWidth);
397  s_lengthModeMap.set(SVGNames::y1Attr, LengthModeHeight);
398  s_lengthModeMap.set(SVGNames::y2Attr, LengthModeHeight);
399  s_lengthModeMap.set(SVGNames::refXAttr, LengthModeWidth);
400  s_lengthModeMap.set(SVGNames::refYAttr, LengthModeHeight);
401  s_lengthModeMap.set(SVGNames::markerWidthAttr, LengthModeWidth);
402  s_lengthModeMap.set(SVGNames::markerHeightAttr, LengthModeHeight);
403  s_lengthModeMap.set(SVGNames::textLengthAttr, LengthModeWidth);
404  s_lengthModeMap.set(SVGNames::startOffsetAttr, LengthModeWidth);
 384 if (s_lengthModeMap.get().isEmpty()) {
 385 s_lengthModeMap.get().set(SVGNames::xAttr, LengthModeWidth);
 386 s_lengthModeMap.get().set(SVGNames::yAttr, LengthModeHeight);
 387 s_lengthModeMap.get().set(SVGNames::cxAttr, LengthModeWidth);
 388 s_lengthModeMap.get().set(SVGNames::cyAttr, LengthModeHeight);
 389 s_lengthModeMap.get().set(SVGNames::dxAttr, LengthModeWidth);
 390 s_lengthModeMap.get().set(SVGNames::dyAttr, LengthModeHeight);
 391 s_lengthModeMap.get().set(SVGNames::fxAttr, LengthModeWidth);
 392 s_lengthModeMap.get().set(SVGNames::fyAttr, LengthModeHeight);
 393 s_lengthModeMap.get().set(SVGNames::rAttr, LengthModeOther);
 394 s_lengthModeMap.get().set(SVGNames::widthAttr, LengthModeWidth);
 395 s_lengthModeMap.get().set(SVGNames::heightAttr, LengthModeHeight);
 396 s_lengthModeMap.get().set(SVGNames::x1Attr, LengthModeWidth);
 397 s_lengthModeMap.get().set(SVGNames::x2Attr, LengthModeWidth);
 398 s_lengthModeMap.get().set(SVGNames::y1Attr, LengthModeHeight);
 399 s_lengthModeMap.get().set(SVGNames::y2Attr, LengthModeHeight);
 400 s_lengthModeMap.get().set(SVGNames::refXAttr, LengthModeWidth);
 401 s_lengthModeMap.get().set(SVGNames::refYAttr, LengthModeHeight);
 402 s_lengthModeMap.get().set(SVGNames::markerWidthAttr, LengthModeWidth);
 403 s_lengthModeMap.get().set(SVGNames::markerHeightAttr, LengthModeHeight);
 404 s_lengthModeMap.get().set(SVGNames::textLengthAttr, LengthModeWidth);
 405 s_lengthModeMap.get().set(SVGNames::startOffsetAttr, LengthModeWidth);
405406 }
406407
407  if (s_lengthModeMap.contains(attrName))
408  return s_lengthModeMap.get(attrName);
 408 if (s_lengthModeMap.get().contains(attrName))
 409 return s_lengthModeMap.get().get(attrName);
409410
410411 return LengthModeOther;
411412}

Source/WebCore/svg/SVGLineElement.cpp

2828#include "SVGElementInstance.h"
2929#include "SVGLength.h"
3030#include "SVGNames.h"
 31#include <wtf/NeverDestroyed.h>
3132
3233namespace WebCore {
3334

@@PassRefPtr<SVGLineElement> SVGLineElement::create(const QualifiedName& tagName,
6566
6667bool SVGLineElement::isSupportedAttribute(const QualifiedName& attrName)
6768{
68  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
69  if (supportedAttributes.isEmpty()) {
 69 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 70 if (supportedAttributes.get().isEmpty()) {
7071 SVGLangSpace::addSupportedAttributes(supportedAttributes);
7172 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes);
72  supportedAttributes.add(SVGNames::x1Attr);
73  supportedAttributes.add(SVGNames::x2Attr);
74  supportedAttributes.add(SVGNames::y1Attr);
75  supportedAttributes.add(SVGNames::y2Attr);
 73 supportedAttributes.get().add(SVGNames::x1Attr);
 74 supportedAttributes.get().add(SVGNames::x2Attr);
 75 supportedAttributes.get().add(SVGNames::y1Attr);
 76 supportedAttributes.get().add(SVGNames::y2Attr);
7677 }
77  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 78 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
7879}
7980
8081void SVGLineElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGLinearGradientElement.cpp

3535#include "SVGTransform.h"
3636#include "SVGTransformList.h"
3737#include "SVGUnitTypes.h"
 38#include <wtf/NeverDestroyed.h>
3839
3940namespace WebCore {
4041

@@PassRefPtr<SVGLinearGradientElement> SVGLinearGradientElement::create(const Qual
7172
7273bool SVGLinearGradientElement::isSupportedAttribute(const QualifiedName& attrName)
7374{
74  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
75  if (supportedAttributes.isEmpty()) {
76  supportedAttributes.add(SVGNames::x1Attr);
77  supportedAttributes.add(SVGNames::x2Attr);
78  supportedAttributes.add(SVGNames::y1Attr);
79  supportedAttributes.add(SVGNames::y2Attr);
 75 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 76 if (supportedAttributes.get().isEmpty()) {
 77 supportedAttributes.get().add(SVGNames::x1Attr);
 78 supportedAttributes.get().add(SVGNames::x2Attr);
 79 supportedAttributes.get().add(SVGNames::y1Attr);
 80 supportedAttributes.get().add(SVGNames::y2Attr);
8081 }
81  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 82 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
8283}
8384
8485void SVGLinearGradientElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGMPathElement.cpp

2626#include "SVGNames.h"
2727#include "SVGPathElement.h"
2828#include "XLinkNames.h"
 29#include <wtf/NeverDestroyed.h>
2930
3031namespace WebCore {
3132

@@void SVGMPathElement::removedFrom(ContainerNode& rootParent)
104105
105106bool SVGMPathElement::isSupportedAttribute(const QualifiedName& attrName)
106107{
107  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
108  if (supportedAttributes.isEmpty()) {
 108 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 109 if (supportedAttributes.get().isEmpty()) {
109110 SVGURIReference::addSupportedAttributes(supportedAttributes);
110111 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes);
111112 }
112  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 113 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
113114}
114115
115116void SVGMPathElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGMarkerElement.cpp

2828#include "SVGFitToViewBox.h"
2929#include "SVGNames.h"
3030#include "SVGSVGElement.h"
 31#include <wtf/NeverDestroyed.h>
3132
3233namespace WebCore {
3334

@@AffineTransform SVGMarkerElement::viewBoxToViewTransform(float viewWidth, float
109110
110111bool SVGMarkerElement::isSupportedAttribute(const QualifiedName& attrName)
111112{
112  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
113  if (supportedAttributes.isEmpty()) {
 113 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 114 if (supportedAttributes.get().isEmpty()) {
114115 SVGLangSpace::addSupportedAttributes(supportedAttributes);
115116 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes);
116117 SVGFitToViewBox::addSupportedAttributes(supportedAttributes);
117  supportedAttributes.add(SVGNames::markerUnitsAttr);
118  supportedAttributes.add(SVGNames::refXAttr);
119  supportedAttributes.add(SVGNames::refYAttr);
120  supportedAttributes.add(SVGNames::markerWidthAttr);
121  supportedAttributes.add(SVGNames::markerHeightAttr);
122  supportedAttributes.add(SVGNames::orientAttr);
 118 supportedAttributes.get().add(SVGNames::markerUnitsAttr);
 119 supportedAttributes.get().add(SVGNames::refXAttr);
 120 supportedAttributes.get().add(SVGNames::refYAttr);
 121 supportedAttributes.get().add(SVGNames::markerWidthAttr);
 122 supportedAttributes.get().add(SVGNames::markerHeightAttr);
 123 supportedAttributes.get().add(SVGNames::orientAttr);
123124 }
124  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 125 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
125126}
126127
127128void SVGMarkerElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGMaskElement.cpp

3131#include "SVGRenderSupport.h"
3232#include "SVGUnitTypes.h"
3333#include "StyleResolver.h"
 34#include <wtf/NeverDestroyed.h>
3435
3536namespace WebCore {
3637

@@PassRefPtr<SVGMaskElement> SVGMaskElement::create(const QualifiedName& tagName,
7778
7879bool SVGMaskElement::isSupportedAttribute(const QualifiedName& attrName)
7980{
80  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
81  if (supportedAttributes.isEmpty()) {
 81 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 82 if (supportedAttributes.get().isEmpty()) {
8283 SVGTests::addSupportedAttributes(supportedAttributes);
8384 SVGLangSpace::addSupportedAttributes(supportedAttributes);
8485 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes);
85  supportedAttributes.add(SVGNames::maskUnitsAttr);
86  supportedAttributes.add(SVGNames::maskContentUnitsAttr);
87  supportedAttributes.add(SVGNames::xAttr);
88  supportedAttributes.add(SVGNames::yAttr);
89  supportedAttributes.add(SVGNames::widthAttr);
90  supportedAttributes.add(SVGNames::heightAttr);
 86 supportedAttributes.get().add(SVGNames::maskUnitsAttr);
 87 supportedAttributes.get().add(SVGNames::maskContentUnitsAttr);
 88 supportedAttributes.get().add(SVGNames::xAttr);
 89 supportedAttributes.get().add(SVGNames::yAttr);
 90 supportedAttributes.get().add(SVGNames::widthAttr);
 91 supportedAttributes.get().add(SVGNames::heightAttr);
9192 }
92  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 93 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
9394}
9495
9596void SVGMaskElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGPathElement.cpp

5151#include "SVGPathSegMovetoRel.h"
5252#include "SVGPathUtilities.h"
5353#include "SVGSVGElement.h"
 54#include <wtf/NeverDestroyed.h>
5455
5556namespace WebCore {
5657

@@PassRefPtr<SVGPathSegCurvetoQuadraticSmoothRel> SVGPathElement::createSVGPathSeg
213214
214215bool SVGPathElement::isSupportedAttribute(const QualifiedName& attrName)
215216{
216  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
217  if (supportedAttributes.isEmpty()) {
 217 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 218 if (supportedAttributes.get().isEmpty()) {
218219 SVGLangSpace::addSupportedAttributes(supportedAttributes);
219220 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes);
220  supportedAttributes.add(SVGNames::dAttr);
221  supportedAttributes.add(SVGNames::pathLengthAttr);
 221 supportedAttributes.get().add(SVGNames::dAttr);
 222 supportedAttributes.get().add(SVGNames::pathLengthAttr);
222223 }
223  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 224 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
224225}
225226
226227void SVGPathElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGPatternElement.cpp

3939#include "SVGSVGElement.h"
4040#include "SVGTransformable.h"
4141#include "XLinkNames.h"
 42#include <wtf/NeverDestroyed.h>
4243
4344namespace WebCore {
4445

@@PassRefPtr<SVGPatternElement> SVGPatternElement::create(const QualifiedName& tag
9192
9293bool SVGPatternElement::isSupportedAttribute(const QualifiedName& attrName)
9394{
94  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
95  if (supportedAttributes.isEmpty()) {
 95 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 96 if (supportedAttributes.get().isEmpty()) {
9697 SVGURIReference::addSupportedAttributes(supportedAttributes);
9798 SVGTests::addSupportedAttributes(supportedAttributes);
9899 SVGLangSpace::addSupportedAttributes(supportedAttributes);
99100 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes);
100101 SVGFitToViewBox::addSupportedAttributes(supportedAttributes);
101  supportedAttributes.add(SVGNames::patternUnitsAttr);
102  supportedAttributes.add(SVGNames::patternContentUnitsAttr);
103  supportedAttributes.add(SVGNames::patternTransformAttr);
104  supportedAttributes.add(SVGNames::xAttr);
105  supportedAttributes.add(SVGNames::yAttr);
106  supportedAttributes.add(SVGNames::widthAttr);
107  supportedAttributes.add(SVGNames::heightAttr);
 102 supportedAttributes.get().add(SVGNames::patternUnitsAttr);
 103 supportedAttributes.get().add(SVGNames::patternContentUnitsAttr);
 104 supportedAttributes.get().add(SVGNames::patternTransformAttr);
 105 supportedAttributes.get().add(SVGNames::xAttr);
 106 supportedAttributes.get().add(SVGNames::yAttr);
 107 supportedAttributes.get().add(SVGNames::widthAttr);
 108 supportedAttributes.get().add(SVGNames::heightAttr);
108109 }
109  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 110 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
110111}
111112
112113void SVGPatternElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGPolyElement.cpp

3030#include "SVGElementInstance.h"
3131#include "SVGNames.h"
3232#include "SVGParserUtilities.h"
 33#include <wtf/NeverDestroyed.h>
3334
3435namespace WebCore {
3536

@@SVGPolyElement::SVGPolyElement(const QualifiedName& tagName, Document& document)
6566
6667bool SVGPolyElement::isSupportedAttribute(const QualifiedName& attrName)
6768{
68  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
69  if (supportedAttributes.isEmpty()) {
 69 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 70 if (supportedAttributes.get().isEmpty()) {
7071 SVGLangSpace::addSupportedAttributes(supportedAttributes);
7172 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes);
72  supportedAttributes.add(SVGNames::pointsAttr);
 73 supportedAttributes.get().add(SVGNames::pointsAttr);
7374 }
74  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 75 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
7576}
7677
7778void SVGPolyElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGRadialGradientElement.cpp

3535#include "SVGTransform.h"
3636#include "SVGTransformList.h"
3737#include "SVGUnitTypes.h"
 38#include <wtf/NeverDestroyed.h>
3839
3940namespace WebCore {
4041

@@PassRefPtr<SVGRadialGradientElement> SVGRadialGradientElement::create(const Qual
7778
7879bool SVGRadialGradientElement::isSupportedAttribute(const QualifiedName& attrName)
7980{
80  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
81  if (supportedAttributes.isEmpty()) {
82  supportedAttributes.add(SVGNames::cxAttr);
83  supportedAttributes.add(SVGNames::cyAttr);
84  supportedAttributes.add(SVGNames::fxAttr);
85  supportedAttributes.add(SVGNames::fyAttr);
86  supportedAttributes.add(SVGNames::rAttr);
87  supportedAttributes.add(SVGNames::frAttr);
 81 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 82 if (supportedAttributes.get().isEmpty()) {
 83 supportedAttributes.get().add(SVGNames::cxAttr);
 84 supportedAttributes.get().add(SVGNames::cyAttr);
 85 supportedAttributes.get().add(SVGNames::fxAttr);
 86 supportedAttributes.get().add(SVGNames::fyAttr);
 87 supportedAttributes.get().add(SVGNames::rAttr);
 88 supportedAttributes.get().add(SVGNames::frAttr);
8889 }
89  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 90 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
9091}
9192
9293void SVGRadialGradientElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGRectElement.cpp

2828#include "SVGElementInstance.h"
2929#include "SVGLength.h"
3030#include "SVGNames.h"
 31#include <wtf/NeverDestroyed.h>
3132
3233namespace WebCore {
3334

@@PassRefPtr<SVGRectElement> SVGRectElement::create(const QualifiedName& tagName,
7172
7273bool SVGRectElement::isSupportedAttribute(const QualifiedName& attrName)
7374{
74  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
75  if (supportedAttributes.isEmpty()) {
 75 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 76 if (supportedAttributes.get().isEmpty()) {
7677 SVGLangSpace::addSupportedAttributes(supportedAttributes);
7778 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes);
78  supportedAttributes.add(SVGNames::xAttr);
79  supportedAttributes.add(SVGNames::yAttr);
80  supportedAttributes.add(SVGNames::widthAttr);
81  supportedAttributes.add(SVGNames::heightAttr);
82  supportedAttributes.add(SVGNames::rxAttr);
83  supportedAttributes.add(SVGNames::ryAttr);
 79 supportedAttributes.get().add(SVGNames::xAttr);
 80 supportedAttributes.get().add(SVGNames::yAttr);
 81 supportedAttributes.get().add(SVGNames::widthAttr);
 82 supportedAttributes.get().add(SVGNames::heightAttr);
 83 supportedAttributes.get().add(SVGNames::rxAttr);
 84 supportedAttributes.get().add(SVGNames::ryAttr);
8485 }
85  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 86 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
8687}
8788
8889void SVGRectElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGScriptElement.cpp

2929#include "SVGAnimatedStaticPropertyTearOff.h"
3030#include "SVGElementInstance.h"
3131#include "XLinkNames.h"
 32#include <wtf/NeverDestroyed.h>
3233
3334namespace WebCore {
3435

@@PassRefPtr<SVGScriptElement> SVGScriptElement::create(const QualifiedName& tagNa
5758
5859bool SVGScriptElement::isSupportedAttribute(const QualifiedName& attrName)
5960{
60  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
61  if (supportedAttributes.isEmpty()) {
 61 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 62 if (supportedAttributes.get().isEmpty()) {
6263 SVGURIReference::addSupportedAttributes(supportedAttributes);
6364 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes);
64  supportedAttributes.add(SVGNames::typeAttr);
65  supportedAttributes.add(HTMLNames::onerrorAttr);
 65 supportedAttributes.get().add(SVGNames::typeAttr);
 66 supportedAttributes.get().add(HTMLNames::onerrorAttr);
6667 }
67  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 68 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
6869}
6970
7071void SVGScriptElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGStopElement.cpp

2828#include "SVGElementInstance.h"
2929#include "SVGGradientElement.h"
3030#include "SVGNames.h"
 31#include <wtf/NeverDestroyed.h>
3132
3233namespace WebCore {
3334

@@PassRefPtr<SVGStopElement> SVGStopElement::create(const QualifiedName& tagName,
5455
5556bool SVGStopElement::isSupportedAttribute(const QualifiedName& attrName)
5657{
57  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
58  if (supportedAttributes.isEmpty())
59  supportedAttributes.add(SVGNames::offsetAttr);
60  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 58 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 59 if (supportedAttributes.get().isEmpty())
 60 supportedAttributes.get().add(SVGNames::offsetAttr);
 61 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
6162}
6263
6364void SVGStopElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGStyleElement.cpp

2828#include "Document.h"
2929#include "ExceptionCode.h"
3030#include "SVGNames.h"
 31#include <wtf/NeverDestroyed.h>
3132#include <wtf/StdLibExtras.h>
3233
3334namespace WebCore {

@@void SVGStyleElement::setTitle(const AtomicString& title, ExceptionCode&)
9798
9899bool SVGStyleElement::isSupportedAttribute(const QualifiedName& attrName)
99100{
100  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
101  if (supportedAttributes.isEmpty()) {
 101 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 102 if (supportedAttributes.get().isEmpty()) {
102103 SVGLangSpace::addSupportedAttributes(supportedAttributes);
103  supportedAttributes.add(SVGNames::titleAttr);
104  supportedAttributes.add(SVGNames::mediaAttr);
105  supportedAttributes.add(SVGNames::typeAttr);
 104 supportedAttributes.get().add(SVGNames::titleAttr);
 105 supportedAttributes.get().add(SVGNames::mediaAttr);
 106 supportedAttributes.get().add(SVGNames::typeAttr);
106107 }
107  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 108 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
108109}
109110
110111void SVGStyleElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGSymbolElement.cpp

2525#include "SVGElementInstance.h"
2626#include "SVGFitToViewBox.h"
2727#include "SVGNames.h"
 28#include <wtf/NeverDestroyed.h>
2829
2930namespace WebCore {
3031

@@PassRefPtr<SVGSymbolElement> SVGSymbolElement::create(const QualifiedName& tagNa
5455
5556bool SVGSymbolElement::isSupportedAttribute(const QualifiedName& attrName)
5657{
57  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
58  if (supportedAttributes.isEmpty()) {
 58 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 59 if (supportedAttributes.get().isEmpty()) {
5960 SVGLangSpace::addSupportedAttributes(supportedAttributes);
6061 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes);
6162 SVGFitToViewBox::addSupportedAttributes(supportedAttributes);
6263 }
63  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 64 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
6465}
6566
6667void SVGSymbolElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGTRefElement.cpp

3636#include "StyleInheritedData.h"
3737#include "Text.h"
3838#include "XLinkNames.h"
 39#include <wtf/NeverDestroyed.h>
3940
4041namespace WebCore {
4142

@@void SVGTRefElement::detachTarget()
179180
180181bool SVGTRefElement::isSupportedAttribute(const QualifiedName& attrName)
181182{
182  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
183  if (supportedAttributes.isEmpty())
 183 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 184 if (supportedAttributes.get().isEmpty())
184185 SVGURIReference::addSupportedAttributes(supportedAttributes);
185  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 186 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
186187}
187188
188189void SVGTRefElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGTests.cpp

2828#include "SVGElement.h"
2929#include "SVGNames.h"
3030#include "SVGStringList.h"
 31#include <wtf/NeverDestroyed.h>
3132
3233#if ENABLE(MATHML)
3334#include "MathMLNames.h"

@@SVGTests::SVGTests()
8990
9091SVGAttributeToPropertyMap& SVGTests::attributeToPropertyMap()
9192{
92  DEPRECATED_DEFINE_STATIC_LOCAL(SVGAttributeToPropertyMap, map, ());
93  if (!map.isEmpty())
 93 static NeverDestroyed<SVGAttributeToPropertyMap> map;
 94 if (!map.get().isEmpty())
9495 return map;
95  map.addProperty(requiredFeaturesPropertyInfo());
96  map.addProperty(requiredExtensionsPropertyInfo());
97  map.addProperty(systemLanguagePropertyInfo());
 96 map.get().addProperty(requiredFeaturesPropertyInfo());
 97 map.get().addProperty(requiredExtensionsPropertyInfo());
 98 map.get().addProperty(systemLanguagePropertyInfo());
9899 return map;
99100}
100101

Source/WebCore/svg/SVGTextContentElement.cpp

3333#include "SVGNames.h"
3434#include "SVGTextQuery.h"
3535#include "XMLNames.h"
 36#include <wtf/NeverDestroyed.h>
3637
3738namespace WebCore {
3839

@@PassRefPtr<SVGAnimatedProperty> SVGTextContentElement::lookupOrCreateTextLengthW
9192
9293PassRefPtr<SVGAnimatedLength> SVGTextContentElement::textLengthAnimated()
9394{
94  DEPRECATED_DEFINE_STATIC_LOCAL(SVGLength, defaultTextLength, (LengthModeOther));
 95 static NeverDestroyed<SVGLength> defaultTextLength(LengthModeOther);
9596 if (m_specifiedTextLength == defaultTextLength)
9697 m_textLength.value.newValueSpecifiedUnits(LengthTypeNumber, getComputedTextLength(), ASSERT_NO_EXCEPTION);
9798

@@void SVGTextContentElement::selectSubString(unsigned charnum, unsigned nchars, E
209210
210211bool SVGTextContentElement::isSupportedAttribute(const QualifiedName& attrName)
211212{
212  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
213  if (supportedAttributes.isEmpty()) {
 213 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 214 if (supportedAttributes.get().isEmpty()) {
214215 SVGLangSpace::addSupportedAttributes(supportedAttributes);
215216 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes);
216  supportedAttributes.add(SVGNames::lengthAdjustAttr);
217  supportedAttributes.add(SVGNames::textLengthAttr);
 217 supportedAttributes.get().add(SVGNames::lengthAdjustAttr);
 218 supportedAttributes.get().add(SVGNames::textLengthAttr);
218219 }
219  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 220 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
220221}
221222
222223bool SVGTextContentElement::isPresentationAttribute(const QualifiedName& name) const

Source/WebCore/svg/SVGTextPathElement.cpp

2727#include "SVGElementInstance.h"
2828#include "SVGNames.h"
2929#include "XLinkNames.h"
 30#include <wtf/NeverDestroyed.h>
3031
3132namespace WebCore {
3233

@@void SVGTextPathElement::clearResourceReferences()
7172
7273bool SVGTextPathElement::isSupportedAttribute(const QualifiedName& attrName)
7374{
74  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
75  if (supportedAttributes.isEmpty()) {
 75 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 76 if (supportedAttributes.get().isEmpty()) {
7677 SVGURIReference::addSupportedAttributes(supportedAttributes);
77  supportedAttributes.add(SVGNames::startOffsetAttr);
78  supportedAttributes.add(SVGNames::methodAttr);
79  supportedAttributes.add(SVGNames::spacingAttr);
 78 supportedAttributes.get().add(SVGNames::startOffsetAttr);
 79 supportedAttributes.get().add(SVGNames::methodAttr);
 80 supportedAttributes.get().add(SVGNames::spacingAttr);
8081 }
81  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 82 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
8283}
8384
8485void SVGTextPathElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGTextPositioningElement.cpp

2828#include "SVGLengthList.h"
2929#include "SVGNames.h"
3030#include "SVGNumberList.h"
 31#include <wtf/NeverDestroyed.h>
3132
3233namespace WebCore {
3334

@@SVGTextPositioningElement::SVGTextPositioningElement(const QualifiedName& tagNam
5556
5657bool SVGTextPositioningElement::isSupportedAttribute(const QualifiedName& attrName)
5758{
58  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
59  if (supportedAttributes.isEmpty()) {
60  supportedAttributes.add(SVGNames::xAttr);
61  supportedAttributes.add(SVGNames::yAttr);
62  supportedAttributes.add(SVGNames::dxAttr);
63  supportedAttributes.add(SVGNames::dyAttr);
64  supportedAttributes.add(SVGNames::rotateAttr);
 59 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 60 if (supportedAttributes.get().isEmpty()) {
 61 supportedAttributes.get().add(SVGNames::xAttr);
 62 supportedAttributes.get().add(SVGNames::yAttr);
 63 supportedAttributes.get().add(SVGNames::dxAttr);
 64 supportedAttributes.get().add(SVGNames::dyAttr);
 65 supportedAttributes.get().add(SVGNames::rotateAttr);
6566 }
66  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 67 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
6768}
6869
6970void SVGTextPositioningElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

Source/WebCore/svg/SVGUseElement.cpp

5757
5858// Dump the deep-expanded shadow tree (where the renderers are built from)
5959// #define DUMP_SHADOW_TREE
 60#include <wtf/NeverDestroyed.h>
6061
6162namespace WebCore {
6263

@@SVGElementInstance* SVGUseElement::animatedInstanceRoot() const
129130
130131bool SVGUseElement::isSupportedAttribute(const QualifiedName& attrName)
131132{
132  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
133  if (supportedAttributes.isEmpty()) {
 133 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 134 if (supportedAttributes.get().isEmpty()) {
134135 SVGLangSpace::addSupportedAttributes(supportedAttributes);
135136 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes);
136137 SVGURIReference::addSupportedAttributes(supportedAttributes);
137  supportedAttributes.add(SVGNames::xAttr);
138  supportedAttributes.add(SVGNames::yAttr);
139  supportedAttributes.add(SVGNames::widthAttr);
140  supportedAttributes.add(SVGNames::heightAttr);
 138 supportedAttributes.get().add(SVGNames::xAttr);
 139 supportedAttributes.get().add(SVGNames::yAttr);
 140 supportedAttributes.get().add(SVGNames::widthAttr);
 141 supportedAttributes.get().add(SVGNames::heightAttr);
141142 }
142  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 143 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
143144}
144145
145146void SVGUseElement::parseAttribute(const QualifiedName& name, const AtomicString& value)

@@static bool isDisallowedElement(const Element& element)
334335 if (!element.isSVGElement())
335336 return true;
336337
337  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, allowedElementTags, ());
338  if (allowedElementTags.isEmpty()) {
339  allowedElementTags.add(SVGNames::aTag);
340  allowedElementTags.add(SVGNames::circleTag);
341  allowedElementTags.add(SVGNames::descTag);
342  allowedElementTags.add(SVGNames::ellipseTag);
343  allowedElementTags.add(SVGNames::gTag);
344  allowedElementTags.add(SVGNames::imageTag);
345  allowedElementTags.add(SVGNames::lineTag);
346  allowedElementTags.add(SVGNames::metadataTag);
347  allowedElementTags.add(SVGNames::pathTag);
348  allowedElementTags.add(SVGNames::polygonTag);
349  allowedElementTags.add(SVGNames::polylineTag);
350  allowedElementTags.add(SVGNames::rectTag);
351  allowedElementTags.add(SVGNames::svgTag);
352  allowedElementTags.add(SVGNames::switchTag);
353  allowedElementTags.add(SVGNames::symbolTag);
354  allowedElementTags.add(SVGNames::textTag);
355  allowedElementTags.add(SVGNames::textPathTag);
356  allowedElementTags.add(SVGNames::titleTag);
357  allowedElementTags.add(SVGNames::trefTag);
358  allowedElementTags.add(SVGNames::tspanTag);
359  allowedElementTags.add(SVGNames::useTag);
 338 static NeverDestroyed<HashSet<QualifiedName>> allowedElementTags;
 339 if (allowedElementTags.get().isEmpty()) {
 340 allowedElementTags.get().add(SVGNames::aTag);
 341 allowedElementTags.get().add(SVGNames::circleTag);
 342 allowedElementTags.get().add(SVGNames::descTag);
 343 allowedElementTags.get().add(SVGNames::ellipseTag);
 344 allowedElementTags.get().add(SVGNames::gTag);
 345 allowedElementTags.get().add(SVGNames::imageTag);
 346 allowedElementTags.get().add(SVGNames::lineTag);
 347 allowedElementTags.get().add(SVGNames::metadataTag);
 348 allowedElementTags.get().add(SVGNames::pathTag);
 349 allowedElementTags.get().add(SVGNames::polygonTag);
 350 allowedElementTags.get().add(SVGNames::polylineTag);
 351 allowedElementTags.get().add(SVGNames::rectTag);
 352 allowedElementTags.get().add(SVGNames::svgTag);
 353 allowedElementTags.get().add(SVGNames::switchTag);
 354 allowedElementTags.get().add(SVGNames::symbolTag);
 355 allowedElementTags.get().add(SVGNames::textTag);
 356 allowedElementTags.get().add(SVGNames::textPathTag);
 357 allowedElementTags.get().add(SVGNames::titleTag);
 358 allowedElementTags.get().add(SVGNames::trefTag);
 359 allowedElementTags.get().add(SVGNames::tspanTag);
 360 allowedElementTags.get().add(SVGNames::useTag);
360361 }
361  return !allowedElementTags.contains<SVGAttributeHashTranslator>(element.tagQName());
 362 return !allowedElementTags.get().contains<SVGAttributeHashTranslator>(element.tagQName());
362363}
363364
364365static bool subtreeContainsDisallowedElement(SVGElement& start)

Source/WebCore/svg/SVGViewElement.cpp

2626#include "SVGNames.h"
2727#include "SVGStringList.h"
2828#include "SVGZoomAndPan.h"
 29#include <wtf/NeverDestroyed.h>
2930
3031namespace WebCore {
3132

@@PassRefPtr<SVGViewElement> SVGViewElement::create(const QualifiedName& tagName,
5758
5859bool SVGViewElement::isSupportedAttribute(const QualifiedName& attrName)
5960{
60  DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
61  if (supportedAttributes.isEmpty()) {
 61 static NeverDestroyed<HashSet<QualifiedName>> supportedAttributes;
 62 if (supportedAttributes.get().isEmpty()) {
6263 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes);
6364 SVGFitToViewBox::addSupportedAttributes(supportedAttributes);
6465 SVGZoomAndPan::addSupportedAttributes(supportedAttributes);
65  supportedAttributes.add(SVGNames::viewTargetAttr);
 66 supportedAttributes.get().add(SVGNames::viewTargetAttr);
6667 }
67  return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
 68 return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
6869}
6970
7071void SVGViewElement::parseAttribute(const QualifiedName& name, const AtomicString& value)