Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL
[WebKit-https.git] / Source / WebCore / html / track / WebVTTElement.cpp
index 1496bb0..1f610f5 100644 (file)
@@ -36,14 +36,14 @@ namespace WebCore {
 
 static const QualifiedName& nodeTypeToTagName(WebVTTNodeType nodeType)
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(QualifiedName, cTag, (nullAtom, "c", nullAtom));
-    DEPRECATED_DEFINE_STATIC_LOCAL(QualifiedName, vTag, (nullAtom, "v", nullAtom));
-    DEPRECATED_DEFINE_STATIC_LOCAL(QualifiedName, langTag, (nullAtom, "lang", nullAtom));
-    DEPRECATED_DEFINE_STATIC_LOCAL(QualifiedName, bTag, (nullAtom, "b", nullAtom));
-    DEPRECATED_DEFINE_STATIC_LOCAL(QualifiedName, uTag, (nullAtom, "u", nullAtom));
-    DEPRECATED_DEFINE_STATIC_LOCAL(QualifiedName, iTag, (nullAtom, "i", nullAtom));
-    DEPRECATED_DEFINE_STATIC_LOCAL(QualifiedName, rubyTag, (nullAtom, "ruby", nullAtom));
-    DEPRECATED_DEFINE_STATIC_LOCAL(QualifiedName, rtTag, (nullAtom, "rt", nullAtom));
+    static NeverDestroyed<QualifiedName> cTag(nullAtom, "c", nullAtom);
+    static NeverDestroyed<QualifiedName> vTag(nullAtom, "v", nullAtom);
+    static NeverDestroyed<QualifiedName> langTag(nullAtom, "lang", nullAtom);
+    static NeverDestroyed<QualifiedName> bTag(nullAtom, "b", nullAtom);
+    static NeverDestroyed<QualifiedName> uTag(nullAtom, "u", nullAtom);
+    static NeverDestroyed<QualifiedName> iTag(nullAtom, "i", nullAtom);
+    static NeverDestroyed<QualifiedName> rubyTag(nullAtom, "ruby", nullAtom);
+    static NeverDestroyed<QualifiedName> rtTag(nullAtom, "rt", nullAtom);
     switch (nodeType) {
     case WebVTTNodeTypeClass:
         return cTag;
@@ -84,7 +84,7 @@ Ref<Element> WebVTTElement::cloneElementWithoutAttributesAndChildren(Document& t
 {
     Ref<WebVTTElement> clone = create(static_cast<WebVTTNodeType>(m_webVTTNodeType), targetDocument);
     clone->setLanguage(m_language);
-    return WTF::move(clone);
+    return WTFMove(clone);
 }
 
 PassRefPtr<HTMLElement> WebVTTElement::createEquivalentHTMLElement(Document& document)