Use LazyNeverDestroyed instead of DEFINE_GLOBAL for XMLNames, HTMLNames, MathMLNames...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 30 Oct 2017 23:41:01 +0000 (23:41 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 30 Oct 2017 23:41:01 +0000 (23:41 +0000)
https://bugs.webkit.org/show_bug.cgi?id=175118

Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2017-10-30
Reviewed by Alex Christensen.

Source/WebCore:

Stop using DEFINE_GLOBAL hack in favor of LazyNeverDestroyed.

No new tests since there should be no behavioral change.

* dom/make_names.pl:
(printConstructors):
(printNamesHeaderFile):
(printNamesCppFile):
(printDefinitions):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::inheritsPresentationalRole const):
* css/StyleResolver.cpp:
(WebCore::hasEffectiveDisplayNoneForDisplayContents):
* dom/CustomElementReactionQueue.cpp:
(WebCore::CustomElementReactionQueue::observesStyleAttribute const):
* dom/Document.cpp:
(WebCore::Document::validateCustomElementName):
* dom/Element.cpp:
(WebCore::isStyleAttribute):
(WebCore::canAttachAuthorShadowRoot):
* dom/ElementData.cpp:
(WebCore::ElementData::findLanguageAttribute const):
* domjit/JSDocumentDOMJIT.cpp:
(WebCore::compileDocumentBodyAttribute):
* editing/Editor.cpp:
(WebCore::Editor::applyEditingStyleToBodyElement const):
* editing/EditorCommand.cpp:
(WebCore::valueDefaultParagraphSeparator):
* editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::serializeNodesWithNamespaces):
(WebCore::MarkupAccumulator::appendNamespace):
(WebCore::MarkupAccumulator::elementCannotHaveEndTag):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::isProhibitedParagraphChild):
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::createWindowEventHandlerNameMap):
* html/HTMLDocument.cpp:
(WebCore::HTMLDocument::isCaseSensitiveAttribute):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::createEventHandlerNameMap):
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::findFosterSite):
* html/parser/HTMLElementStack.cpp:
(WebCore::HTMLElementStack::hasTemplateInHTMLScope const):
* html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::updatePredictedBaseURL):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processFakePEndTagIfPInButtonScope):
(WebCore::HTMLTreeBuilder::processStartTagForInBody):
(WebCore::HTMLTreeBuilder::processTemplateEndTag):
(WebCore::HTMLTreeBuilder::processEndOfFileForInTemplateContents):
(WebCore::HTMLTreeBuilder::processStartTag):
(WebCore::HTMLTreeBuilder::processBodyEndTagForInBody):
(WebCore::HTMLTreeBuilder::processEndTagForInBody):
(WebCore::HTMLTreeBuilder::processCaptionEndTagForInCaption):
(WebCore::HTMLTreeBuilder::processTableEndTagForInTable):
(WebCore::HTMLTreeBuilder::processEndTag):
(WebCore::HTMLTreeBuilder::insertPhoneNumberLink):
(WebCore::HTMLTreeBuilder::defaultForBeforeHTML):
(WebCore::HTMLTreeBuilder::defaultForBeforeHead):
(WebCore::HTMLTreeBuilder::defaultForInHead):
(WebCore::HTMLTreeBuilder::defaultForInHeadNoscript):
(WebCore::HTMLTreeBuilder::defaultForAfterHead):
* html/parser/TextDocumentParser.cpp:
(WebCore::TextDocumentParser::insertFakePreElement):
* rendering/svg/SVGPathData.cpp:
(WebCore::pathFromGraphicsElement):
* rendering/svg/SVGResources.cpp:
(WebCore::clipperFilterMaskerTags):
(WebCore::markerTags):
(WebCore::fillAndStrokeTags):
(WebCore::chainableResourceTags):
* svg/SVGAnimatedBoolean.h:
* svg/SVGAnimatedEnumeration.h:
* svg/SVGAnimatedInteger.h:
* svg/SVGAnimatedLength.h:
* svg/SVGAnimatedLengthList.h:
* svg/SVGAnimatedNumber.h:
* svg/SVGAnimatedNumberList.h:
* svg/SVGAnimatedPreserveAspectRatio.h:
* svg/SVGAnimatedRect.h:
* svg/SVGAnimatedString.h:
* svg/SVGAnimatedTransformList.h:
* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::isSupportedAttribute):
* svg/SVGCursorElement.cpp:
(WebCore::SVGCursorElement::isSupportedAttribute):
* svg/SVGElement.cpp:
(WebCore::createAttributeNameToCSSPropertyIDMap):
(WebCore::SVGElement::childShouldCreateRenderer const):
(WebCore::SVGElement::animatableAttributeForName):
* svg/SVGFilterElement.cpp:
(WebCore::SVGFilterElement::isSupportedAttribute):
* svg/SVGFilterPrimitiveStandardAttributes.cpp:
(WebCore::SVGFilterPrimitiveStandardAttributes::isSupportedAttribute):
* svg/SVGForeignObjectElement.cpp:
(WebCore::SVGForeignObjectElement::isSupportedAttribute):
* svg/SVGGradientElement.cpp:
(WebCore::SVGGradientElement::isSupportedAttribute):
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::isSupportedAttribute):
* svg/SVGLineElement.cpp:
(WebCore::SVGLineElement::isSupportedAttribute):
* svg/SVGMarkerElement.cpp:
(WebCore::SVGMarkerElement::isSupportedAttribute):
* svg/SVGMaskElement.cpp:
(WebCore::SVGMaskElement::isSupportedAttribute):
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::dPropertyInfo):
(WebCore::SVGPathElement::isSupportedAttribute):
* svg/SVGPatternElement.cpp:
(WebCore::SVGPatternElement::isSupportedAttribute):
* svg/SVGPolyElement.cpp:
(WebCore::SVGPolyElement::pointsPropertyInfo):
* svg/SVGRadialGradientElement.cpp:
(WebCore::SVGRadialGradientElement::isSupportedAttribute):
* svg/SVGTextContentElement.cpp:
(WebCore::SVGTextContentElement::textLengthPropertyInfo):
(WebCore::SVGTextContentElement::isSupportedAttribute):
* svg/SVGTextPathElement.cpp:
(WebCore::SVGTextPathElement::isSupportedAttribute):
* svg/SVGUseElement.cpp:
(WebCore::createAllowedElementSet):
* xml/NativeXPathNSResolver.cpp:
(WebCore::NativeXPathNSResolver::lookupNamespaceURI):
* xml/parser/XMLDocumentParser.cpp:
(WebCore::XMLDocumentParser::parseDocumentFragment):

Source/WebKit:

* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPrivate.cpp:
(WebKit::wrap):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224213 268f45cc-cd09-0410-ab3c-d52691b4dbfc

56 files changed:
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/dom/CustomElementReactionQueue.cpp
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Element.cpp
Source/WebCore/dom/ElementData.cpp
Source/WebCore/dom/make_names.pl
Source/WebCore/domjit/JSDocumentDOMJIT.cpp
Source/WebCore/editing/Editor.cpp
Source/WebCore/editing/EditorCommand.cpp
Source/WebCore/editing/MarkupAccumulator.cpp
Source/WebCore/editing/ReplaceSelectionCommand.cpp
Source/WebCore/html/HTMLBodyElement.cpp
Source/WebCore/html/HTMLDocument.cpp
Source/WebCore/html/HTMLElement.cpp
Source/WebCore/html/parser/HTMLConstructionSite.cpp
Source/WebCore/html/parser/HTMLElementStack.cpp
Source/WebCore/html/parser/HTMLPreloadScanner.cpp
Source/WebCore/html/parser/HTMLTreeBuilder.cpp
Source/WebCore/html/parser/TextDocumentParser.cpp
Source/WebCore/rendering/svg/SVGPathData.cpp
Source/WebCore/rendering/svg/SVGResources.cpp
Source/WebCore/svg/SVGAnimatedBoolean.h
Source/WebCore/svg/SVGAnimatedEnumeration.h
Source/WebCore/svg/SVGAnimatedInteger.h
Source/WebCore/svg/SVGAnimatedLength.h
Source/WebCore/svg/SVGAnimatedLengthList.h
Source/WebCore/svg/SVGAnimatedNumber.h
Source/WebCore/svg/SVGAnimatedNumberList.h
Source/WebCore/svg/SVGAnimatedPreserveAspectRatio.h
Source/WebCore/svg/SVGAnimatedRect.h
Source/WebCore/svg/SVGAnimatedString.h
Source/WebCore/svg/SVGAnimatedTransformList.h
Source/WebCore/svg/SVGAnimationElement.cpp
Source/WebCore/svg/SVGCursorElement.cpp
Source/WebCore/svg/SVGElement.cpp
Source/WebCore/svg/SVGFilterElement.cpp
Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp
Source/WebCore/svg/SVGForeignObjectElement.cpp
Source/WebCore/svg/SVGGradientElement.cpp
Source/WebCore/svg/SVGImageElement.cpp
Source/WebCore/svg/SVGLineElement.cpp
Source/WebCore/svg/SVGMarkerElement.cpp
Source/WebCore/svg/SVGMaskElement.cpp
Source/WebCore/svg/SVGPathElement.cpp
Source/WebCore/svg/SVGPatternElement.cpp
Source/WebCore/svg/SVGPolyElement.cpp
Source/WebCore/svg/SVGRadialGradientElement.cpp
Source/WebCore/svg/SVGTextContentElement.cpp
Source/WebCore/svg/SVGTextPathElement.cpp
Source/WebCore/svg/SVGUseElement.cpp
Source/WebCore/xml/NativeXPathNSResolver.cpp
Source/WebCore/xml/parser/XMLDocumentParser.cpp
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPrivate.cpp

index 836ae70..158d72b 100644 (file)
@@ -1,3 +1,138 @@
+2017-10-30  Fujii Hironori  <Hironori.Fujii@sony.com>
+
+        Use LazyNeverDestroyed instead of DEFINE_GLOBAL for XMLNames, HTMLNames, MathMLNames and SVGNames
+        https://bugs.webkit.org/show_bug.cgi?id=175118
+
+        Reviewed by Alex Christensen.
+
+        Stop using DEFINE_GLOBAL hack in favor of LazyNeverDestroyed.
+
+        No new tests since there should be no behavioral change.
+
+        * dom/make_names.pl:
+        (printConstructors):
+        (printNamesHeaderFile):
+        (printNamesCppFile):
+        (printDefinitions):
+        * accessibility/AccessibilityRenderObject.cpp:
+        (WebCore::AccessibilityRenderObject::inheritsPresentationalRole const):
+        * css/StyleResolver.cpp:
+        (WebCore::hasEffectiveDisplayNoneForDisplayContents):
+        * dom/CustomElementReactionQueue.cpp:
+        (WebCore::CustomElementReactionQueue::observesStyleAttribute const):
+        * dom/Document.cpp:
+        (WebCore::Document::validateCustomElementName):
+        * dom/Element.cpp:
+        (WebCore::isStyleAttribute):
+        (WebCore::canAttachAuthorShadowRoot):
+        * dom/ElementData.cpp:
+        (WebCore::ElementData::findLanguageAttribute const):
+        * domjit/JSDocumentDOMJIT.cpp:
+        (WebCore::compileDocumentBodyAttribute):
+        * editing/Editor.cpp:
+        (WebCore::Editor::applyEditingStyleToBodyElement const):
+        * editing/EditorCommand.cpp:
+        (WebCore::valueDefaultParagraphSeparator):
+        * editing/MarkupAccumulator.cpp:
+        (WebCore::MarkupAccumulator::serializeNodesWithNamespaces):
+        (WebCore::MarkupAccumulator::appendNamespace):
+        (WebCore::MarkupAccumulator::elementCannotHaveEndTag):
+        * editing/ReplaceSelectionCommand.cpp:
+        (WebCore::isProhibitedParagraphChild):
+        * html/HTMLBodyElement.cpp:
+        (WebCore::HTMLBodyElement::createWindowEventHandlerNameMap):
+        * html/HTMLDocument.cpp:
+        (WebCore::HTMLDocument::isCaseSensitiveAttribute):
+        * html/HTMLElement.cpp:
+        (WebCore::HTMLElement::createEventHandlerNameMap):
+        * html/parser/HTMLConstructionSite.cpp:
+        (WebCore::HTMLConstructionSite::findFosterSite):
+        * html/parser/HTMLElementStack.cpp:
+        (WebCore::HTMLElementStack::hasTemplateInHTMLScope const):
+        * html/parser/HTMLPreloadScanner.cpp:
+        (WebCore::TokenPreloadScanner::updatePredictedBaseURL):
+        * html/parser/HTMLTreeBuilder.cpp:
+        (WebCore::HTMLTreeBuilder::processFakePEndTagIfPInButtonScope):
+        (WebCore::HTMLTreeBuilder::processStartTagForInBody):
+        (WebCore::HTMLTreeBuilder::processTemplateEndTag):
+        (WebCore::HTMLTreeBuilder::processEndOfFileForInTemplateContents):
+        (WebCore::HTMLTreeBuilder::processStartTag):
+        (WebCore::HTMLTreeBuilder::processBodyEndTagForInBody):
+        (WebCore::HTMLTreeBuilder::processEndTagForInBody):
+        (WebCore::HTMLTreeBuilder::processCaptionEndTagForInCaption):
+        (WebCore::HTMLTreeBuilder::processTableEndTagForInTable):
+        (WebCore::HTMLTreeBuilder::processEndTag):
+        (WebCore::HTMLTreeBuilder::insertPhoneNumberLink):
+        (WebCore::HTMLTreeBuilder::defaultForBeforeHTML):
+        (WebCore::HTMLTreeBuilder::defaultForBeforeHead):
+        (WebCore::HTMLTreeBuilder::defaultForInHead):
+        (WebCore::HTMLTreeBuilder::defaultForInHeadNoscript):
+        (WebCore::HTMLTreeBuilder::defaultForAfterHead):
+        * html/parser/TextDocumentParser.cpp:
+        (WebCore::TextDocumentParser::insertFakePreElement):
+        * rendering/svg/SVGPathData.cpp:
+        (WebCore::pathFromGraphicsElement):
+        * rendering/svg/SVGResources.cpp:
+        (WebCore::clipperFilterMaskerTags):
+        (WebCore::markerTags):
+        (WebCore::fillAndStrokeTags):
+        (WebCore::chainableResourceTags):
+        * svg/SVGAnimatedBoolean.h:
+        * svg/SVGAnimatedEnumeration.h:
+        * svg/SVGAnimatedInteger.h:
+        * svg/SVGAnimatedLength.h:
+        * svg/SVGAnimatedLengthList.h:
+        * svg/SVGAnimatedNumber.h:
+        * svg/SVGAnimatedNumberList.h:
+        * svg/SVGAnimatedPreserveAspectRatio.h:
+        * svg/SVGAnimatedRect.h:
+        * svg/SVGAnimatedString.h:
+        * svg/SVGAnimatedTransformList.h:
+        * svg/SVGAnimationElement.cpp:
+        (WebCore::SVGAnimationElement::isSupportedAttribute):
+        * svg/SVGCursorElement.cpp:
+        (WebCore::SVGCursorElement::isSupportedAttribute):
+        * svg/SVGElement.cpp:
+        (WebCore::createAttributeNameToCSSPropertyIDMap):
+        (WebCore::SVGElement::childShouldCreateRenderer const):
+        (WebCore::SVGElement::animatableAttributeForName):
+        * svg/SVGFilterElement.cpp:
+        (WebCore::SVGFilterElement::isSupportedAttribute):
+        * svg/SVGFilterPrimitiveStandardAttributes.cpp:
+        (WebCore::SVGFilterPrimitiveStandardAttributes::isSupportedAttribute):
+        * svg/SVGForeignObjectElement.cpp:
+        (WebCore::SVGForeignObjectElement::isSupportedAttribute):
+        * svg/SVGGradientElement.cpp:
+        (WebCore::SVGGradientElement::isSupportedAttribute):
+        * svg/SVGImageElement.cpp:
+        (WebCore::SVGImageElement::isSupportedAttribute):
+        * svg/SVGLineElement.cpp:
+        (WebCore::SVGLineElement::isSupportedAttribute):
+        * svg/SVGMarkerElement.cpp:
+        (WebCore::SVGMarkerElement::isSupportedAttribute):
+        * svg/SVGMaskElement.cpp:
+        (WebCore::SVGMaskElement::isSupportedAttribute):
+        * svg/SVGPathElement.cpp:
+        (WebCore::SVGPathElement::dPropertyInfo):
+        (WebCore::SVGPathElement::isSupportedAttribute):
+        * svg/SVGPatternElement.cpp:
+        (WebCore::SVGPatternElement::isSupportedAttribute):
+        * svg/SVGPolyElement.cpp:
+        (WebCore::SVGPolyElement::pointsPropertyInfo):
+        * svg/SVGRadialGradientElement.cpp:
+        (WebCore::SVGRadialGradientElement::isSupportedAttribute):
+        * svg/SVGTextContentElement.cpp:
+        (WebCore::SVGTextContentElement::textLengthPropertyInfo):
+        (WebCore::SVGTextContentElement::isSupportedAttribute):
+        * svg/SVGTextPathElement.cpp:
+        (WebCore::SVGTextPathElement::isSupportedAttribute):
+        * svg/SVGUseElement.cpp:
+        (WebCore::createAllowedElementSet):
+        * xml/NativeXPathNSResolver.cpp:
+        (WebCore::NativeXPathNSResolver::lookupNamespaceURI):
+        * xml/parser/XMLDocumentParser.cpp:
+        (WebCore::XMLDocumentParser::parseDocumentFragment):
+
 2017-10-30  Jer Noble  <jer.noble@apple.com>
 
         [WebGL] Optimization to skip painting if texture and source surface hasn't changed isn't working; re-optimize.
index 3ddba38..acd22e1 100644 (file)
@@ -2883,13 +2883,13 @@ bool AccessibilityRenderObject::inheritsPresentationalRole() const
     switch (roleValue()) {
     case AccessibilityRole::ListItem:
     case AccessibilityRole::ListMarker: {
-        static const auto listItemParents = makeNeverDestroyed(Vector<const HTMLQualifiedName*> { &dlTag, &olTag, &ulTag });
+        static const auto listItemParents = makeNeverDestroyed(Vector<const HTMLQualifiedName*> { &dlTag.get(), &olTag.get(), &ulTag.get() });
         parentTags = &listItemParents.get();
         break;
     }
     case AccessibilityRole::GridCell:
     case AccessibilityRole::Cell: {
-        static const auto tableCellParents = makeNeverDestroyed(Vector<const HTMLQualifiedName*> { &tableTag });
+        static const auto tableCellParents = makeNeverDestroyed(Vector<const HTMLQualifiedName*> { &tableTag.get() });
         parentTags = &tableCellParents.get();
         break;
     }
index 09ae7b1..8b3360c 100644 (file)
@@ -751,23 +751,23 @@ static bool hasEffectiveDisplayNoneForDisplayContents(const Element& element)
     // https://drafts.csswg.org/css-display-3/#unbox-html
     static NeverDestroyed<HashSet<AtomicString>> tagNames = [] {
         static const HTMLQualifiedName* const tagList[] = {
-            &brTag,
-            &wbrTag,
-            &meterTag,
-            &appletTag,
-            &progressTag,
-            &canvasTag,
-            &embedTag,
-            &objectTag,
-            &audioTag,
-            &iframeTag,
-            &imgTag,
-            &videoTag,
-            &frameTag,
-            &framesetTag,
-            &inputTag,
-            &textareaTag,
-            &selectTag,
+            &brTag.get(),
+            &wbrTag.get(),
+            &meterTag.get(),
+            &appletTag.get(),
+            &progressTag.get(),
+            &canvasTag.get(),
+            &embedTag.get(),
+            &objectTag.get(),
+            &audioTag.get(),
+            &iframeTag.get(),
+            &imgTag.get(),
+            &videoTag.get(),
+            &frameTag.get(),
+            &framesetTag.get(),
+            &inputTag.get(),
+            &textareaTag.get(),
+            &selectTag.get(),
         };
         HashSet<AtomicString> set;
         for (auto& name : tagList)
index 8496206..207ee05 100644 (file)
@@ -198,7 +198,7 @@ void CustomElementReactionQueue::enqueuePostUpgradeReactions(Element& element)
 
 bool CustomElementReactionQueue::observesStyleAttribute() const
 {
-    return m_interface->observesAttribute(HTMLNames::styleAttr.localName());
+    return m_interface->observesAttribute(HTMLNames::styleAttr->localName());
 }
 
 void CustomElementReactionQueue::invokeAll(Element& element)
index 1a220fd..1f338ef 100644 (file)
@@ -1151,18 +1151,18 @@ CustomElementNameValidationStatus Document::validateCustomElementName(const Atom
         return CustomElementNameValidationStatus::ContainsNoHyphen;
 
 #if ENABLE(MATHML)
-    const auto& annotationXmlLocalName = MathMLNames::annotation_xmlTag.localName();
+    const auto& annotationXmlLocalName = MathMLNames::annotation_xmlTag->localName();
 #else
     static NeverDestroyed<const AtomicString> annotationXmlLocalName("annotation-xml", AtomicString::ConstructFromLiteral);
 #endif
 
-    if (localName == SVGNames::color_profileTag.localName()
-        || localName == SVGNames::font_faceTag.localName()
-        || localName == SVGNames::font_face_formatTag.localName()
-        || localName == SVGNames::font_face_nameTag.localName()
-        || localName == SVGNames::font_face_srcTag.localName()
-        || localName == SVGNames::font_face_uriTag.localName()
-        || localName == SVGNames::missing_glyphTag.localName()
+    if (localName == SVGNames::color_profileTag->localName()
+        || localName == SVGNames::font_faceTag->localName()
+        || localName == SVGNames::font_face_formatTag->localName()
+        || localName == SVGNames::font_face_nameTag->localName()
+        || localName == SVGNames::font_face_srcTag->localName()
+        || localName == SVGNames::font_face_uriTag->localName()
+        || localName == SVGNames::missing_glyphTag->localName()
         || localName == annotationXmlLocalName)
         return CustomElementNameValidationStatus::ConflictsWithStandardElementName;
 
index 65b1770..ad56027 100644 (file)
@@ -463,7 +463,7 @@ static ALWAYS_INLINE bool isStyleAttribute(const Element& element, const AtomicS
 {
     if (shouldIgnoreAttributeCase(element))
         return equalLettersIgnoringASCIICase(attributeLocalName, "style");
-    return attributeLocalName == styleAttr.localName();
+    return attributeLocalName == styleAttr->localName();
 }
 
 ALWAYS_INLINE void Element::synchronizeAttribute(const AtomicString& localName) const
@@ -1816,23 +1816,23 @@ static bool canAttachAuthorShadowRoot(const Element& element)
 {
     static NeverDestroyed<HashSet<AtomicString>> tagNames = [] {
         static const HTMLQualifiedName* const tagList[] = {
-            &articleTag,
-            &asideTag,
-            &blockquoteTag,
-            &bodyTag,
-            &divTag,
-            &footerTag,
-            &h1Tag,
-            &h2Tag,
-            &h3Tag,
-            &h4Tag,
-            &h5Tag,
-            &h6Tag,
-            &headerTag,
-            &navTag,
-            &pTag,
-            &sectionTag,
-            &spanTag
+            &articleTag.get(),
+            &asideTag.get(),
+            &blockquoteTag.get(),
+            &bodyTag.get(),
+            &divTag.get(),
+            &footerTag.get(),
+            &h1Tag.get(),
+            &h2Tag.get(),
+            &h3Tag.get(),
+            &h4Tag.get(),
+            &h5Tag.get(),
+            &h6Tag.get(),
+            &headerTag.get(),
+            &navTag.get(),
+            &pTag.get(),
+            &sectionTag.get(),
+            &spanTag.get()
         };
         HashSet<AtomicString> set;
         for (auto& name : tagList)
index 4b9ebf8..9515305 100644 (file)
@@ -189,18 +189,18 @@ Attribute* UniqueElementData::findAttributeByName(const QualifiedName& name)
 
 const Attribute* ElementData::findLanguageAttribute() const
 {
-    ASSERT(XMLNames::langAttr.localName() == HTMLNames::langAttr.localName());
+    ASSERT(XMLNames::langAttr->localName() == HTMLNames::langAttr->localName());
 
     const Attribute* attributes = attributeBase();
     // Spec: xml:lang takes precedence over html:lang -- http://www.w3.org/TR/xhtml1/#C_7
     const Attribute* languageAttribute = nullptr;
     for (unsigned i = 0, count = length(); i < count; ++i) {
         const QualifiedName& name = attributes[i].name();
-        if (name.localName() != HTMLNames::langAttr.localName())
+        if (name.localName() != HTMLNames::langAttr->localName())
             continue;
-        if (name.namespaceURI() == XMLNames::langAttr.namespaceURI())
+        if (name.namespaceURI() == XMLNames::langAttr->namespaceURI())
             return &attributes[i];
-        if (name.namespaceURI() == HTMLNames::langAttr.namespaceURI())
+        if (name.namespaceURI() == HTMLNames::langAttr->namespaceURI())
             languageAttribute = &attributes[i];
     }
     return languageAttribute;
index 9da64bf..4bf4c0f 100755 (executable)
@@ -486,7 +486,7 @@ sub printConstructors
         if ($enabledTags{$tagName}{mapToTagName}) {
             my $mappedName = $enabledTags{$tagName}{mapToTagName};
             printConstructorSignature($F, $mappedName, $mappedName . "To" . $tagName, "tagName");
-            printConstructorInterior($F, $mappedName, $enabledTags{$mappedName}{interfaceName}, "QualifiedName(tagName.prefix(), ${mappedName}Tag.localName(), tagName.namespaceURI())");
+            printConstructorInterior($F, $mappedName, $enabledTags{$mappedName}{interfaceName}, "QualifiedName(tagName.prefix(), ${mappedName}Tag->localName(), tagName.namespaceURI())");
         }
     }
 }
@@ -716,21 +716,25 @@ sub printNamesHeaderFile
     open F, ">$headerPath";
 
     printLicenseHeader($F);
-    printHeaderHead($F, "DOM", $parameters{namespace}, '#include "QualifiedName.h"', "class $parameters{namespace}QualifiedName : public QualifiedName { };\n\n");
+    printHeaderHead($F, "DOM", $parameters{namespace}, <<END, "class $parameters{namespace}QualifiedName : public QualifiedName { };\n\n");
+#include <wtf/NeverDestroyed.h>
+#include <wtf/text/AtomicString.h>
+#include "QualifiedName.h"
+END
 
     my $lowercaseNamespacePrefix = lc($parameters{namespacePrefix});
 
     print F "// Namespace\n";
-    print F "WEBCORE_EXPORT extern const WTF::AtomicString ${lowercaseNamespacePrefix}NamespaceURI;\n\n";
+    print F "WEBCORE_EXPORT extern LazyNeverDestroyed<const WTF::AtomicString> ${lowercaseNamespacePrefix}NamespaceURI;\n\n";
 
     if (keys %allTags) {
         print F "// Tags\n";
-        printMacros($F, "WEBCORE_EXPORT extern const WebCore::$parameters{namespace}QualifiedName", "Tag", \%allTags);
+        printMacros($F, "WEBCORE_EXPORT extern LazyNeverDestroyed<const WebCore::$parameters{namespace}QualifiedName>", "Tag", \%allTags);
     }
 
     if (keys %allAttrs) {
         print F "// Attributes\n";
-        printMacros($F, "WEBCORE_EXPORT extern const WebCore::QualifiedName", "Attr", \%allAttrs);
+        printMacros($F, "WEBCORE_EXPORT extern LazyNeverDestroyed<const WebCore::QualifiedName>", "Attr", \%allAttrs);
     }
     print F "#endif\n\n";
 
@@ -759,14 +763,14 @@ sub printNamesCppFile
     
     my $lowercaseNamespacePrefix = lc($parameters{namespacePrefix});
 
-    print F "WEBCORE_EXPORT DEFINE_GLOBAL(AtomicString, ${lowercaseNamespacePrefix}NamespaceURI)\n\n";
+    print F "LazyNeverDestroyed<const AtomicString> ${lowercaseNamespacePrefix}NamespaceURI;\n\n";
 
     print F StaticString::GenerateStrings(\%allStrings);
 
     if (keys %allTags) {
         print F "// Tags\n";
         for my $name (sort keys %allTags) {
-            print F "WEBCORE_EXPORT DEFINE_GLOBAL($parameters{namespace}QualifiedName, ", $name, "Tag)\n";
+            print F "WEBCORE_EXPORT LazyNeverDestroyed<const $parameters{namespace}QualifiedName> ${name}Tag;\n";
         }
         
         print F "\n\nconst WebCore::$parameters{namespace}QualifiedName* const* get$parameters{namespace}Tags()\n";
@@ -782,7 +786,7 @@ sub printNamesCppFile
     if (keys %allAttrs) {
         print F "\n// Attributes\n";
         for my $name (sort keys %allAttrs) {
-            print F "WEBCORE_EXPORT DEFINE_GLOBAL(QualifiedName, ", $name, "Attr)\n";
+            print F "WEBCORE_EXPORT LazyNeverDestroyed<const QualifiedName> ${name}Attr;\n";
         }
         print F "\n\nconst WebCore::QualifiedName* const* get$parameters{namespace}Attrs()\n";
         print F "{\n    static const WebCore::QualifiedName* const $parameters{namespace}Attrs[] = {\n";
@@ -799,7 +803,7 @@ sub printNamesCppFile
     print(F "    AtomicString ${lowercaseNamespacePrefix}NS(\"$parameters{namespaceURI}\", AtomicString::ConstructFromLiteral);\n\n");
 
     print(F "    // Namespace\n");
-    print(F "    new (NotNull, (void*)&${lowercaseNamespacePrefix}NamespaceURI) AtomicString(${lowercaseNamespacePrefix}NS);\n");
+    print(F "    ${lowercaseNamespacePrefix}NamespaceURI.construct(${lowercaseNamespacePrefix}NS);\n");
     print(F "\n");
     print F StaticString::GenerateStringAsserts(\%allStrings);
 
@@ -899,31 +903,28 @@ sub printDefinitions
     my $shortCamelType = ucfirst(substr(substr($type, 0, -1), 0, 4));
     my $capitalizedType = ucfirst($type);
     
-print F <<END
+print F <<END;
 
     struct ${capitalizedType}TableEntry {
-        void* targetAddress;
+        LazyNeverDestroyed<const QualifiedName>* targetAddress;
         const StaticStringImpl& name;
     };
 
     static const ${capitalizedType}TableEntry ${type}Table[] = {
 END
-;
+
+    my $cast = $type eq "tags" ? "(LazyNeverDestroyed<const QualifiedName>*)" : "";
     for my $name (sort keys %$namesRef) {
-        print F "        { (void*)&$name$shortCamelType, *(&${name}Data) },\n";
+        print F "        { $cast&$name$shortCamelType, *(&${name}Data) },\n";
     }
 
-print F <<END
+print F <<END;
     };
 
     for (auto& entry : ${type}Table)
+        entry.targetAddress->construct(nullAtom(), AtomicString(&entry.name), $namespaceURI);
 END
-;
-    if ($namespaceURI eq "nullAtom()") {
-        print F "        createQualifiedName(entry.targetAddress, &entry.name);\n";
-    } else {
-        print F "        createQualifiedName(entry.targetAddress, &entry.name, $namespaceURI);\n";
-    }
+
 }
 
 ## ElementFactory routines
index e6e4475..b833a38 100644 (file)
@@ -102,7 +102,7 @@ Ref<JSC::DOMJIT::CallDOMGetterSnippet> compileDocumentBodyAttribute()
         // We ensured that the name of the given element is HTML qualified.
         // It allows us to perform local name comparison!
         loadLocalName(jit, scratch1, scratch2);
-        nullCases.append(jit.branchPtr(CCallHelpers::NotEqual, scratch2, CCallHelpers::TrustedImmPtr(HTMLNames::htmlTag.localName().impl())));
+        nullCases.append(jit.branchPtr(CCallHelpers::NotEqual, scratch2, CCallHelpers::TrustedImmPtr(HTMLNames::htmlTag->localName().impl())));
 
         RELEASE_ASSERT(!CAST_OFFSET(Node*, ContainerNode*));
         RELEASE_ASSERT(!CAST_OFFSET(Node*, Element*));
@@ -120,8 +120,8 @@ Ref<JSC::DOMJIT::CallDOMGetterSnippet> compileDocumentBodyAttribute()
         // We ensured that the name of the given element is HTML qualified.
         // It allows us to perform local name comparison!
         loadLocalName(jit, scratch1, scratch2);
-        successCases.append(jit.branchPtr(CCallHelpers::Equal, scratch2, CCallHelpers::TrustedImmPtr(HTMLNames::bodyTag.localName().impl())));
-        successCases.append(jit.branchPtr(CCallHelpers::Equal, scratch2, CCallHelpers::TrustedImmPtr(HTMLNames::framesetTag.localName().impl())));
+        successCases.append(jit.branchPtr(CCallHelpers::Equal, scratch2, CCallHelpers::TrustedImmPtr(HTMLNames::bodyTag->localName().impl())));
+        successCases.append(jit.branchPtr(CCallHelpers::Equal, scratch2, CCallHelpers::TrustedImmPtr(HTMLNames::framesetTag->localName().impl())));
 
         notHTMLElementCase.link(&jit);
         jit.loadPtr(CCallHelpers::Address(scratch1, Node::nextSiblingMemoryOffset()), scratch1);
index e463dfc..22116a0 100644 (file)
@@ -3206,7 +3206,7 @@ void Editor::textDidChangeInTextArea(Element* e)
 
 void Editor::applyEditingStyleToBodyElement() const
 {
-    auto collection = document().getElementsByTagName(HTMLNames::bodyTag.localName());
+    auto collection = document().getElementsByTagName(HTMLNames::bodyTag->localName());
     unsigned length = collection->length();
     for (unsigned i = 0; i < length; ++i)
         applyEditingStyleToElement(collection->item(i));
index 355011e..f341605 100644 (file)
@@ -1450,9 +1450,9 @@ static String valueDefaultParagraphSeparator(Frame& frame, Event*)
 {
     switch (frame.editor().defaultParagraphSeparator()) {
     case EditorParagraphSeparatorIsDiv:
-        return divTag.localName();
+        return divTag->localName();
     case EditorParagraphSeparatorIsP:
-        return pTag.localName();
+        return pTag->localName();
     }
 
     ASSERT_NOT_REACHED();
index 19d254d..6bbbeb7 100644 (file)
@@ -147,8 +147,8 @@ void MarkupAccumulator::serializeNodesWithNamespaces(Node& targetNode, EChildren
         namespaceHash = *namespaces;
     else if (inXMLFragmentSerialization()) {
         // Make sure xml prefix and namespace are always known to uphold the constraints listed at http://www.w3.org/TR/xml-names11/#xmlReserved.
-        namespaceHash.set(xmlAtom().impl(), XMLNames::xmlNamespaceURI.impl());
-        namespaceHash.set(XMLNames::xmlNamespaceURI.impl(), xmlAtom().impl());
+        namespaceHash.set(xmlAtom().impl(), XMLNames::xmlNamespaceURI->impl());
+        namespaceHash.set(XMLNames::xmlNamespaceURI->impl(), xmlAtom().impl());
     }
 
     if (!childrenOnly)
@@ -302,7 +302,7 @@ void MarkupAccumulator::appendNamespace(StringBuilder& result, const AtomicStrin
         if (inXMLFragmentSerialization() && !prefix.isEmpty())
             namespaces.set(namespaceURI.impl(), pre);
         // Make sure xml prefix and namespace are always known to uphold the constraints listed at http://www.w3.org/TR/xml-names11/#xmlReserved.
-        if (namespaceURI.impl() == XMLNames::xmlNamespaceURI.impl())
+        if (namespaceURI.impl() == XMLNames::xmlNamespaceURI->impl())
             return;
         result.append(' ');
         result.append(xmlnsAtom().string());
@@ -598,8 +598,9 @@ bool MarkupAccumulator::elementCannotHaveEndTag(const Node& node)
     // If current node is an area, base, basefont, bgsound, br, col, embed, frame, hr, img,
     // input, keygen, link, meta, param, source, track or wbr element, then continue on to
     // the next child node at this point.
-    static const HTMLQualifiedName* tags[] = { &areaTag, &baseTag, &basefontTag, &bgsoundTag, &brTag, &colTag, &embedTag,
-        &frameTag, &hrTag, &imgTag, &inputTag, &keygenTag, &linkTag, &metaTag, &paramTag, &sourceTag, &trackTag, &wbrTag };
+    static const HTMLQualifiedName* tags[] = { &areaTag.get(), &baseTag.get(), &basefontTag.get(), &bgsoundTag.get(),
+        &brTag.get(), &colTag.get(), &embedTag.get(), &frameTag.get(), &hrTag.get(), &imgTag.get(), &inputTag.get(),
+        &keygenTag.get(), &linkTag.get(), &metaTag.get(), &paramTag.get(), &sourceTag.get(), &trackTag.get(), &wbrTag.get() };
     auto& element = downcast<HTMLElement>(node);
     for (auto* tag : tags) {
         if (element.hasTagName(*tag))
index c427f12..93a8db0 100644 (file)
@@ -568,54 +568,54 @@ static bool isProhibitedParagraphChild(const AtomicString& name)
     // https://dvcs.w3.org/hg/editing/raw-file/57abe6d3cb60/editing.html#prohibited-paragraph-child
     static const auto localNames = makeNeverDestroyed([] {
         static const HTMLQualifiedName* const tags[] = {
-            &addressTag,
-            &articleTag,
-            &asideTag,
-            &blockquoteTag,
-            &captionTag,
-            &centerTag,
-            &colTag,
-            &colgroupTag,
-            &ddTag,
-            &detailsTag,
-            &dirTag,
-            &divTag,
-            &dlTag,
-            &dtTag,
-            &fieldsetTag,
-            &figcaptionTag,
-            &figureTag,
-            &footerTag,
-            &formTag,
-            &h1Tag,
-            &h2Tag,
-            &h3Tag,
-            &h4Tag,
-            &h5Tag,
-            &h6Tag,
-            &headerTag,
-            &hgroupTag,
-            &hrTag,
-            &liTag,
-            &listingTag,
-            &mainTag, // Missing in the specification.
-            &menuTag,
-            &navTag,
-            &olTag,
-            &pTag,
-            &plaintextTag,
-            &preTag,
-            &sectionTag,
-            &summaryTag,
-            &tableTag,
-            &tbodyTag,
-            &tdTag,
-            &tfootTag,
-            &thTag,
-            &theadTag,
-            &trTag,
-            &ulTag,
-            &xmpTag,
+            &addressTag.get(),
+            &articleTag.get(),
+            &asideTag.get(),
+            &blockquoteTag.get(),
+            &captionTag.get(),
+            &centerTag.get(),
+            &colTag.get(),
+            &colgroupTag.get(),
+            &ddTag.get(),
+            &detailsTag.get(),
+            &dirTag.get(),
+            &divTag.get(),
+            &dlTag.get(),
+            &dtTag.get(),
+            &fieldsetTag.get(),
+            &figcaptionTag.get(),
+            &figureTag.get(),
+            &footerTag.get(),
+            &formTag.get(),
+            &h1Tag.get(),
+            &h2Tag.get(),
+            &h3Tag.get(),
+            &h4Tag.get(),
+            &h5Tag.get(),
+            &h6Tag.get(),
+            &headerTag.get(),
+            &hgroupTag.get(),
+            &hrTag.get(),
+            &liTag.get(),
+            &listingTag.get(),
+            &mainTag.get(), // Missing in the specification.
+            &menuTag.get(),
+            &navTag.get(),
+            &olTag.get(),
+            &pTag.get(),
+            &plaintextTag.get(),
+            &preTag.get(),
+            &sectionTag.get(),
+            &summaryTag.get(),
+            &tableTag.get(),
+            &tbodyTag.get(),
+            &tdTag.get(),
+            &tfootTag.get(),
+            &thTag.get(),
+            &theadTag.get(),
+            &trTag.get(),
+            &ulTag.get(),
+            &xmpTag.get(),
         };
         HashSet<AtomicString> set;
         for (auto& tag : tags)
index 404eebd..2ee51ec 100644 (file)
@@ -104,34 +104,34 @@ void HTMLBodyElement::collectStyleForPresentationAttribute(const QualifiedName&
 HTMLElement::EventHandlerNameMap HTMLBodyElement::createWindowEventHandlerNameMap()
 {
     static const QualifiedName* const table[] = {
-        &onbeforeunloadAttr,
-        &onblurAttr,
-        &onerrorAttr,
-        &onfocusAttr,
-        &onfocusinAttr,
-        &onfocusoutAttr,
-        &onhashchangeAttr,
-        &onlanguagechangeAttr,
-        &onloadAttr,
-        &onmessageAttr,
-        &onofflineAttr,
-        &ononlineAttr,
-        &onorientationchangeAttr,
-        &onpagehideAttr,
-        &onpageshowAttr,
-        &onpopstateAttr,
-        &onresizeAttr,
-        &onscrollAttr,
-        &onstorageAttr,
-        &onunloadAttr,
-        &onwebkitmouseforcechangedAttr,
-        &onwebkitmouseforcedownAttr,
-        &onwebkitmouseforceupAttr,
-        &onwebkitmouseforcewillbeginAttr,
-        &onwebkitwillrevealbottomAttr,
-        &onwebkitwillrevealleftAttr,
-        &onwebkitwillrevealrightAttr,
-        &onwebkitwillrevealtopAttr,
+        &onbeforeunloadAttr.get(),
+        &onblurAttr.get(),
+        &onerrorAttr.get(),
+        &onfocusAttr.get(),
+        &onfocusinAttr.get(),
+        &onfocusoutAttr.get(),
+        &onhashchangeAttr.get(),
+        &onlanguagechangeAttr.get(),
+        &onloadAttr.get(),
+        &onmessageAttr.get(),
+        &onofflineAttr.get(),
+        &ononlineAttr.get(),
+        &onorientationchangeAttr.get(),
+        &onpagehideAttr.get(),
+        &onpageshowAttr.get(),
+        &onpopstateAttr.get(),
+        &onresizeAttr.get(),
+        &onscrollAttr.get(),
+        &onstorageAttr.get(),
+        &onunloadAttr.get(),
+        &onwebkitmouseforcechangedAttr.get(),
+        &onwebkitmouseforcedownAttr.get(),
+        &onwebkitmouseforceupAttr.get(),
+        &onwebkitmouseforcewillbeginAttr.get(),
+        &onwebkitwillrevealbottomAttr.get(),
+        &onwebkitwillrevealleftAttr.get(),
+        &onwebkitwillrevealrightAttr.get(),
+        &onwebkitwillrevealtopAttr.get(),
     };
 
     EventHandlerNameMap map;
index 965e6de..4629d91 100644 (file)
@@ -177,51 +177,51 @@ bool HTMLDocument::isCaseSensitiveAttribute(const QualifiedName& attributeName)
         // This is the list of attributes in HTML 4.01 with values marked as "[CI]" or case-insensitive
         // Mozilla treats all other values as case-sensitive, thus so do we.
         static const QualifiedName* const names[] = {
-            &accept_charsetAttr,
-            &acceptAttr,
-            &alignAttr,
-            &alinkAttr,
-            &axisAttr,
-            &bgcolorAttr,
-            &charsetAttr,
-            &checkedAttr,
-            &clearAttr,
-            &codetypeAttr,
-            &colorAttr,
-            &compactAttr,
-            &declareAttr,
-            &deferAttr,
-            &dirAttr,
-            &disabledAttr,
-            &enctypeAttr,
-            &faceAttr,
-            &frameAttr,
-            &hreflangAttr,
-            &http_equivAttr,
-            &langAttr,
-            &languageAttr,
-            &linkAttr,
-            &mediaAttr,
-            &methodAttr,
-            &multipleAttr,
-            &nohrefAttr,
-            &noresizeAttr,
-            &noshadeAttr,
-            &nowrapAttr,
-            &readonlyAttr,
-            &relAttr,
-            &revAttr,
-            &rulesAttr,
-            &scopeAttr,
-            &scrollingAttr,
-            &selectedAttr,
-            &shapeAttr,
-            &targetAttr,
-            &textAttr,
-            &typeAttr,
-            &valignAttr,
-            &valuetypeAttr,
-            &vlinkAttr,
+            &accept_charsetAttr.get(),
+            &acceptAttr.get(),
+            &alignAttr.get(),
+            &alinkAttr.get(),
+            &axisAttr.get(),
+            &bgcolorAttr.get(),
+            &charsetAttr.get(),
+            &checkedAttr.get(),
+            &clearAttr.get(),
+            &codetypeAttr.get(),
+            &colorAttr.get(),
+            &compactAttr.get(),
+            &declareAttr.get(),
+            &deferAttr.get(),
+            &dirAttr.get(),
+            &disabledAttr.get(),
+            &enctypeAttr.get(),
+            &faceAttr.get(),
+            &frameAttr.get(),
+            &hreflangAttr.get(),
+            &http_equivAttr.get(),
+            &langAttr.get(),
+            &languageAttr.get(),
+            &linkAttr.get(),
+            &mediaAttr.get(),
+            &methodAttr.get(),
+            &multipleAttr.get(),
+            &nohrefAttr.get(),
+            &noresizeAttr.get(),
+            &noshadeAttr.get(),
+            &nowrapAttr.get(),
+            &readonlyAttr.get(),
+            &relAttr.get(),
+            &revAttr.get(),
+            &rulesAttr.get(),
+            &scopeAttr.get(),
+            &scrollingAttr.get(),
+            &selectedAttr.get(),
+            &shapeAttr.get(),
+            &targetAttr.get(),
+            &textAttr.get(),
+            &typeAttr.get(),
+            &valignAttr.get(),
+            &valuetypeAttr.get(),
+            &vlinkAttr.get(),
         };
         HashSet<AtomicString> set;
         for (auto* name : names)
index ea581c4..a4d431e 100644 (file)
@@ -222,107 +222,107 @@ HTMLElement::EventHandlerNameMap HTMLElement::createEventHandlerNameMap()
     EventHandlerNameMap map;
 
     static const QualifiedName* const table[] = {
-        &onabortAttr,
-        &onanimationendAttr,
-        &onanimationiterationAttr,
-        &onanimationstartAttr,
-        &onautocompleteAttr,
-        &onautocompleteerrorAttr,
-        &onbeforecopyAttr,
-        &onbeforecutAttr,
-        &onbeforeinputAttr,
-        &onbeforeloadAttr,
-        &onbeforepasteAttr,
-        &onblurAttr,
-        &oncanplayAttr,
-        &oncanplaythroughAttr,
-        &onchangeAttr,
-        &onclickAttr,
-        &oncontextmenuAttr,
-        &oncopyAttr,
-        &oncutAttr,
-        &ondblclickAttr,
-        &ondragAttr,
-        &ondragendAttr,
-        &ondragenterAttr,
-        &ondragleaveAttr,
-        &ondragoverAttr,
-        &ondragstartAttr,
-        &ondropAttr,
-        &ondurationchangeAttr,
-        &onemptiedAttr,
-        &onendedAttr,
-        &onerrorAttr,
-        &onfocusAttr,
-        &onfocusinAttr,
-        &onfocusoutAttr,
-        &ongesturechangeAttr,
-        &ongestureendAttr,
-        &ongesturestartAttr,
-        &oninputAttr,
-        &oninvalidAttr,
-        &onkeydownAttr,
-        &onkeypressAttr,
-        &onkeyupAttr,
-        &onloadAttr,
-        &onloadeddataAttr,
-        &onloadedmetadataAttr,
-        &onloadstartAttr,
-        &onmousedownAttr,
-        &onmouseenterAttr,
-        &onmouseleaveAttr,
-        &onmousemoveAttr,
-        &onmouseoutAttr,
-        &onmouseoverAttr,
-        &onmouseupAttr,
-        &onmousewheelAttr,
-        &onpasteAttr,
-        &onpauseAttr,
-        &onplayAttr,
-        &onplayingAttr,
-        &onprogressAttr,
-        &onratechangeAttr,
-        &onresetAttr,
-        &onresizeAttr,
-        &onscrollAttr,
-        &onsearchAttr,
-        &onseekedAttr,
-        &onseekingAttr,
-        &onselectAttr,
-        &onselectstartAttr,
-        &onstalledAttr,
-        &onsubmitAttr,
-        &onsuspendAttr,
-        &ontimeupdateAttr,
-        &ontoggleAttr,
-        &ontouchcancelAttr,
-        &ontouchendAttr,
-        &ontouchforcechangeAttr,
-        &ontouchmoveAttr,
-        &ontouchstartAttr,
-        &ontransitionendAttr,
-        &onvolumechangeAttr,
-        &onwaitingAttr,
-        &onwebkitbeginfullscreenAttr,
-        &onwebkitcurrentplaybacktargetiswirelesschangedAttr,
-        &onwebkitendfullscreenAttr,
-        &onwebkitfullscreenchangeAttr,
-        &onwebkitfullscreenerrorAttr,
-        &onwebkitkeyaddedAttr,
-        &onwebkitkeyerrorAttr,
-        &onwebkitkeymessageAttr,
-        &onwebkitmouseforcechangedAttr,
-        &onwebkitmouseforcedownAttr,
-        &onwebkitmouseforcewillbeginAttr,
-        &onwebkitmouseforceupAttr,
-        &onwebkitneedkeyAttr,
-        &onwebkitplaybacktargetavailabilitychangedAttr,
-        &onwebkitpresentationmodechangedAttr,
-        &onwebkitwillrevealbottomAttr,
-        &onwebkitwillrevealleftAttr,
-        &onwebkitwillrevealrightAttr,
-        &onwebkitwillrevealtopAttr,
-        &onwheelAttr,
+        &onabortAttr.get(),
+        &onanimationendAttr.get(),
+        &onanimationiterationAttr.get(),
+        &onanimationstartAttr.get(),
+        &onautocompleteAttr.get(),
+        &onautocompleteerrorAttr.get(),
+        &onbeforecopyAttr.get(),
+        &onbeforecutAttr.get(),
+        &onbeforeinputAttr.get(),
+        &onbeforeloadAttr.get(),
+        &onbeforepasteAttr.get(),
+        &onblurAttr.get(),
+        &oncanplayAttr.get(),
+        &oncanplaythroughAttr.get(),
+        &onchangeAttr.get(),
+        &onclickAttr.get(),
+        &oncontextmenuAttr.get(),
+        &oncopyAttr.get(),
+        &oncutAttr.get(),
+        &ondblclickAttr.get(),
+        &ondragAttr.get(),
+        &ondragendAttr.get(),
+        &ondragenterAttr.get(),
+        &ondragleaveAttr.get(),
+        &ondragoverAttr.get(),
+        &ondragstartAttr.get(),
+        &ondropAttr.get(),
+        &ondurationchangeAttr.get(),
+        &onemptiedAttr.get(),
+        &onendedAttr.get(),
+        &onerrorAttr.get(),
+        &onfocusAttr.get(),
+        &onfocusinAttr.get(),
+        &onfocusoutAttr.get(),
+        &ongesturechangeAttr.get(),
+        &ongestureendAttr.get(),
+        &ongesturestartAttr.get(),
+        &oninputAttr.get(),
+        &oninvalidAttr.get(),
+        &onkeydownAttr.get(),
+        &onkeypressAttr.get(),
+        &onkeyupAttr.get(),
+        &onloadAttr.get(),
+        &onloadeddataAttr.get(),
+        &onloadedmetadataAttr.get(),
+        &onloadstartAttr.get(),
+        &onmousedownAttr.get(),
+        &onmouseenterAttr.get(),
+        &onmouseleaveAttr.get(),
+        &onmousemoveAttr.get(),
+        &onmouseoutAttr.get(),
+        &onmouseoverAttr.get(),
+        &onmouseupAttr.get(),
+        &onmousewheelAttr.get(),
+        &onpasteAttr.get(),
+        &onpauseAttr.get(),
+        &onplayAttr.get(),
+        &onplayingAttr.get(),
+        &onprogressAttr.get(),
+        &onratechangeAttr.get(),
+        &onresetAttr.get(),
+        &onresizeAttr.get(),
+        &onscrollAttr.get(),
+        &onsearchAttr.get(),
+        &onseekedAttr.get(),
+        &onseekingAttr.get(),
+        &onselectAttr.get(),
+        &onselectstartAttr.get(),
+        &onstalledAttr.get(),
+        &onsubmitAttr.get(),
+        &onsuspendAttr.get(),
+        &ontimeupdateAttr.get(),
+        &ontoggleAttr.get(),
+        &ontouchcancelAttr.get(),
+        &ontouchendAttr.get(),
+        &ontouchforcechangeAttr.get(),
+        &ontouchmoveAttr.get(),
+        &ontouchstartAttr.get(),
+        &ontransitionendAttr.get(),
+        &onvolumechangeAttr.get(),
+        &onwaitingAttr.get(),
+        &onwebkitbeginfullscreenAttr.get(),
+        &onwebkitcurrentplaybacktargetiswirelesschangedAttr.get(),
+        &onwebkitendfullscreenAttr.get(),
+        &onwebkitfullscreenchangeAttr.get(),
+        &onwebkitfullscreenerrorAttr.get(),
+        &onwebkitkeyaddedAttr.get(),
+        &onwebkitkeyerrorAttr.get(),
+        &onwebkitkeymessageAttr.get(),
+        &onwebkitmouseforcechangedAttr.get(),
+        &onwebkitmouseforcedownAttr.get(),
+        &onwebkitmouseforcewillbeginAttr.get(),
+        &onwebkitmouseforceupAttr.get(),
+        &onwebkitneedkeyAttr.get(),
+        &onwebkitplaybacktargetavailabilitychangedAttr.get(),
+        &onwebkitpresentationmodechangedAttr.get(),
+        &onwebkitwillrevealbottomAttr.get(),
+        &onwebkitwillrevealleftAttr.get(),
+        &onwebkitwillrevealrightAttr.get(),
+        &onwebkitwillrevealtopAttr.get(),
+        &onwheelAttr.get(),
     };
 
     populateEventHandlerNameMap(map, table);
index fdd28c5..57f74de 100644 (file)
@@ -756,13 +756,13 @@ void HTMLConstructionSite::generateImpliedEndTags()
 void HTMLConstructionSite::findFosterSite(HTMLConstructionSiteTask& task)
 {
     // When a node is to be foster parented, the last template element with no table element is below it in the stack of open elements is the foster parent element (NOT the template's parent!)
-    auto* lastTemplateElement = m_openElements.topmost(templateTag.localName());
+    auto* lastTemplateElement = m_openElements.topmost(templateTag->localName());
     if (lastTemplateElement && !m_openElements.inTableScope(tableTag)) {
         task.parent = &lastTemplateElement->element();
         return;
     }
 
-    if (auto* lastTableElementRecord = m_openElements.topmost(tableTag.localName())) {
+    if (auto* lastTableElementRecord = m_openElements.topmost(tableTag->localName())) {
         auto& lastTableElement = lastTableElementRecord->element();
         auto* parent = lastTableElement.parentNode();
         // When parsing HTML fragments, we skip step 4.2 ("Let root be a new html element with no attributes") for efficiency,
index 09957d2..9ea63bc 100644 (file)
@@ -502,7 +502,7 @@ bool HTMLElementStack::inSelectScope(const QualifiedName& tagName) const
 
 bool HTMLElementStack::hasTemplateInHTMLScope() const
 {
-    return inScopeCommon<isRootNode>(m_top.get(), templateTag.localName());
+    return inScopeCommon<isRootNode>(m_top.get(), templateTag->localName());
 }
 
 Element& HTMLElementStack::htmlElement() const
index 08d28cd..c3ba9ec 100644 (file)
@@ -427,7 +427,7 @@ void TokenPreloadScanner::scan(const HTMLToken& token, Vector<std::unique_ptr<Pr
 void TokenPreloadScanner::updatePredictedBaseURL(const HTMLToken& token)
 {
     ASSERT(m_predictedBaseElementURL.isEmpty());
-    if (auto* hrefAttribute = findAttribute(token.attributes(), hrefAttr.localName().string()))
+    if (auto* hrefAttribute = findAttribute(token.attributes(), hrefAttr->localName().string()))
         m_predictedBaseElementURL = URL(m_documentURL, stripLeadingAndTrailingHTMLSpaces(StringImpl::create8BitIfPossible(hrefAttribute->value))).isolatedCopy();
 }
 
index 15b2e41..b10a4c4 100644 (file)
@@ -440,9 +440,9 @@ void HTMLTreeBuilder::processFakeCharacters(const String& characters)
 
 void HTMLTreeBuilder::processFakePEndTagIfPInButtonScope()
 {
-    if (!m_tree.openElements().inButtonScope(pTag.localName()))
+    if (!m_tree.openElements().inButtonScope(pTag->localName()))
         return;
-    AtomicHTMLToken endP(HTMLToken::EndTag, pTag.localName());
+    AtomicHTMLToken endP(HTMLToken::EndTag, pTag->localName());
     processEndTag(WTFMove(endP));
 }
 
@@ -683,7 +683,7 @@ void HTMLTreeBuilder::processStartTagForInBody(AtomicHTMLToken&& token)
         return;
     }
     if (token.name() == aTag) {
-        RefPtr<Element> activeATag = m_tree.activeFormattingElements().closestElementInScopeWithName(aTag.localName());
+        RefPtr<Element> activeATag = m_tree.activeFormattingElements().closestElementInScopeWithName(aTag->localName());
         if (activeATag) {
             parseError(token);
             processFakeEndTag(aTag);
@@ -732,7 +732,7 @@ void HTMLTreeBuilder::processStartTagForInBody(AtomicHTMLToken&& token)
     if (token.name() == imageTag) {
         parseError(token);
         // Apparently we're not supposed to ask.
-        token.setName(imgTag.localName());
+        token.setName(imgTag->localName());
         // Note the fall through to the imgTag handling below!
     }
     if (token.name() == areaTag
@@ -811,7 +811,7 @@ void HTMLTreeBuilder::processStartTagForInBody(AtomicHTMLToken&& token)
     }
     if (token.name() == optgroupTag || token.name() == optionTag) {
         if (is<HTMLOptionElement>(m_tree.currentStackItem().node())) {
-            AtomicHTMLToken endOption(HTMLToken::EndTag, optionTag.localName());
+            AtomicHTMLToken endOption(HTMLToken::EndTag, optionTag->localName());
             processEndTag(WTFMove(endOption));
         }
         m_tree.reconstructTheActiveFormattingElements();
@@ -819,7 +819,7 @@ void HTMLTreeBuilder::processStartTagForInBody(AtomicHTMLToken&& token)
         return;
     }
     if (token.name() == rbTag || token.name() == rtcTag) {
-        if (m_tree.openElements().inScope(rubyTag.localName())) {
+        if (m_tree.openElements().inScope(rubyTag->localName())) {
             m_tree.generateImpliedEndTags();
             if (!m_tree.currentStackItem().hasTagName(rubyTag))
                 parseError(token);
@@ -828,22 +828,22 @@ void HTMLTreeBuilder::processStartTagForInBody(AtomicHTMLToken&& token)
         return;
     }
     if (token.name() == rtTag || token.name() == rpTag) {
-        if (m_tree.openElements().inScope(rubyTag.localName())) {
-            m_tree.generateImpliedEndTagsWithExclusion(rtcTag.localName());
+        if (m_tree.openElements().inScope(rubyTag->localName())) {
+            m_tree.generateImpliedEndTagsWithExclusion(rtcTag->localName());
             if (!m_tree.currentStackItem().hasTagName(rubyTag) && !m_tree.currentStackItem().hasTagName(rtcTag))
                 parseError(token);
         }
         m_tree.insertHTMLElement(WTFMove(token));
         return;
     }
-    if (token.name() == MathMLNames::mathTag.localName()) {
+    if (token.name() == MathMLNames::mathTag->localName()) {
         m_tree.reconstructTheActiveFormattingElements();
         adjustMathMLAttributes(token);
         adjustForeignAttributes(token);
         m_tree.insertForeignElement(WTFMove(token), MathMLNames::mathmlNamespaceURI);
         return;
     }
-    if (token.name() == SVGNames::svgTag.localName()) {
+    if (token.name() == SVGNames::svgTag->localName()) {
         m_tree.reconstructTheActiveFormattingElements();
         adjustSVGAttributes(token);
         adjustForeignAttributes(token);
@@ -888,7 +888,7 @@ void HTMLTreeBuilder::processTemplateStartTag(AtomicHTMLToken&& token)
 
 bool HTMLTreeBuilder::processTemplateEndTag(AtomicHTMLToken&& token)
 {
-    ASSERT(token.name() == templateTag.localName());
+    ASSERT(token.name() == templateTag->localName());
     if (!m_tree.openElements().hasTemplateInHTMLScope()) {
         ASSERT(m_templateInsertionModes.isEmpty() || (m_templateInsertionModes.size() == 1 && m_fragmentContext.contextElement().hasTagName(templateTag)));
         parseError(token);
@@ -906,7 +906,7 @@ bool HTMLTreeBuilder::processTemplateEndTag(AtomicHTMLToken&& token)
 
 bool HTMLTreeBuilder::processEndOfFileForInTemplateContents(AtomicHTMLToken&& token)
 {
-    AtomicHTMLToken endTemplate(HTMLToken::EndTag, templateTag.localName());
+    AtomicHTMLToken endTemplate(HTMLToken::EndTag, templateTag->localName());
     if (!processTemplateEndTag(WTFMove(endTemplate)))
         return false;
 
@@ -1267,7 +1267,7 @@ void HTMLTreeBuilder::processStartTag(AtomicHTMLToken&& token)
             || token.name() == trTag
             || isTableCellContextTag(token.name())) {
             parseError(token);
-            AtomicHTMLToken endSelect(HTMLToken::EndTag, selectTag.localName());
+            AtomicHTMLToken endSelect(HTMLToken::EndTag, selectTag->localName());
             processEndTag(WTFMove(endSelect));
             processStartTag(WTFMove(token));
             return;
@@ -1280,7 +1280,7 @@ void HTMLTreeBuilder::processStartTag(AtomicHTMLToken&& token)
         }
         if (token.name() == optionTag) {
             if (is<HTMLOptionElement>(m_tree.currentStackItem().node())) {
-                AtomicHTMLToken endOption(HTMLToken::EndTag, optionTag.localName());
+                AtomicHTMLToken endOption(HTMLToken::EndTag, optionTag->localName());
                 processEndTag(WTFMove(endOption));
             }
             m_tree.insertHTMLElement(WTFMove(token));
@@ -1288,11 +1288,11 @@ void HTMLTreeBuilder::processStartTag(AtomicHTMLToken&& token)
         }
         if (token.name() == optgroupTag) {
             if (is<HTMLOptionElement>(m_tree.currentStackItem().node())) {
-                AtomicHTMLToken endOption(HTMLToken::EndTag, optionTag.localName());
+                AtomicHTMLToken endOption(HTMLToken::EndTag, optionTag->localName());
                 processEndTag(WTFMove(endOption));
             }
             if (is<HTMLOptGroupElement>(m_tree.currentStackItem().node())) {
-                AtomicHTMLToken endOptgroup(HTMLToken::EndTag, optgroupTag.localName());
+                AtomicHTMLToken endOptgroup(HTMLToken::EndTag, optgroupTag->localName());
                 processEndTag(WTFMove(endOptgroup));
             }
             m_tree.insertHTMLElement(WTFMove(token));
@@ -1300,7 +1300,7 @@ void HTMLTreeBuilder::processStartTag(AtomicHTMLToken&& token)
         }
         if (token.name() == selectTag) {
             parseError(token);
-            AtomicHTMLToken endSelect(HTMLToken::EndTag, selectTag.localName());
+            AtomicHTMLToken endSelect(HTMLToken::EndTag, selectTag->localName());
             processEndTag(WTFMove(endSelect));
             return;
         }
@@ -1310,7 +1310,7 @@ void HTMLTreeBuilder::processStartTag(AtomicHTMLToken&& token)
                 ASSERT(isParsingFragment());
                 return;
             }
-            AtomicHTMLToken endSelect(HTMLToken::EndTag, selectTag.localName());
+            AtomicHTMLToken endSelect(HTMLToken::EndTag, selectTag->localName());
             processEndTag(WTFMove(endSelect));
             processStartTag(WTFMove(token));
             return;
@@ -1382,7 +1382,7 @@ bool HTMLTreeBuilder::processBodyEndTagForInBody(AtomicHTMLToken&& token)
 {
     ASSERT(token.type() == HTMLToken::EndTag);
     ASSERT(token.name() == bodyTag);
-    if (!m_tree.openElements().inScope(bodyTag.localName())) {
+    if (!m_tree.openElements().inScope(bodyTag->localName())) {
         parseError(token);
         return false;
     }
@@ -1711,7 +1711,7 @@ void HTMLTreeBuilder::processEndTagForInBody(AtomicHTMLToken&& token)
         return;
     }
     if (token.name() == htmlTag) {
-        AtomicHTMLToken endBody(HTMLToken::EndTag, bodyTag.localName());
+        AtomicHTMLToken endBody(HTMLToken::EndTag, bodyTag->localName());
         if (processBodyEndTagForInBody(WTFMove(endBody)))
             processEndTag(WTFMove(token));
         return;
@@ -1850,14 +1850,14 @@ void HTMLTreeBuilder::processEndTagForInBody(AtomicHTMLToken&& token)
 
 bool HTMLTreeBuilder::processCaptionEndTagForInCaption()
 {
-    if (!m_tree.openElements().inTableScope(captionTag.localName())) {
+    if (!m_tree.openElements().inTableScope(captionTag->localName())) {
         ASSERT(isParsingFragment());
         // FIXME: parse error
         return false;
     }
     m_tree.generateImpliedEndTags();
     // FIXME: parse error if (!m_tree.currentStackItem().hasTagName(captionTag))
-    m_tree.openElements().popUntilPopped(captionTag.localName());
+    m_tree.openElements().popUntilPopped(captionTag->localName());
     m_tree.activeFormattingElements().clearToLastMarker();
     m_insertionMode = InsertionMode::InTable;
     return true;
@@ -1884,7 +1884,7 @@ bool HTMLTreeBuilder::processTableEndTagForInTable()
         // FIXME: parse error.
         return false;
     }
-    m_tree.openElements().popUntilPopped(tableTag.localName());
+    m_tree.openElements().popUntilPopped(tableTag->localName());
     resetInsertionModeAppropriately();
     return true;
 }
@@ -2106,7 +2106,7 @@ void HTMLTreeBuilder::processEndTag(AtomicHTMLToken&& token)
             || isTableCellContextTag(token.name())) {
             parseError(token);
             if (m_tree.openElements().inTableScope(token.name())) {
-                AtomicHTMLToken endSelect(HTMLToken::EndTag, selectTag.localName());
+                AtomicHTMLToken endSelect(HTMLToken::EndTag, selectTag->localName());
                 processEndTag(WTFMove(endSelect));
                 processEndTag(WTFMove(token));
             }
@@ -2139,7 +2139,7 @@ void HTMLTreeBuilder::processEndTag(AtomicHTMLToken&& token)
                 parseError(token);
                 return;
             }
-            m_tree.openElements().popUntilPopped(selectTag.localName());
+            m_tree.openElements().popUntilPopped(selectTag->localName());
             resetInsertionModeAppropriately();
             return;
         }
@@ -2199,7 +2199,7 @@ void HTMLTreeBuilder::insertPhoneNumberLink(const String& string)
     Vector<Attribute> attributes;
     attributes.append(Attribute(HTMLNames::hrefAttr, ASCIILiteral("tel:") + string));
 
-    const AtomicString& aTagLocalName = aTag.localName();
+    const AtomicString& aTagLocalName = aTag->localName();
     AtomicHTMLToken aStartToken(HTMLToken::StartTag, aTagLocalName, WTFMove(attributes));
     AtomicHTMLToken aEndToken(HTMLToken::EndTag, aTagLocalName);
 
@@ -2537,32 +2537,32 @@ void HTMLTreeBuilder::defaultForInitial()
 
 void HTMLTreeBuilder::defaultForBeforeHTML()
 {
-    AtomicHTMLToken startHTML(HTMLToken::StartTag, htmlTag.localName());
+    AtomicHTMLToken startHTML(HTMLToken::StartTag, htmlTag->localName());
     m_tree.insertHTMLHtmlStartTagBeforeHTML(WTFMove(startHTML));
     m_insertionMode = InsertionMode::BeforeHead;
 }
 
 void HTMLTreeBuilder::defaultForBeforeHead()
 {
-    AtomicHTMLToken startHead(HTMLToken::StartTag, headTag.localName());
+    AtomicHTMLToken startHead(HTMLToken::StartTag, headTag->localName());
     processStartTag(WTFMove(startHead));
 }
 
 void HTMLTreeBuilder::defaultForInHead()
 {
-    AtomicHTMLToken endHead(HTMLToken::EndTag, headTag.localName());
+    AtomicHTMLToken endHead(HTMLToken::EndTag, headTag->localName());
     processEndTag(WTFMove(endHead));
 }
 
 void HTMLTreeBuilder::defaultForInHeadNoscript()
 {
-    AtomicHTMLToken endNoscript(HTMLToken::EndTag, noscriptTag.localName());
+    AtomicHTMLToken endNoscript(HTMLToken::EndTag, noscriptTag->localName());
     processEndTag(WTFMove(endNoscript));
 }
 
 void HTMLTreeBuilder::defaultForAfterHead()
 {
-    AtomicHTMLToken startBody(HTMLToken::StartTag, bodyTag.localName());
+    AtomicHTMLToken startBody(HTMLToken::StartTag, bodyTag->localName());
     processStartTag(WTFMove(startBody));
     m_framesetOk = true;
 }
index f98825b..3b01d7e 100644 (file)
@@ -53,7 +53,7 @@ void TextDocumentParser::insertFakePreElement()
     // distrubing the line/column number calculations.
     Vector<Attribute> attributes;
     attributes.append(Attribute(styleAttr, "word-wrap: break-word; white-space: pre-wrap;"));
-    AtomicHTMLToken fakePre(HTMLToken::StartTag, preTag.localName(), WTFMove(attributes));
+    AtomicHTMLToken fakePre(HTMLToken::StartTag, preTag->localName(), WTFMove(attributes));
     treeBuilder().constructTree(WTFMove(fakePre));
 
     // Normally we would skip the first \n after a <pre> element, but we don't
index 9aa9e1b..5ba9281 100644 (file)
@@ -177,13 +177,13 @@ Path pathFromGraphicsElement(SVGElement* element)
     static HashMap<AtomicStringImpl*, PathFromFunction>* map = 0;
     if (!map) {
         map = new HashMap<AtomicStringImpl*, PathFromFunction>;
-        map->set(SVGNames::circleTag.localName().impl(), pathFromCircleElement);
-        map->set(SVGNames::ellipseTag.localName().impl(), pathFromEllipseElement);
-        map->set(SVGNames::lineTag.localName().impl(), pathFromLineElement);
-        map->set(SVGNames::pathTag.localName().impl(), pathFromPathElement);
-        map->set(SVGNames::polygonTag.localName().impl(), pathFromPolygonElement);
-        map->set(SVGNames::polylineTag.localName().impl(), pathFromPolylineElement);
-        map->set(SVGNames::rectTag.localName().impl(), pathFromRectElement);
+        map->set(SVGNames::circleTag->localName().impl(), pathFromCircleElement);
+        map->set(SVGNames::ellipseTag->localName().impl(), pathFromEllipseElement);
+        map->set(SVGNames::lineTag->localName().impl(), pathFromLineElement);
+        map->set(SVGNames::pathTag->localName().impl(), pathFromPathElement);
+        map->set(SVGNames::polygonTag->localName().impl(), pathFromPolygonElement);
+        map->set(SVGNames::polylineTag->localName().impl(), pathFromPolylineElement);
+        map->set(SVGNames::rectTag->localName().impl(), pathFromRectElement);
     }
 
     if (PathFromFunction pathFromFunction = map->get(element->localName().impl()))
index 8ae61c8..d8e71b7 100644 (file)
@@ -48,40 +48,40 @@ static HashSet<AtomicString>& clipperFilterMaskerTags()
     if (s_tagList.get().isEmpty()) {
         // "container elements": http://www.w3.org/TR/SVG11/intro.html#TermContainerElement
         // "graphics elements" : http://www.w3.org/TR/SVG11/intro.html#TermGraphicsElement
-        s_tagList.get().add(SVGNames::aTag.localName());
-        s_tagList.get().add(SVGNames::circleTag.localName());
-        s_tagList.get().add(SVGNames::ellipseTag.localName());
-        s_tagList.get().add(SVGNames::glyphTag.localName());
-        s_tagList.get().add(SVGNames::gTag.localName());
-        s_tagList.get().add(SVGNames::imageTag.localName());
-        s_tagList.get().add(SVGNames::lineTag.localName());
-        s_tagList.get().add(SVGNames::markerTag.localName());
-        s_tagList.get().add(SVGNames::maskTag.localName());
-        s_tagList.get().add(SVGNames::missing_glyphTag.localName());
-        s_tagList.get().add(SVGNames::pathTag.localName());
-        s_tagList.get().add(SVGNames::polygonTag.localName());
-        s_tagList.get().add(SVGNames::polylineTag.localName());
-        s_tagList.get().add(SVGNames::rectTag.localName());
-        s_tagList.get().add(SVGNames::svgTag.localName());
-        s_tagList.get().add(SVGNames::textTag.localName());
-        s_tagList.get().add(SVGNames::useTag.localName());
+        s_tagList.get().add(SVGNames::aTag->localName());
+        s_tagList.get().add(SVGNames::circleTag->localName());
+        s_tagList.get().add(SVGNames::ellipseTag->localName());
+        s_tagList.get().add(SVGNames::glyphTag->localName());
+        s_tagList.get().add(SVGNames::gTag->localName());
+        s_tagList.get().add(SVGNames::imageTag->localName());
+        s_tagList.get().add(SVGNames::lineTag->localName());
+        s_tagList.get().add(SVGNames::markerTag->localName());
+        s_tagList.get().add(SVGNames::maskTag->localName());
+        s_tagList.get().add(SVGNames::missing_glyphTag->localName());
+        s_tagList.get().add(SVGNames::pathTag->localName());
+        s_tagList.get().add(SVGNames::polygonTag->localName());
+        s_tagList.get().add(SVGNames::polylineTag->localName());
+        s_tagList.get().add(SVGNames::rectTag->localName());
+        s_tagList.get().add(SVGNames::svgTag->localName());
+        s_tagList.get().add(SVGNames::textTag->localName());
+        s_tagList.get().add(SVGNames::useTag->localName());
 
         // Not listed in the definitions is the clipPath element, the SVG spec says though:
         // The "clipPath" element or any of its children can specify property "clip-path".
         // So we have to add clipPathTag here, otherwhise clip-path on clipPath will fail.
         // (Already mailed SVG WG, waiting for a solution)
-        s_tagList.get().add(SVGNames::clipPathTag.localName());
+        s_tagList.get().add(SVGNames::clipPathTag->localName());
 
         // Not listed in the definitions are the text content elements, though filter/clipper/masker on tspan/text/.. is allowed.
         // (Already mailed SVG WG, waiting for a solution)
-        s_tagList.get().add(SVGNames::altGlyphTag.localName());
-        s_tagList.get().add(SVGNames::textPathTag.localName());
-        s_tagList.get().add(SVGNames::trefTag.localName());
-        s_tagList.get().add(SVGNames::tspanTag.localName());
+        s_tagList.get().add(SVGNames::altGlyphTag->localName());
+        s_tagList.get().add(SVGNames::textPathTag->localName());
+        s_tagList.get().add(SVGNames::trefTag->localName());
+        s_tagList.get().add(SVGNames::tspanTag->localName());
 
         // Not listed in the definitions is the foreignObject element, but clip-path
         // is a supported attribute.
-        s_tagList.get().add(SVGNames::foreignObjectTag.localName());
+        s_tagList.get().add(SVGNames::foreignObjectTag->localName());
 
         // Elements that we ignore, as it doesn't make any sense.
         // defs, pattern, switch (FIXME: Mail SVG WG about these)
@@ -95,10 +95,10 @@ static HashSet<AtomicString>& markerTags()
 {
     static NeverDestroyed<HashSet<AtomicString>> s_tagList;
     if (s_tagList.get().isEmpty()) {
-        s_tagList.get().add(SVGNames::lineTag.localName());
-        s_tagList.get().add(SVGNames::pathTag.localName());
-        s_tagList.get().add(SVGNames::polygonTag.localName());
-        s_tagList.get().add(SVGNames::polylineTag.localName());
+        s_tagList.get().add(SVGNames::lineTag->localName());
+        s_tagList.get().add(SVGNames::pathTag->localName());
+        s_tagList.get().add(SVGNames::polygonTag->localName());
+        s_tagList.get().add(SVGNames::polylineTag->localName());
     }
 
     return s_tagList;
@@ -108,18 +108,18 @@ static HashSet<AtomicString>& fillAndStrokeTags()
 {
     static NeverDestroyed<HashSet<AtomicString>> s_tagList;
     if (s_tagList.get().isEmpty()) {
-        s_tagList.get().add(SVGNames::altGlyphTag.localName());
-        s_tagList.get().add(SVGNames::circleTag.localName());
-        s_tagList.get().add(SVGNames::ellipseTag.localName());
-        s_tagList.get().add(SVGNames::lineTag.localName());
-        s_tagList.get().add(SVGNames::pathTag.localName());
-        s_tagList.get().add(SVGNames::polygonTag.localName());
-        s_tagList.get().add(SVGNames::polylineTag.localName());
-        s_tagList.get().add(SVGNames::rectTag.localName());
-        s_tagList.get().add(SVGNames::textTag.localName());
-        s_tagList.get().add(SVGNames::textPathTag.localName());
-        s_tagList.get().add(SVGNames::trefTag.localName());
-        s_tagList.get().add(SVGNames::tspanTag.localName());
+        s_tagList.get().add(SVGNames::altGlyphTag->localName());
+        s_tagList.get().add(SVGNames::circleTag->localName());
+        s_tagList.get().add(SVGNames::ellipseTag->localName());
+        s_tagList.get().add(SVGNames::lineTag->localName());
+        s_tagList.get().add(SVGNames::pathTag->localName());
+        s_tagList.get().add(SVGNames::polygonTag->localName());
+        s_tagList.get().add(SVGNames::polylineTag->localName());
+        s_tagList.get().add(SVGNames::rectTag->localName());
+        s_tagList.get().add(SVGNames::textTag->localName());
+        s_tagList.get().add(SVGNames::textPathTag->localName());
+        s_tagList.get().add(SVGNames::trefTag->localName());
+        s_tagList.get().add(SVGNames::tspanTag->localName());
     }
 
     return s_tagList;
@@ -129,10 +129,10 @@ static HashSet<AtomicString>& chainableResourceTags()
 {
     static NeverDestroyed<HashSet<AtomicString>> s_tagList;
     if (s_tagList.get().isEmpty()) {
-        s_tagList.get().add(SVGNames::linearGradientTag.localName());
-        s_tagList.get().add(SVGNames::filterTag.localName());
-        s_tagList.get().add(SVGNames::patternTag.localName());
-        s_tagList.get().add(SVGNames::radialGradientTag.localName());
+        s_tagList.get().add(SVGNames::linearGradientTag->localName());
+        s_tagList.get().add(SVGNames::filterTag->localName());
+        s_tagList.get().add(SVGNames::patternTag->localName());
+        s_tagList.get().add(SVGNames::radialGradientTag->localName());
     }
 
     return s_tagList;
index 6515a05..eddd1e7 100644 (file)
@@ -34,7 +34,7 @@ DECLARE_ANIMATED_PROPERTY(SVGAnimatedBoolean, bool, UpperProperty, LowerProperty
 DECLARE_ANIMATED_PROPERTY(SVGAnimatedBoolean, bool, UpperProperty, LowerProperty, override)
 
 #define DEFINE_ANIMATED_BOOLEAN(OwnerType, DOMAttribute, UpperProperty, LowerProperty) \
-DEFINE_ANIMATED_PROPERTY(AnimatedBoolean, OwnerType, DOMAttribute, DOMAttribute.localName(), UpperProperty, LowerProperty)
+DEFINE_ANIMATED_PROPERTY(AnimatedBoolean, OwnerType, DOMAttribute, DOMAttribute->localName(), UpperProperty, LowerProperty)
 
 class SVGAnimationElement;
 
index d6d1149..59cd19d 100644 (file)
@@ -32,7 +32,7 @@ typedef SVGAnimatedStaticPropertyTearOff<unsigned> SVGAnimatedEnumeration;
 DECLARE_ANIMATED_PROPERTY(SVGAnimatedEnumerationPropertyTearOff<EnumType>, EnumType, UpperProperty, LowerProperty, )
 
 #define DEFINE_ANIMATED_ENUMERATION(OwnerType, DOMAttribute, UpperProperty, LowerProperty, EnumType) \
-DEFINE_ANIMATED_PROPERTY(AnimatedEnumeration, OwnerType, DOMAttribute, DOMAttribute.localName(), UpperProperty, LowerProperty)
+DEFINE_ANIMATED_PROPERTY(AnimatedEnumeration, OwnerType, DOMAttribute, DOMAttribute->localName(), UpperProperty, LowerProperty)
 
 class SVGAnimatedEnumerationAnimator final : public SVGAnimatedTypeAnimator {
 public:
index a62a472..da5f441 100644 (file)
@@ -32,7 +32,7 @@ typedef SVGAnimatedStaticPropertyTearOff<int> SVGAnimatedInteger;
 DECLARE_ANIMATED_PROPERTY(SVGAnimatedInteger, int, UpperProperty, LowerProperty, )
 
 #define DEFINE_ANIMATED_INTEGER(OwnerType, DOMAttribute, UpperProperty, LowerProperty) \
-DEFINE_ANIMATED_PROPERTY(AnimatedInteger, OwnerType, DOMAttribute, DOMAttribute.localName(), UpperProperty, LowerProperty)
+DEFINE_ANIMATED_PROPERTY(AnimatedInteger, OwnerType, DOMAttribute, DOMAttribute->localName(), UpperProperty, LowerProperty)
 
 #define DEFINE_ANIMATED_INTEGER_MULTIPLE_WRAPPERS(OwnerType, DOMAttribute, SVGDOMAttributeIdentifier, UpperProperty, LowerProperty) \
 DEFINE_ANIMATED_PROPERTY(AnimatedIntegerOptionalInteger, OwnerType, DOMAttribute, SVGDOMAttributeIdentifier, UpperProperty, LowerProperty)
index 14a3460..fa4ca6e 100644 (file)
@@ -32,7 +32,7 @@ using SVGAnimatedLength = SVGAnimatedPropertyTearOff<SVGLength>;
 DECLARE_ANIMATED_PROPERTY(SVGAnimatedLength, SVGLengthValue, UpperProperty, LowerProperty, )
 
 #define DEFINE_ANIMATED_LENGTH(OwnerType, DOMAttribute, UpperProperty, LowerProperty) \
-DEFINE_ANIMATED_PROPERTY(AnimatedLength, OwnerType, DOMAttribute, DOMAttribute.localName(), UpperProperty, LowerProperty)
+DEFINE_ANIMATED_PROPERTY(AnimatedLength, OwnerType, DOMAttribute, DOMAttribute->localName(), UpperProperty, LowerProperty)
 
 class SVGAnimationElement;
 
index f3619a0..5ecf542 100644 (file)
@@ -33,7 +33,7 @@ using SVGAnimatedLengthList = SVGAnimatedListPropertyTearOff<SVGLengthListValues
 DECLARE_ANIMATED_LIST_PROPERTY(SVGAnimatedLengthList, SVGLengthListValues, UpperProperty, LowerProperty)
 
 #define DEFINE_ANIMATED_LENGTH_LIST(OwnerType, DOMAttribute, UpperProperty, LowerProperty) \
-DEFINE_ANIMATED_PROPERTY(AnimatedLengthList, OwnerType, DOMAttribute, DOMAttribute.localName(), UpperProperty, LowerProperty)
+DEFINE_ANIMATED_PROPERTY(AnimatedLengthList, OwnerType, DOMAttribute, DOMAttribute->localName(), UpperProperty, LowerProperty)
 
 class SVGAnimationElement;
 
index 55eb121..0e19d4d 100644 (file)
@@ -32,7 +32,7 @@ typedef SVGAnimatedStaticPropertyTearOff<float> SVGAnimatedNumber;
 DECLARE_ANIMATED_PROPERTY(SVGAnimatedNumber, float, UpperProperty, LowerProperty, )
 
 #define DEFINE_ANIMATED_NUMBER(OwnerType, DOMAttribute, UpperProperty, LowerProperty) \
-DEFINE_ANIMATED_PROPERTY(AnimatedNumber, OwnerType, DOMAttribute, DOMAttribute.localName(), UpperProperty, LowerProperty)
+DEFINE_ANIMATED_PROPERTY(AnimatedNumber, OwnerType, DOMAttribute, DOMAttribute->localName(), UpperProperty, LowerProperty)
 
 #define DEFINE_ANIMATED_NUMBER_MULTIPLE_WRAPPERS(OwnerType, DOMAttribute, SVGDOMAttributeIdentifier, UpperProperty, LowerProperty) \
 DEFINE_ANIMATED_PROPERTY(AnimatedNumberOptionalNumber, OwnerType, DOMAttribute, SVGDOMAttributeIdentifier, UpperProperty, LowerProperty)
index aad51a0..58025ea 100644 (file)
@@ -33,7 +33,7 @@ using SVGAnimatedNumberList = SVGAnimatedListPropertyTearOff<SVGNumberListValues
 DECLARE_ANIMATED_LIST_PROPERTY(SVGAnimatedNumberList, SVGNumberListValues, UpperProperty, LowerProperty)
 
 #define DEFINE_ANIMATED_NUMBER_LIST(OwnerType, DOMAttribute, UpperProperty, LowerProperty) \
-DEFINE_ANIMATED_PROPERTY(AnimatedNumberList, OwnerType, DOMAttribute, DOMAttribute.localName(), UpperProperty, LowerProperty)
+DEFINE_ANIMATED_PROPERTY(AnimatedNumberList, OwnerType, DOMAttribute, DOMAttribute->localName(), UpperProperty, LowerProperty)
 
 class SVGAnimationElement;
 
index 8f9e76b..fa66feb 100644 (file)
@@ -35,7 +35,7 @@ using SVGAnimatedPreserveAspectRatio = SVGAnimatedPropertyTearOff<SVGPreserveAsp
 DECLARE_ANIMATED_PROPERTY(SVGAnimatedPreserveAspectRatio, SVGPreserveAspectRatioValue, UpperProperty, LowerProperty, )
 
 #define DEFINE_ANIMATED_PRESERVEASPECTRATIO(OwnerType, DOMAttribute, UpperProperty, LowerProperty) \
-DEFINE_ANIMATED_PROPERTY(AnimatedPreserveAspectRatio, OwnerType, DOMAttribute, DOMAttribute.localName(), UpperProperty, LowerProperty)
+DEFINE_ANIMATED_PROPERTY(AnimatedPreserveAspectRatio, OwnerType, DOMAttribute, DOMAttribute->localName(), UpperProperty, LowerProperty)
 
 class SVGAnimationElement;
 
index c8fce4b..95e7386 100644 (file)
@@ -35,7 +35,7 @@ using SVGAnimatedRect = SVGAnimatedPropertyTearOff<SVGRect>;
 DECLARE_ANIMATED_PROPERTY(SVGAnimatedRect, FloatRect, UpperProperty, LowerProperty, )
 
 #define DEFINE_ANIMATED_RECT(OwnerType, DOMAttribute, UpperProperty, LowerProperty) \
-DEFINE_ANIMATED_PROPERTY(AnimatedRect, OwnerType, DOMAttribute, DOMAttribute.localName(), UpperProperty, LowerProperty)
+DEFINE_ANIMATED_PROPERTY(AnimatedRect, OwnerType, DOMAttribute, DOMAttribute->localName(), UpperProperty, LowerProperty)
 
 class SVGAnimationElement;
 
index 2c8c335..86d0422 100644 (file)
@@ -35,7 +35,7 @@ DECLARE_ANIMATED_PROPERTY(SVGAnimatedString, String, UpperProperty, LowerPropert
 DECLARE_ANIMATED_PROPERTY(SVGAnimatedString, String, UpperProperty, LowerProperty, override)
 
 #define DEFINE_ANIMATED_STRING(OwnerType, DOMAttribute, UpperProperty, LowerProperty) \
-DEFINE_ANIMATED_PROPERTY(AnimatedString, OwnerType, DOMAttribute, DOMAttribute.localName(), UpperProperty, LowerProperty)
+DEFINE_ANIMATED_PROPERTY(AnimatedString, OwnerType, DOMAttribute, DOMAttribute->localName(), UpperProperty, LowerProperty)
 
 class SVGAnimationElement;
 
index 4c9022a..e3a3a0f 100644 (file)
@@ -32,7 +32,7 @@ using SVGAnimatedTransformList = SVGAnimatedTransformListPropertyTearOff;
 DECLARE_ANIMATED_LIST_PROPERTY(SVGAnimatedTransformList, SVGTransformListValues, UpperProperty, LowerProperty)
 
 #define DEFINE_ANIMATED_TRANSFORM_LIST(OwnerType, DOMAttribute, UpperProperty, LowerProperty) \
-DEFINE_ANIMATED_PROPERTY(AnimatedTransformList, OwnerType, DOMAttribute, DOMAttribute.localName(), UpperProperty, LowerProperty)
+DEFINE_ANIMATED_PROPERTY(AnimatedTransformList, OwnerType, DOMAttribute, DOMAttribute->localName(), UpperProperty, LowerProperty)
 
 class SVGAnimationElement;
 
index cac5d3d..05a93cb 100644 (file)
@@ -142,15 +142,15 @@ bool SVGAnimationElement::isSupportedAttribute(const QualifiedName& attrName)
         SVGTests::addSupportedAttributes(set);
         SVGExternalResourcesRequired::addSupportedAttributes(set);
         set.add({
-            SVGNames::valuesAttr,
-            SVGNames::keyTimesAttr,
-            SVGNames::keyPointsAttr,
-            SVGNames::keySplinesAttr,
-            SVGNames::attributeTypeAttr,
-            SVGNames::calcModeAttr,
-            SVGNames::fromAttr,
-            SVGNames::toAttr,
-            SVGNames::byAttr,
+            SVGNames::valuesAttr.get(),
+            SVGNames::keyTimesAttr.get(),
+            SVGNames::keyPointsAttr.get(),
+            SVGNames::keySplinesAttr.get(),
+            SVGNames::attributeTypeAttr.get(),
+            SVGNames::calcModeAttr.get(),
+            SVGNames::fromAttr.get(),
+            SVGNames::toAttr.get(),
+            SVGNames::byAttr.get(),
         });
         return set;
     }());
index b6a8152..5502d51 100644 (file)
@@ -71,7 +71,7 @@ bool SVGCursorElement::isSupportedAttribute(const QualifiedName& attrName)
         SVGTests::addSupportedAttributes(set);
         SVGExternalResourcesRequired::addSupportedAttributes(set);
         SVGURIReference::addSupportedAttributes(set);
-        set.add({ SVGNames::xAttr, SVGNames::yAttr });
+        set.add({ SVGNames::xAttr.get(), SVGNames::yAttr.get() });
         return set;
     }());
     return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
index 2921194..98972c5 100644 (file)
@@ -75,77 +75,77 @@ static NEVER_INLINE HashMap<AtomicStringImpl*, CSSPropertyID> createAttributeNam
 
     // This list should include all base CSS and SVG CSS properties which are exposed as SVG XML attributes.
     static const QualifiedName* const attributeNames[] = {
-        &alignment_baselineAttr,
-        &baseline_shiftAttr,
-        &buffered_renderingAttr,
-        &clipAttr,
-        &clip_pathAttr,
-        &clip_ruleAttr,
-        &SVGNames::colorAttr,
-        &color_interpolationAttr,
-        &color_interpolation_filtersAttr,
-        &color_profileAttr,
-        &color_renderingAttr,
-        &cursorAttr,
-        &cxAttr,
-        &cyAttr,
-        &SVGNames::directionAttr,
-        &displayAttr,
-        &dominant_baselineAttr,
-        &enable_backgroundAttr,
-        &fillAttr,
-        &fill_opacityAttr,
-        &fill_ruleAttr,
-        &filterAttr,
-        &flood_colorAttr,
-        &flood_opacityAttr,
-        &font_familyAttr,
-        &font_sizeAttr,
-        &font_stretchAttr,
-        &font_styleAttr,
-        &font_variantAttr,
-        &font_weightAttr,
-        &glyph_orientation_horizontalAttr,
-        &glyph_orientation_verticalAttr,
-        &image_renderingAttr,
-        &SVGNames::heightAttr,
-        &kerningAttr,
-        &letter_spacingAttr,
-        &lighting_colorAttr,
-        &marker_endAttr,
-        &marker_midAttr,
-        &marker_startAttr,
-        &maskAttr,
-        &mask_typeAttr,
-        &opacityAttr,
-        &overflowAttr,
-        &paint_orderAttr,
-        &pointer_eventsAttr,
-        &rAttr,
-        &rxAttr,
-        &ryAttr,
-        &shape_renderingAttr,
-        &stop_colorAttr,
-        &stop_opacityAttr,
-        &strokeAttr,
-        &stroke_dasharrayAttr,
-        &stroke_dashoffsetAttr,
-        &stroke_linecapAttr,
-        &stroke_linejoinAttr,
-        &stroke_miterlimitAttr,
-        &stroke_opacityAttr,
-        &stroke_widthAttr,
-        &text_anchorAttr,
-        &text_decorationAttr,
-        &text_renderingAttr,
-        &unicode_bidiAttr,
-        &vector_effectAttr,
-        &visibilityAttr,
-        &SVGNames::widthAttr,
-        &word_spacingAttr,
-        &writing_modeAttr,
-        &xAttr,
-        &yAttr,
+        &alignment_baselineAttr.get(),
+        &baseline_shiftAttr.get(),
+        &buffered_renderingAttr.get(),
+        &clipAttr.get(),
+        &clip_pathAttr.get(),
+        &clip_ruleAttr.get(),
+        &SVGNames::colorAttr.get(),
+        &color_interpolationAttr.get(),
+        &color_interpolation_filtersAttr.get(),
+        &color_profileAttr.get(),
+        &color_renderingAttr.get(),
+        &cursorAttr.get(),
+        &cxAttr.get(),
+        &cyAttr.get(),
+        &SVGNames::directionAttr.get(),
+        &displayAttr.get(),
+        &dominant_baselineAttr.get(),
+        &enable_backgroundAttr.get(),
+        &fillAttr.get(),
+        &fill_opacityAttr.get(),
+        &fill_ruleAttr.get(),
+        &filterAttr.get(),
+        &flood_colorAttr.get(),
+        &flood_opacityAttr.get(),
+        &font_familyAttr.get(),
+        &font_sizeAttr.get(),
+        &font_stretchAttr.get(),
+        &font_styleAttr.get(),
+        &font_variantAttr.get(),
+        &font_weightAttr.get(),
+        &glyph_orientation_horizontalAttr.get(),
+        &glyph_orientation_verticalAttr.get(),
+        &image_renderingAttr.get(),
+        &SVGNames::heightAttr.get(),
+        &kerningAttr.get(),
+        &letter_spacingAttr.get(),
+        &lighting_colorAttr.get(),
+        &marker_endAttr.get(),
+        &marker_midAttr.get(),
+        &marker_startAttr.get(),
+        &maskAttr.get(),
+        &mask_typeAttr.get(),
+        &opacityAttr.get(),
+        &overflowAttr.get(),
+        &paint_orderAttr.get(),
+        &pointer_eventsAttr.get(),
+        &rAttr.get(),
+        &rxAttr.get(),
+        &ryAttr.get(),
+        &shape_renderingAttr.get(),
+        &stop_colorAttr.get(),
+        &stop_opacityAttr.get(),
+        &strokeAttr.get(),
+        &stroke_dasharrayAttr.get(),
+        &stroke_dashoffsetAttr.get(),
+        &stroke_linecapAttr.get(),
+        &stroke_linejoinAttr.get(),
+        &stroke_miterlimitAttr.get(),
+        &stroke_opacityAttr.get(),
+        &stroke_widthAttr.get(),
+        &text_anchorAttr.get(),
+        &text_decorationAttr.get(),
+        &text_renderingAttr.get(),
+        &unicode_bidiAttr.get(),
+        &vector_effectAttr.get(),
+        &visibilityAttr.get(),
+        &SVGNames::widthAttr.get(),
+        &word_spacingAttr.get(),
+        &writing_modeAttr.get(),
+        &xAttr.get(),
+        &yAttr.get(),
     };
 
     HashMap<AtomicStringImpl*, CSSPropertyID> map;
@@ -157,7 +157,7 @@ static NEVER_INLINE HashMap<AtomicStringImpl*, CSSPropertyID> createAttributeNam
 
     // FIXME: When CSS supports "transform-origin" this special case can be removed,
     // and we can add transform_originAttr to the table above instead.
-    map.add(transform_originAttr.localName().impl(), CSSPropertyTransformOrigin);
+    map.add(transform_originAttr->localName().impl(), CSSPropertyTransformOrigin);
 
     return map;
 }
@@ -659,11 +659,11 @@ bool SVGElement::childShouldCreateRenderer(const Node& child) const
 
     static const QualifiedName* const invalidTextContent[] {
 #if ENABLE(SVG_FONTS)
-        &SVGNames::altGlyphTag,
+        &SVGNames::altGlyphTag.get(),
 #endif
-        &SVGNames::textPathTag,
-        &SVGNames::trefTag,
-        &SVGNames::tspanTag,
+        &SVGNames::textPathTag.get(),
+        &SVGNames::trefTag.get(),
+        &SVGNames::tspanTag.get(),
     };
     auto& name = svgChild.localName();
     for (auto* tag : invalidTextContent) {
@@ -771,100 +771,100 @@ QualifiedName SVGElement::animatableAttributeForName(const AtomicString& localNa
 {
     static const auto animatableAttributes = makeNeverDestroyed([] {
         static const QualifiedName* const names[] = {
-            &HTMLNames::classAttr,
-            &SVGNames::amplitudeAttr,
-            &SVGNames::azimuthAttr,
-            &SVGNames::baseFrequencyAttr,
-            &SVGNames::biasAttr,
-            &SVGNames::clipPathUnitsAttr,
-            &SVGNames::cxAttr,
-            &SVGNames::cyAttr,
-            &SVGNames::diffuseConstantAttr,
-            &SVGNames::divisorAttr,
-            &SVGNames::dxAttr,
-            &SVGNames::dyAttr,
-            &SVGNames::edgeModeAttr,
-            &SVGNames::elevationAttr,
-            &SVGNames::exponentAttr,
-            &SVGNames::externalResourcesRequiredAttr,
-            &SVGNames::filterResAttr,
-            &SVGNames::filterUnitsAttr,
-            &SVGNames::fxAttr,
-            &SVGNames::fyAttr,
-            &SVGNames::gradientTransformAttr,
-            &SVGNames::gradientUnitsAttr,
-            &SVGNames::heightAttr,
-            &SVGNames::in2Attr,
-            &SVGNames::inAttr,
-            &SVGNames::interceptAttr,
-            &SVGNames::k1Attr,
-            &SVGNames::k2Attr,
-            &SVGNames::k3Attr,
-            &SVGNames::k4Attr,
-            &SVGNames::kernelMatrixAttr,
-            &SVGNames::kernelUnitLengthAttr,
-            &SVGNames::lengthAdjustAttr,
-            &SVGNames::limitingConeAngleAttr,
-            &SVGNames::markerHeightAttr,
-            &SVGNames::markerUnitsAttr,
-            &SVGNames::markerWidthAttr,
-            &SVGNames::maskContentUnitsAttr,
-            &SVGNames::maskUnitsAttr,
-            &SVGNames::methodAttr,
-            &SVGNames::modeAttr,
-            &SVGNames::numOctavesAttr,
-            &SVGNames::offsetAttr,
-            &SVGNames::operatorAttr,
-            &SVGNames::orderAttr,
-            &SVGNames::orientAttr,
-            &SVGNames::pathLengthAttr,
-            &SVGNames::patternContentUnitsAttr,
-            &SVGNames::patternTransformAttr,
-            &SVGNames::patternUnitsAttr,
-            &SVGNames::pointsAtXAttr,
-            &SVGNames::pointsAtYAttr,
-            &SVGNames::pointsAtZAttr,
-            &SVGNames::preserveAlphaAttr,
-            &SVGNames::preserveAspectRatioAttr,
-            &SVGNames::primitiveUnitsAttr,
-            &SVGNames::radiusAttr,
-            &SVGNames::rAttr,
-            &SVGNames::refXAttr,
-            &SVGNames::refYAttr,
-            &SVGNames::resultAttr,
-            &SVGNames::rotateAttr,
-            &SVGNames::rxAttr,
-            &SVGNames::ryAttr,
-            &SVGNames::scaleAttr,
-            &SVGNames::seedAttr,
-            &SVGNames::slopeAttr,
-            &SVGNames::spacingAttr,
-            &SVGNames::specularConstantAttr,
-            &SVGNames::specularExponentAttr,
-            &SVGNames::spreadMethodAttr,
-            &SVGNames::startOffsetAttr,
-            &SVGNames::stdDeviationAttr,
-            &SVGNames::stitchTilesAttr,
-            &SVGNames::surfaceScaleAttr,
-            &SVGNames::tableValuesAttr,
-            &SVGNames::targetAttr,
-            &SVGNames::targetXAttr,
-            &SVGNames::targetYAttr,
-            &SVGNames::transformAttr,
-            &SVGNames::typeAttr,
-            &SVGNames::valuesAttr,
-            &SVGNames::viewBoxAttr,
-            &SVGNames::widthAttr,
-            &SVGNames::x1Attr,
-            &SVGNames::x2Attr,
-            &SVGNames::xAttr,
-            &SVGNames::xChannelSelectorAttr,
-            &SVGNames::y1Attr,
-            &SVGNames::y2Attr,
-            &SVGNames::yAttr,
-            &SVGNames::yChannelSelectorAttr,
-            &SVGNames::zAttr,
-            &XLinkNames::hrefAttr,
+            &HTMLNames::classAttr.get(),
+            &SVGNames::amplitudeAttr.get(),
+            &SVGNames::azimuthAttr.get(),
+            &SVGNames::baseFrequencyAttr.get(),
+            &SVGNames::biasAttr.get(),
+            &SVGNames::clipPathUnitsAttr.get(),
+            &SVGNames::cxAttr.get(),
+            &SVGNames::cyAttr.get(),
+            &SVGNames::diffuseConstantAttr.get(),
+            &SVGNames::divisorAttr.get(),
+            &SVGNames::dxAttr.get(),
+            &SVGNames::dyAttr.get(),
+            &SVGNames::edgeModeAttr.get(),
+            &SVGNames::elevationAttr.get(),
+            &SVGNames::exponentAttr.get(),
+            &SVGNames::externalResourcesRequiredAttr.get(),
+            &SVGNames::filterResAttr.get(),
+            &SVGNames::filterUnitsAttr.get(),
+            &SVGNames::fxAttr.get(),
+            &SVGNames::fyAttr.get(),
+            &SVGNames::gradientTransformAttr.get(),
+            &SVGNames::gradientUnitsAttr.get(),
+            &SVGNames::heightAttr.get(),
+            &SVGNames::in2Attr.get(),
+            &SVGNames::inAttr.get(),
+            &SVGNames::interceptAttr.get(),
+            &SVGNames::k1Attr.get(),
+            &SVGNames::k2Attr.get(),
+            &SVGNames::k3Attr.get(),
+            &SVGNames::k4Attr.get(),
+            &SVGNames::kernelMatrixAttr.get(),
+            &SVGNames::kernelUnitLengthAttr.get(),
+            &SVGNames::lengthAdjustAttr.get(),
+            &SVGNames::limitingConeAngleAttr.get(),
+            &SVGNames::markerHeightAttr.get(),
+            &SVGNames::markerUnitsAttr.get(),
+            &SVGNames::markerWidthAttr.get(),
+            &SVGNames::maskContentUnitsAttr.get(),
+            &SVGNames::maskUnitsAttr.get(),
+            &SVGNames::methodAttr.get(),
+            &SVGNames::modeAttr.get(),
+            &SVGNames::numOctavesAttr.get(),
+            &SVGNames::offsetAttr.get(),
+            &SVGNames::operatorAttr.get(),
+            &SVGNames::orderAttr.get(),
+            &SVGNames::orientAttr.get(),
+            &SVGNames::pathLengthAttr.get(),
+            &SVGNames::patternContentUnitsAttr.get(),
+            &SVGNames::patternTransformAttr.get(),
+            &SVGNames::patternUnitsAttr.get(),
+            &SVGNames::pointsAtXAttr.get(),
+            &SVGNames::pointsAtYAttr.get(),
+            &SVGNames::pointsAtZAttr.get(),
+            &SVGNames::preserveAlphaAttr.get(),
+            &SVGNames::preserveAspectRatioAttr.get(),
+            &SVGNames::primitiveUnitsAttr.get(),
+            &SVGNames::radiusAttr.get(),
+            &SVGNames::rAttr.get(),
+            &SVGNames::refXAttr.get(),
+            &SVGNames::refYAttr.get(),
+            &SVGNames::resultAttr.get(),
+            &SVGNames::rotateAttr.get(),
+            &SVGNames::rxAttr.get(),
+            &SVGNames::ryAttr.get(),
+            &SVGNames::scaleAttr.get(),
+            &SVGNames::seedAttr.get(),
+            &SVGNames::slopeAttr.get(),
+            &SVGNames::spacingAttr.get(),
+            &SVGNames::specularConstantAttr.get(),
+            &SVGNames::specularExponentAttr.get(),
+            &SVGNames::spreadMethodAttr.get(),
+            &SVGNames::startOffsetAttr.get(),
+            &SVGNames::stdDeviationAttr.get(),
+            &SVGNames::stitchTilesAttr.get(),
+            &SVGNames::surfaceScaleAttr.get(),
+            &SVGNames::tableValuesAttr.get(),
+            &SVGNames::targetAttr.get(),
+            &SVGNames::targetXAttr.get(),
+            &SVGNames::targetYAttr.get(),
+            &SVGNames::transformAttr.get(),
+            &SVGNames::typeAttr.get(),
+            &SVGNames::valuesAttr.get(),
+            &SVGNames::viewBoxAttr.get(),
+            &SVGNames::widthAttr.get(),
+            &SVGNames::x1Attr.get(),
+            &SVGNames::x2Attr.get(),
+            &SVGNames::xAttr.get(),
+            &SVGNames::xChannelSelectorAttr.get(),
+            &SVGNames::y1Attr.get(),
+            &SVGNames::y2Attr.get(),
+            &SVGNames::yAttr.get(),
+            &SVGNames::yChannelSelectorAttr.get(),
+            &SVGNames::zAttr.get(),
+            &XLinkNames::hrefAttr.get(),
         };
         HashMap<AtomicString, QualifiedName> map;
         for (auto& name : names) {
index 13a9814..78b8c12 100644 (file)
@@ -109,13 +109,13 @@ bool SVGFilterElement::isSupportedAttribute(const QualifiedName& attrName)
         SVGLangSpace::addSupportedAttributes(set);
         SVGExternalResourcesRequired::addSupportedAttributes(set);
         set.add({
-            SVGNames::filterUnitsAttr,
-            SVGNames::primitiveUnitsAttr,
-            SVGNames::xAttr,
-            SVGNames::yAttr,
-            SVGNames::widthAttr,
-            SVGNames::heightAttr,
-            SVGNames::filterResAttr,
+            SVGNames::filterUnitsAttr.get(),
+            SVGNames::primitiveUnitsAttr.get(),
+            SVGNames::xAttr.get(),
+            SVGNames::yAttr.get(),
+            SVGNames::widthAttr.get(),
+            SVGNames::heightAttr.get(),
+            SVGNames::filterResAttr.get(),
         });
         return set;
     }());
index 74b6dee..77a3a97 100644 (file)
@@ -64,11 +64,11 @@ SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes(const
 bool SVGFilterPrimitiveStandardAttributes::isSupportedAttribute(const QualifiedName& attrName)
 {
     static const auto supportedAttributes = makeNeverDestroyed(HashSet<QualifiedName> {
-        SVGNames::xAttr,
-        SVGNames::yAttr,
-        SVGNames::widthAttr,
-        SVGNames::heightAttr,
-        SVGNames::resultAttr,
+        SVGNames::xAttr.get(),
+        SVGNames::yAttr.get(),
+        SVGNames::widthAttr.get(),
+        SVGNames::heightAttr.get(),
+        SVGNames::resultAttr.get(),
     });
     return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
 }
index ed7ebf2..5e63fb4 100644 (file)
@@ -73,7 +73,7 @@ bool SVGForeignObjectElement::isSupportedAttribute(const QualifiedName& attrName
         HashSet<QualifiedName> set;
         SVGLangSpace::addSupportedAttributes(set);
         SVGExternalResourcesRequired::addSupportedAttributes(set);
-        set.add({ SVGNames::xAttr, SVGNames::yAttr, SVGNames::widthAttr, SVGNames::heightAttr });
+        set.add({ SVGNames::xAttr.get(), SVGNames::yAttr.get(), SVGNames::widthAttr.get(), SVGNames::heightAttr.get() });
         return set;
     }());
     return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
index c60e3ac..47442cf 100644 (file)
@@ -67,7 +67,7 @@ bool SVGGradientElement::isSupportedAttribute(const QualifiedName& attrName)
         HashSet<QualifiedName> set;
         SVGURIReference::addSupportedAttributes(set);
         SVGExternalResourcesRequired::addSupportedAttributes(set);
-        set.add({ SVGNames::gradientUnitsAttr, SVGNames::gradientTransformAttr, SVGNames::spreadMethodAttr });
+        set.add({ SVGNames::gradientUnitsAttr.get(), SVGNames::gradientTransformAttr.get(), SVGNames::spreadMethodAttr.get() });
         return set;
     }());
     return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
index 1d135e4..428af80 100644 (file)
@@ -85,7 +85,7 @@ bool SVGImageElement::isSupportedAttribute(const QualifiedName& attrName)
         SVGLangSpace::addSupportedAttributes(set);
         SVGExternalResourcesRequired::addSupportedAttributes(set);
         SVGURIReference::addSupportedAttributes(set);
-        set.add({ SVGNames::xAttr, SVGNames::yAttr, SVGNames::widthAttr, SVGNames::heightAttr, SVGNames::preserveAspectRatioAttr });
+        set.add({ SVGNames::xAttr.get(), SVGNames::yAttr.get(), SVGNames::widthAttr.get(), SVGNames::heightAttr.get(), SVGNames::preserveAspectRatioAttr.get() });
         return set;
     }());
     return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
index 5904188..3538585 100644 (file)
@@ -68,7 +68,7 @@ bool SVGLineElement::isSupportedAttribute(const QualifiedName& attrName)
         HashSet<QualifiedName> set;
         SVGLangSpace::addSupportedAttributes(set);
         SVGExternalResourcesRequired::addSupportedAttributes(set);
-        set.add({ SVGNames::x1Attr, SVGNames::x2Attr, SVGNames::y1Attr, SVGNames::y2Attr });
+        set.add({ SVGNames::x1Attr.get(), SVGNames::x2Attr.get(), SVGNames::y1Attr.get(), SVGNames::y2Attr.get() });
         return set;
     }());
     return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
index 414c4c6..c7e20f1 100644 (file)
@@ -113,12 +113,12 @@ bool SVGMarkerElement::isSupportedAttribute(const QualifiedName& attrName)
         SVGExternalResourcesRequired::addSupportedAttributes(set);
         SVGFitToViewBox::addSupportedAttributes(set);
         set.add({
-            SVGNames::markerUnitsAttr,
-            SVGNames::refXAttr,
-            SVGNames::refYAttr,
-            SVGNames::markerWidthAttr,
-            SVGNames::markerHeightAttr,
-            SVGNames::orientAttr,
+            SVGNames::markerUnitsAttr.get(),
+            SVGNames::refXAttr.get(),
+            SVGNames::refYAttr.get(),
+            SVGNames::markerWidthAttr.get(),
+            SVGNames::markerHeightAttr.get(),
+            SVGNames::orientAttr.get(),
         });
         return set;
     }());
index ca08580..0a28bc1 100644 (file)
@@ -84,13 +84,13 @@ bool SVGMaskElement::isSupportedAttribute(const QualifiedName& attrName)
         SVGLangSpace::addSupportedAttributes(set);
         SVGExternalResourcesRequired::addSupportedAttributes(set);
         set.add({
-            SVGNames::maskUnitsAttr,
-            SVGNames::maskContentUnitsAttr,
-            SVGNames::refYAttr,
-            SVGNames::xAttr,
-            SVGNames::yAttr,
-            SVGNames::widthAttr,
-            SVGNames::heightAttr,
+            SVGNames::maskUnitsAttr.get(),
+            SVGNames::maskContentUnitsAttr.get(),
+            SVGNames::refYAttr.get(),
+            SVGNames::xAttr.get(),
+            SVGNames::yAttr.get(),
+            SVGNames::widthAttr.get(),
+            SVGNames::heightAttr.get(),
         });
         return set;
     }());
index c2dd849..0631a55 100644 (file)
@@ -58,11 +58,11 @@ const SVGPropertyInfo* SVGPathElement::dPropertyInfo()
     static const SVGPropertyInfo* s_propertyInfo = nullptr;
     if (!s_propertyInfo) {
         s_propertyInfo = new SVGPropertyInfo(AnimatedPath,
-                                             PropertyIsReadWrite,
-                                             SVGNames::dAttr,
-                                             SVGNames::dAttr.localName(),
-                                             &SVGPathElement::synchronizeD,
-                                             &SVGPathElement::lookupOrCreateDWrapper);
+            PropertyIsReadWrite,
+            SVGNames::dAttr,
+            SVGNames::dAttr->localName(),
+            &SVGPathElement::synchronizeD,
+            &SVGPathElement::lookupOrCreateDWrapper);
     }
     return s_propertyInfo;
 }
@@ -214,7 +214,7 @@ bool SVGPathElement::isSupportedAttribute(const QualifiedName& attrName)
         HashSet<QualifiedName> set;
         SVGLangSpace::addSupportedAttributes(set);
         SVGExternalResourcesRequired::addSupportedAttributes(set);
-        set.add({ SVGNames::dAttr, SVGNames::pathLengthAttr });
+        set.add({ SVGNames::dAttr.get(), SVGNames::pathLengthAttr.get() });
         return set;
     }());
     return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
index 3fea881..2e02a06 100644 (file)
@@ -99,8 +99,8 @@ bool SVGPatternElement::isSupportedAttribute(const QualifiedName& attrName)
         SVGExternalResourcesRequired::addSupportedAttributes(set);
         SVGFitToViewBox::addSupportedAttributes(set);
         set.add({
-            SVGNames::patternUnitsAttr, SVGNames::patternContentUnitsAttr, SVGNames::patternTransformAttr,
-            SVGNames::xAttr, SVGNames::yAttr, SVGNames::widthAttr, SVGNames::heightAttr,
+            SVGNames::patternUnitsAttr.get(), SVGNames::patternContentUnitsAttr.get(), SVGNames::patternTransformAttr.get(),
+            SVGNames::xAttr.get(), SVGNames::yAttr.get(), SVGNames::widthAttr.get(), SVGNames::heightAttr.get(),
         });
         return set;
     }());
index 977cf9f..9225dc0 100644 (file)
@@ -39,11 +39,11 @@ const SVGPropertyInfo* SVGPolyElement::pointsPropertyInfo()
     static const SVGPropertyInfo* s_propertyInfo = nullptr;
     if (!s_propertyInfo) {
         s_propertyInfo = new SVGPropertyInfo(AnimatedPoints,
-                                             PropertyIsReadWrite,
-                                             SVGNames::pointsAttr,
-                                             SVGNames::pointsAttr.localName(),
-                                             &SVGPolyElement::synchronizePoints,
-                                             &SVGPolyElement::lookupOrCreatePointsWrapper);
+            PropertyIsReadWrite,
+            SVGNames::pointsAttr,
+            SVGNames::pointsAttr->localName(),
+            &SVGPolyElement::synchronizePoints,
+            &SVGPolyElement::lookupOrCreatePointsWrapper);
     }
     return s_propertyInfo;
 }
index 0159d1c..c9d9dcc 100644 (file)
@@ -75,7 +75,7 @@ Ref<SVGRadialGradientElement> SVGRadialGradientElement::create(const QualifiedNa
 bool SVGRadialGradientElement::isSupportedAttribute(const QualifiedName& attrName)
 {
     static const auto supportedAttributes = makeNeverDestroyed(HashSet<QualifiedName> {
-        SVGNames::cxAttr, SVGNames::cyAttr, SVGNames::fxAttr, SVGNames::fyAttr, SVGNames::rAttr, SVGNames::frAttr,
+        SVGNames::cxAttr.get(), SVGNames::cyAttr.get(), SVGNames::fxAttr.get(), SVGNames::fyAttr.get(), SVGNames::rAttr.get(), SVGNames::frAttr.get(),
     });
     return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
 }
index ed51487..2d8c70d 100644 (file)
@@ -44,11 +44,11 @@ const SVGPropertyInfo* SVGTextContentElement::textLengthPropertyInfo()
     static const SVGPropertyInfo* s_propertyInfo = nullptr;
     if (!s_propertyInfo) {
         s_propertyInfo = new SVGPropertyInfo(AnimatedLength,
-                                             PropertyIsReadWrite,
-                                             SVGNames::textLengthAttr,
-                                             SVGNames::textLengthAttr.localName(),
-                                             &SVGTextContentElement::synchronizeTextLength,
-                                             &SVGTextContentElement::lookupOrCreateTextLengthWrapper);
+            PropertyIsReadWrite,
+            SVGNames::textLengthAttr,
+            SVGNames::textLengthAttr->localName(),
+            &SVGTextContentElement::synchronizeTextLength,
+            &SVGTextContentElement::lookupOrCreateTextLengthWrapper);
     }
     return s_propertyInfo;
 }
@@ -194,7 +194,7 @@ bool SVGTextContentElement::isSupportedAttribute(const QualifiedName& attrName)
         HashSet<QualifiedName> set;
         SVGLangSpace::addSupportedAttributes(set);
         SVGExternalResourcesRequired::addSupportedAttributes(set);
-        set.add({ SVGNames::lengthAdjustAttr, SVGNames::textLengthAttr });
+        set.add({ SVGNames::lengthAdjustAttr.get(), SVGNames::textLengthAttr.get() });
         return set;
     }());
     return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
index dec3ef6..e8aa886 100644 (file)
@@ -74,7 +74,7 @@ bool SVGTextPathElement::isSupportedAttribute(const QualifiedName& attrName)
     static const auto supportedAttributes = makeNeverDestroyed([] {
         HashSet<QualifiedName> set;
         SVGURIReference::addSupportedAttributes(set);
-        set.add({ SVGNames::startOffsetAttr, SVGNames::methodAttr, SVGNames::spacingAttr });
+        set.add({ SVGNames::startOffsetAttr.get(), SVGNames::methodAttr.get(), SVGNames::spacingAttr.get() });
         return set;
     }());
     return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
index b19cb45..6e28634 100644 (file)
@@ -197,7 +197,7 @@ static HashSet<AtomicString> createAllowedElementSet()
     // Excluded are anything that is used by reference or that only make sense to appear once in a document.
     using namespace SVGNames;
     HashSet<AtomicString> set;
-    for (auto& tag : { aTag, circleTag, descTag, ellipseTag, gTag, imageTag, lineTag, metadataTag, pathTag, polygonTag, polylineTag, rectTag, svgTag, switchTag, symbolTag, textTag, textPathTag, titleTag, trefTag, tspanTag, useTag })
+    for (auto& tag : { aTag.get(), circleTag.get(), descTag.get(), ellipseTag.get(), gTag.get(), imageTag.get(), lineTag.get(), metadataTag.get(), pathTag.get(), polygonTag.get(), polylineTag.get(), rectTag.get(), svgTag.get(), switchTag.get(), symbolTag.get(), textTag.get(), textPathTag.get(), titleTag.get(), trefTag.get(), tspanTag.get(), useTag.get() })
         set.add(tag.localName());
     return set;
 }
index 270ca9d..14f5194 100644 (file)
@@ -44,7 +44,7 @@ String NativeXPathNSResolver::lookupNamespaceURI(const String& prefix)
     // This is not done by Node::lookupNamespaceURI as per the DOM3 Core spec,
     // but the XPath spec says that we should do it for XPathNSResolver.
     if (prefix == "xml")
-        return XMLNames::xmlNamespaceURI;
+        return XMLNames::xmlNamespaceURI.get();
     
     return m_node ? m_node->lookupNamespaceURI(prefix).string() : String();
 }
index 95f5c5d..8e6b835 100644 (file)
@@ -265,7 +265,7 @@ bool XMLDocumentParser::parseDocumentFragment(const String& chunk, DocumentFragm
     // FIXME: We need to implement the HTML5 XML Fragment parsing algorithm:
     // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-xhtml-syntax.html#xml-fragment-parsing-algorithm
     // For now we have a hack for script/style innerHTML support:
-    if (contextElement && (contextElement->hasLocalName(HTMLNames::scriptTag.localName()) || contextElement->hasLocalName(HTMLNames::styleTag.localName()))) {
+    if (contextElement && (contextElement->hasLocalName(HTMLNames::scriptTag->localName()) || contextElement->hasLocalName(HTMLNames::styleTag->localName()))) {
         fragment.parserAppendChild(fragment.document().createTextNode(chunk));
         return true;
     }
index 61392be..b24d834 100644 (file)
@@ -1,3 +1,13 @@
+2017-10-30  Fujii Hironori  <Hironori.Fujii@sony.com>
+
+        Use LazyNeverDestroyed instead of DEFINE_GLOBAL for XMLNames, HTMLNames, MathMLNames and SVGNames
+        https://bugs.webkit.org/show_bug.cgi?id=175118
+
+        Reviewed by Alex Christensen.
+
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPrivate.cpp:
+        (WebKit::wrap):
+
 2017-10-27  Megan Gardner  <megan_gardner@apple.com>
 
         Correctly determine affinity when inserting text via Keyboard Suggestions
index 2a264c7..10b104e 100644 (file)
@@ -229,7 +229,7 @@ WebKitDOMHTMLElement* wrap(HTMLElement* element)
 {
     static HashMap<const QualifiedName::QualifiedNameImpl*, HTMLElementWrapFunction> map;
     if (map.isEmpty()) {
-#define ADD_HTML_WRAPPER(TagName, ElementName) map.set(TagName##Tag.impl(), TagName##Wrapper);
+#define ADD_HTML_WRAPPER(TagName, ElementName) map.set(TagName##Tag->impl(), TagName##Wrapper);
         FOR_EACH_HTML_TAG(ADD_HTML_WRAPPER)
 #undef ADD_HTML_WRAPPER
     }