Changeset 219199 in webkit
- Timestamp:
- Jul 6, 2017 9:22:41 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 147 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r219191 r219199 1 2017-07-06 Matt Lewis <jlewis3@apple.com> 2 3 Unreviewed, rolling out r219178. 4 5 This caused a consistent failure with the API test 6 StringBuilderTest.ToAtomicStringOnEmpty on all Debug testers. 7 8 Reverted changeset: 9 10 "[WTF] Clean up StringStatics.cpp by using 11 LazyNeverDestroyed<> for Atoms" 12 https://bugs.webkit.org/show_bug.cgi?id=174150 13 http://trac.webkit.org/changeset/219178 14 1 15 2017-07-05 Don Olmstead <don.olmstead@sony.com> 2 16 -
trunk/Source/WTF/WTF.xcodeproj/project.pbxproj
r219191 r219199 116 116 A8A4743C151A825B004123FF /* StringBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8A47324151A825B004123FF /* StringBuilder.cpp */; }; 117 117 A8A47440151A825B004123FF /* StringImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8A47328151A825B004123FF /* StringImpl.cpp */; }; 118 A8A47443151A825B004123FF /* StringStatics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8A4732B151A825B004123FF /* StringStatics.cpp */; }; 118 119 A8A47445151A825B004123FF /* WTFString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8A4732D151A825B004123FF /* WTFString.cpp */; }; 119 120 A8A47448151A825B004123FF /* ThreadHolderPthreads.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8A47330151A825B004123FF /* ThreadHolderPthreads.cpp */; }; … … 489 490 A8A47329151A825B004123FF /* StringImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StringImpl.h; sourceTree = "<group>"; }; 490 491 A8A4732A151A825B004123FF /* StringOperators.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StringOperators.h; sourceTree = "<group>"; }; 492 A8A4732B151A825B004123FF /* StringStatics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StringStatics.cpp; sourceTree = "<group>"; }; 491 493 A8A4732C151A825B004123FF /* TextPosition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextPosition.h; sourceTree = "<group>"; }; 492 494 A8A4732D151A825B004123FF /* WTFString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WTFString.cpp; sourceTree = "<group>"; }; … … 1069 1071 A8A47329151A825B004123FF /* StringImpl.h */, 1070 1072 A8A4732A151A825B004123FF /* StringOperators.h */, 1073 A8A4732B151A825B004123FF /* StringStatics.cpp */, 1071 1074 93F1993D19D7958D00C2390B /* StringView.cpp */, 1072 1075 1A6EB1DF187D0BD30030126F /* StringView.h */, … … 1377 1380 A5BA15F3182433A900A82E69 /* StringMac.mm in Sources */, 1378 1381 0FDDBFA71666DFA300C55FEF /* StringPrintStream.cpp in Sources */, 1382 A8A47443151A825B004123FF /* StringStatics.cpp in Sources */, 1379 1383 93F1993E19D7958D00C2390B /* StringView.cpp in Sources */, 1380 1384 93934BD518A1F16900D0D6A1 /* StringViewCF.cpp in Sources */, -
trunk/Source/WTF/wtf/CMakeLists.txt
r219178 r219199 277 277 text/StringBuilder.cpp 278 278 text/StringImpl.cpp 279 text/StringStatics.cpp 279 280 text/StringView.cpp 280 281 text/SymbolImpl.cpp -
trunk/Source/WTF/wtf/text/AtomicString.cpp
r219178 r219199 25 25 26 26 #include "IntegerToStringConversion.h" 27 #include "MainThread.h"28 #include "NeverDestroyed.h"29 27 #include "dtoa.h" 28 29 #if USE(WEB_THREAD) 30 #include "Lock.h" 31 #endif 30 32 31 33 namespace WTF { … … 36 38 StringImpl* impl = this->impl(); 37 39 if (UNLIKELY(!impl)) 38 return nullAtom ();40 return nullAtom; 39 41 40 42 // Convert short strings without allocating a new StringImpl, since … … 111 113 auto impl = AtomicStringImpl::addUTF8(charactersStart, charactersEnd); 112 114 if (!impl) 113 return nullAtom ();115 return nullAtom; 114 116 return impl.get(); 115 117 } … … 122 124 #endif 123 125 124 WTF_EXPORTDATA LazyNeverDestroyed<AtomicString> nullAtomData;125 WTF_EXPORTDATA LazyNeverDestroyed<AtomicString> emptyAtomData;126 WTF_EXPORTDATA LazyNeverDestroyed<AtomicString> starAtomData;127 WTF_EXPORTDATA LazyNeverDestroyed<AtomicString> xmlAtomData;128 WTF_EXPORTDATA LazyNeverDestroyed<AtomicString> xmlnsAtomData;129 130 void AtomicString::init()131 {132 static std::once_flag initializeKey;133 std::call_once(initializeKey, [] {134 // Initialization is not thread safe, so this function must be called from the main thread first.135 ASSERT(isUIThread());136 137 nullAtomData.construct();138 emptyAtomData.construct("");139 starAtomData.construct("*", AtomicString::ConstructFromLiteral);140 xmlAtomData.construct("xml", AtomicString::ConstructFromLiteral);141 xmlnsAtomData.construct("xmlns", AtomicString::ConstructFromLiteral);142 });143 }144 145 126 } // namespace WTF -
trunk/Source/WTF/wtf/text/AtomicString.h
r219178 r219199 23 23 24 24 #include <utility> 25 #include <wtf/NeverDestroyed.h>26 25 #include <wtf/text/AtomicStringImpl.h> 27 26 #include <wtf/text/IntegerToStringConversion.h> … … 306 305 // Define external global variables for the commonly used atomic strings. 307 306 // These are only usable from the main thread. 308 extern WTF_EXPORTDATA LazyNeverDestroyed<AtomicString> nullAtomData; 309 extern WTF_EXPORTDATA LazyNeverDestroyed<AtomicString> emptyAtomData; 310 extern WTF_EXPORTDATA LazyNeverDestroyed<AtomicString> starAtomData; 311 extern WTF_EXPORTDATA LazyNeverDestroyed<AtomicString> xmlAtomData; 312 extern WTF_EXPORTDATA LazyNeverDestroyed<AtomicString> xmlnsAtomData; 313 314 inline const AtomicString& nullAtom() { return nullAtomData.get(); } 315 inline const AtomicString& emptyAtom() { return emptyAtomData.get(); } 316 inline const AtomicString& starAtom() { return starAtomData.get(); } 317 inline const AtomicString& xmlAtom() { return xmlAtomData.get(); } 318 inline const AtomicString& xmlnsAtom() { return xmlnsAtomData.get(); } 307 #ifndef ATOMICSTRING_HIDE_GLOBALS 308 extern const WTF_EXPORTDATA AtomicString nullAtom; 309 extern const WTF_EXPORTDATA AtomicString emptyAtom; 310 extern const WTF_EXPORTDATA AtomicString starAtom; 311 extern const WTF_EXPORTDATA AtomicString xmlAtom; 312 extern const WTF_EXPORTDATA AtomicString xmlnsAtom; 319 313 320 314 inline AtomicString AtomicString::fromUTF8(const char* characters, size_t length) 321 315 { 322 316 if (!characters) 323 return nullAtom ();317 return nullAtom; 324 318 if (!length) 325 return emptyAtom ();319 return emptyAtom; 326 320 return fromUTF8Internal(characters, characters + length); 327 321 } … … 330 324 { 331 325 if (!characters) 332 return nullAtom ();326 return nullAtom; 333 327 if (!*characters) 334 return emptyAtom ();328 return emptyAtom; 335 329 return fromUTF8Internal(characters, nullptr); 336 330 } 331 #endif 337 332 338 333 // AtomicStringHash is the default hash for AtomicString -
trunk/Source/WTF/wtf/text/StringBuilder.h
r219178 r219199 206 206 { 207 207 if (!m_length) 208 return emptyAtom ();208 return emptyAtom; 209 209 210 210 // If the buffer is sufficiently over-allocated, make a new AtomicString from a copy so its buffer is not so large. -
trunk/Source/WTF/wtf/text/StringImpl.cpp
r219178 r219199 2141 2141 } 2142 2142 2143 NEVER_INLINE unsigned StringImpl::hashSlowCase() const2144 {2145 if (is8Bit())2146 setHash(StringHasher::computeHashAndMaskTop8Bits(m_data8, m_length));2147 else2148 setHash(StringHasher::computeHashAndMaskTop8Bits(m_data16, m_length));2149 return existingHash();2150 }2151 2152 unsigned StringImpl::concurrentHash() const2153 {2154 unsigned hash;2155 if (is8Bit())2156 hash = StringHasher::computeHashAndMaskTop8Bits(m_data8, m_length);2157 else2158 hash = StringHasher::computeHashAndMaskTop8Bits(m_data16, m_length);2159 ASSERT(((hash << s_flagCount) >> s_flagCount) == hash);2160 return hash;2161 }2162 2163 2143 bool equalIgnoringNullity(const UChar* a, size_t aLength, StringImpl* b) 2164 2144 { -
trunk/Source/WebCore/ChangeLog
r219194 r219199 1 2017-07-06 Matt Lewis <jlewis3@apple.com> 2 3 Unreviewed, rolling out r219178. 4 5 This caused a consistent failure with the API test 6 StringBuilderTest.ToAtomicStringOnEmpty on all Debug testers. 7 8 Reverted changeset: 9 10 "[WTF] Clean up StringStatics.cpp by using 11 LazyNeverDestroyed<> for Atoms" 12 https://bugs.webkit.org/show_bug.cgi?id=174150 13 http://trac.webkit.org/changeset/219178 14 1 15 2017-07-06 Charlie Turner <cturner@igalia.com> 2 16 -
trunk/Source/WebCore/Modules/mediacontrols/MediaControlsHost.cpp
r219178 r219199 131 131 Page* page = m_mediaElement->document().page(); 132 132 if (!page) 133 return emptyAtom ();133 return emptyAtom; 134 134 135 135 switch (page->group().captionPreferences().captionDisplayMode()) { … … 144 144 default: 145 145 ASSERT_NOT_REACHED(); 146 return emptyAtom ();146 return emptyAtom; 147 147 } 148 148 } -
trunk/Source/WebCore/Modules/mediastream/RTCDataChannel.cpp
r219178 r219199 91 91 92 92 ASSERT_NOT_REACHED(); 93 return emptyAtom ();93 return emptyAtom; 94 94 } 95 95 -
trunk/Source/WebCore/accessibility/AXObjectCache.cpp
r219178 r219199 401 401 402 402 // FIXME: This probably belongs on Node. 403 // FIXME: This should take a const char*, but one caller passes nullAtom ().403 // FIXME: This should take a const char*, but one caller passes nullAtom. 404 404 bool nodeHasRole(Node* node, const String& role) 405 405 { … … 424 424 // ul/ol/dl type (it shouldn't be a list if aria says otherwise). 425 425 if (node && ((nodeHasRole(node, "list") || nodeHasRole(node, "directory")) 426 || (nodeHasRole(node, nullAtom ()) && (node->hasTagName(ulTag) || node->hasTagName(olTag) || node->hasTagName(dlTag)))))426 || (nodeHasRole(node, nullAtom) && (node->hasTagName(ulTag) || node->hasTagName(olTag) || node->hasTagName(dlTag))))) 427 427 return AccessibilityList::create(renderer); 428 428 … … 441 441 return AccessibilityTreeItem::create(renderer); 442 442 443 if (node && is<HTMLLabelElement>(node) && nodeHasRole(node, nullAtom ()))443 if (node && is<HTMLLabelElement>(node) && nodeHasRole(node, nullAtom)) 444 444 return AccessibilityLabel::create(renderer); 445 445 -
trunk/Source/WebCore/accessibility/AccessibilityMediaControls.cpp
r219178 r219199 136 136 } 137 137 138 return nullAtom ();138 return nullAtom; 139 139 } 140 140 -
trunk/Source/WebCore/accessibility/AccessibilityObject.cpp
r219178 r219199 1054 1054 if (doc) 1055 1055 return doc->contentLanguage(); 1056 return nullAtom ();1056 return nullAtom; 1057 1057 } 1058 1058 … … 1934 1934 return ASCIILiteral("off"); 1935 1935 default: 1936 return nullAtom ();1936 return nullAtom; 1937 1937 } 1938 1938 } … … 1975 1975 return listItemAction; 1976 1976 default: 1977 return nullAtom ();1977 return nullAtom; 1978 1978 } 1979 1979 #else 1980 return nullAtom ();1980 return nullAtom; 1981 1981 #endif 1982 1982 } … … 2139 2139 if (Element* element = this->element()) 2140 2140 return element->attributeWithoutSynchronization(attribute); 2141 return nullAtom ();2141 return nullAtom; 2142 2142 } 2143 2143 … … 2478 2478 return ariaPlaceholder; 2479 2479 2480 return nullAtom ();2480 return nullAtom; 2481 2481 } 2482 2482 -
trunk/Source/WebCore/accessibility/AccessibilityObject.h
r219178 r219199 817 817 virtual VisibleSelection selection() const { return VisibleSelection(); } 818 818 virtual String selectedText() const { return String(); } 819 virtual const AtomicString& accessKey() const { return nullAtom (); }819 virtual const AtomicString& accessKey() const { return nullAtom; } 820 820 const String& actionVerb() const; 821 821 virtual Widget* widget() const { return nullptr; } … … 974 974 bool isInsideARIALiveRegion() const; 975 975 virtual const String ariaLiveRegionStatus() const { return String(); } 976 virtual const AtomicString& ariaLiveRegionRelevant() const { return nullAtom (); }976 virtual const AtomicString& ariaLiveRegionRelevant() const { return nullAtom; } 977 977 virtual bool ariaLiveRegionAtomic() const { return false; } 978 978 virtual bool isBusy() const { return false; } -
trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
r219178 r219199 1506 1506 Node* node = m_renderer->node(); 1507 1507 if (!is<Element>(node)) 1508 return nullAtom ();1508 return nullAtom; 1509 1509 return downcast<Element>(*node).getAttribute(accesskeyAttr); 1510 1510 } … … 3465 3465 return linkAction; 3466 3466 default: 3467 return nullAtom ();3467 return nullAtom; 3468 3468 } 3469 3469 #else 3470 return nullAtom ();3470 return nullAtom; 3471 3471 #endif 3472 3472 } -
trunk/Source/WebCore/bindings/js/JSCustomElementInterface.cpp
r219178 r219199 66 66 return element.releaseNonNull(); 67 67 68 auto element = HTMLUnknownElement::create(QualifiedName(nullAtom (), localName, HTMLNames::xhtmlNamespaceURI), document);68 auto element = HTMLUnknownElement::create(QualifiedName(nullAtom, localName, HTMLNames::xhtmlNamespaceURI), document); 69 69 element->setIsCustomElementUpgradeCandidate(); 70 70 element->setIsFailedCustomElement(*this); … … 76 76 { 77 77 if (auto element = tryToConstructCustomElement(document, name.localName())) { 78 if (name.prefix() != nullAtom ())78 if (name.prefix() != nullAtom) 79 79 element->setPrefix(name.prefix()); 80 80 return element.releaseNonNull(); -
trunk/Source/WebCore/bindings/js/JSCustomElementRegistryCustom.cpp
r219178 r219199 127 127 JSObject& prototypeObject = *asObject(prototypeValue); 128 128 129 QualifiedName name(nullAtom (), localName, HTMLNames::xhtmlNamespaceURI);129 QualifiedName name(nullAtom, localName, HTMLNames::xhtmlNamespaceURI); 130 130 auto elementInterface = JSCustomElementInterface::create(name, constructor, globalObject()); 131 131 -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r219178 r219199 2126 2126 my $useAtomicString = $type->extendedAttributes->{AtomicString}; 2127 2127 if ($defaultValue eq "null") { 2128 return $useAtomicString ? "nullAtom ()" : "String()";2128 return $useAtomicString ? "nullAtom" : "String()"; 2129 2129 } elsif ($defaultValue eq "\"\"") { 2130 return $useAtomicString ? "emptyAtom ()" : "emptyString()";2130 return $useAtomicString ? "emptyAtom" : "emptyString()"; 2131 2131 } else { 2132 2132 return $useAtomicString ? "AtomicString(${defaultValue}, AtomicString::ConstructFromLiteral)" : "ASCIILiteral(${defaultValue})"; -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
r219178 r219199 6012 6012 UNUSED_PARAM(throwScope); 6013 6013 auto& impl = castedThis->wrapped(); 6014 auto str = state->argument(0).isUndefined() ? nullAtom (): convert<IDLAtomicStringAdaptor<IDLDOMString>>(*state, state->uncheckedArgument(0));6014 auto str = state->argument(0).isUndefined() ? nullAtom : convert<IDLAtomicStringAdaptor<IDLDOMString>>(*state, state->uncheckedArgument(0)); 6015 6015 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 6016 6016 impl.methodWithOptionalAtomicString(WTFMove(str)); … … 6092 6092 UNUSED_PARAM(throwScope); 6093 6093 auto& impl = castedThis->wrapped(); 6094 auto str = state->argument(0).isUndefined() ? nullAtom (): convert<IDLAtomicStringAdaptor<IDLDOMString>>(*state, state->uncheckedArgument(0));6094 auto str = state->argument(0).isUndefined() ? nullAtom : convert<IDLAtomicStringAdaptor<IDLDOMString>>(*state, state->uncheckedArgument(0)); 6095 6095 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 6096 6096 impl.methodWithOptionalAtomicStringIsNull(WTFMove(str)); … … 6140 6140 UNUSED_PARAM(throwScope); 6141 6141 auto& impl = castedThis->wrapped(); 6142 auto str = state->argument(0).isUndefined() ? emptyAtom (): convert<IDLAtomicStringAdaptor<IDLDOMString>>(*state, state->uncheckedArgument(0));6142 auto str = state->argument(0).isUndefined() ? emptyAtom : convert<IDLAtomicStringAdaptor<IDLDOMString>>(*state, state->uncheckedArgument(0)); 6143 6143 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 6144 6144 impl.methodWithOptionalAtomicStringIsEmptyString(WTFMove(str)); -
trunk/Source/WebCore/css/CSSPageRule.cpp
r219178 r219199 60 60 if (selector) { 61 61 String pageSpecification = selector->selectorText(); 62 if (!pageSpecification.isEmpty() && pageSpecification != starAtom ()) {62 if (!pageSpecification.isEmpty() && pageSpecification != starAtom) { 63 63 text.append(' '); 64 64 text.append(pageSpecification); -
trunk/Source/WebCore/css/CSSPrimitiveValue.cpp
r219178 r219199 283 283 284 284 if (valueID < 0) 285 return nullAtom ();285 return nullAtom; 286 286 287 287 static AtomicString* keywordStrings = new AtomicString[numCSSValueKeywords]; // Leaked intentionally. -
trunk/Source/WebCore/css/CSSSelector.cpp
r219178 r219199 141 141 return static_cast<unsigned>(SelectorSpecificityIncrement::ClassB); 142 142 case CSSSelector::Tag: 143 return (simpleSelector.tagQName().localName() != starAtom ()) ? static_cast<unsigned>(SelectorSpecificityIncrement::ClassC) : 0;143 return (simpleSelector.tagQName().localName() != starAtom) ? static_cast<unsigned>(SelectorSpecificityIncrement::ClassC) : 0; 144 144 case CSSSelector::PseudoElement: 145 145 return static_cast<unsigned>(SelectorSpecificityIncrement::ClassC); … … 247 247 switch (component->match()) { 248 248 case Tag: 249 s += tagQName().localName() == starAtom ()? 0 : 4;249 s += tagQName().localName() == starAtom ? 0 : 4; 250 250 break; 251 251 case PagePseudoClass: … … 827 827 , m_b(0) 828 828 , m_attribute(anyQName()) 829 , m_argument(nullAtom ())829 , m_argument(nullAtom) 830 830 { 831 831 } -
trunk/Source/WebCore/css/CSSSelector.h
r219178 r219199 236 236 const QualifiedName& attribute() const; 237 237 const AtomicString& attributeCanonicalLocalName() const; 238 const AtomicString& argument() const { return m_hasRareData ? m_data.m_rareData->m_argument : nullAtom (); }238 const AtomicString& argument() const { return m_hasRareData ? m_data.m_rareData->m_argument : nullAtom; } 239 239 bool attributeValueMatchingIsCaseInsensitive() const; 240 240 const Vector<AtomicString>* langArgumentList() const { return m_hasRareData ? m_data.m_rareData->m_langArgumentList.get() : nullptr; } -
trunk/Source/WebCore/css/CSSSelectorList.cpp
r219178 r219199 172 172 bool operator()(const CSSSelector* selector) 173 173 { 174 if (selector->match() == CSSSelector::Tag && !selector->tagQName().prefix().isEmpty() && selector->tagQName().prefix() != starAtom ())175 return true; 176 if (selector->isAttributeSelector() && !selector->attribute().prefix().isEmpty() && selector->attribute().prefix() != starAtom ())174 if (selector->match() == CSSSelector::Tag && !selector->tagQName().prefix().isEmpty() && selector->tagQName().prefix() != starAtom) 175 return true; 176 if (selector->isAttributeSelector() && !selector->attribute().prefix().isEmpty() && selector->attribute().prefix() != starAtom) 177 177 return true; 178 178 return false; -
trunk/Source/WebCore/css/PageRuleCollector.cpp
r219178 r219199 96 96 if (component->match() == CSSSelector::Tag) { 97 97 const AtomicString& localName = component->tagQName().localName(); 98 if (localName != starAtom ()&& localName != pageName)98 if (localName != starAtom && localName != pageName) 99 99 return false; 100 100 } else if (component->match() == CSSSelector::PagePseudoClass) { -
trunk/Source/WebCore/css/RuleSet.cpp
r219178 r219199 63 63 const QualifiedName& tagQualifiedName = selector.tagQName(); 64 64 const AtomicString& selectorNamespace = tagQualifiedName.namespaceURI(); 65 if (selectorNamespace == starAtom ()|| selectorNamespace == xhtmlNamespaceURI) {65 if (selectorNamespace == starAtom || selectorNamespace == xhtmlNamespaceURI) { 66 66 if (tagQualifiedName == anyQName()) 67 67 return MatchBasedOnRuleHash::Universal; … … 247 247 } 248 248 case CSSSelector::Tag: 249 if (selector->tagQName().localName() != starAtom ())249 if (selector->tagQName().localName() != starAtom) 250 250 tagSelector = selector; 251 251 break; -
trunk/Source/WebCore/css/SelectorChecker.cpp
r219178 r219199 644 644 const AtomicString& localName = (element.isHTMLElement() && element.document().isHTMLDocument()) ? simpleSelector.tagLowercaseLocalName() : tagQName.localName(); 645 645 646 if (localName != starAtom ()&& localName != element.localName())646 if (localName != starAtom && localName != element.localName()) 647 647 return false; 648 648 const AtomicString& namespaceURI = tagQName.namespaceURI(); 649 return namespaceURI == starAtom ()|| namespaceURI == element.namespaceURI();649 return namespaceURI == starAtom || namespaceURI == element.namespaceURI(); 650 650 } 651 651 -
trunk/Source/WebCore/css/SelectorFilter.cpp
r219178 r219199 110 110 case CSSSelector::Tag: { 111 111 const AtomicString& tagLowercaseLocalName = selector->tagLowercaseLocalName(); 112 if (tagLowercaseLocalName != starAtom ())112 if (tagLowercaseLocalName != starAtom) 113 113 (*hash++) = tagLowercaseLocalName.impl()->existingHash() * TagNameSalt; 114 114 break; -
trunk/Source/WebCore/css/StyleBuilderConverter.h
r219178 r219199 458 458 { 459 459 if (downcast<CSSPrimitiveValue>(value).valueID() == CSSValueAuto) 460 return nullAtom ();460 return nullAtom; 461 461 return convertString(styleResolver, value); 462 462 } … … 465 465 { 466 466 if (downcast<CSSPrimitiveValue>(value).valueID() == CSSValueNone) 467 return nullAtom ();467 return nullAtom; 468 468 return convertString(styleResolver, value); 469 469 } -
trunk/Source/WebCore/css/StyleBuilderCustom.h
r219178 r219199 723 723 FontCascadeDescription fontDescription = styleResolver.style()->fontDescription(); 724 724 if (primitiveValue.valueID() == CSSValueAuto) 725 fontDescription.setLocale(nullAtom ());725 fontDescription.setLocale(nullAtom); 726 726 else 727 727 fontDescription.setLocale(primitiveValue.stringValue()); … … 1056 1056 styleResolver.style()->setTextEmphasisMark(value); 1057 1057 } 1058 styleResolver.style()->setTextEmphasisCustomMark(nullAtom ());1058 styleResolver.style()->setTextEmphasisCustomMark(nullAtom); 1059 1059 return; 1060 1060 } … … 1068 1068 } 1069 1069 1070 styleResolver.style()->setTextEmphasisCustomMark(nullAtom ());1070 styleResolver.style()->setTextEmphasisCustomMark(nullAtom); 1071 1071 1072 1072 if (primitiveValue.valueID() == CSSValueFilled || primitiveValue.valueID() == CSSValueOpen) { … … 1386 1386 else 1387 1387 const_cast<RenderStyle*>(styleResolver.parentStyle())->setHasAttrContent(); 1388 QualifiedName attr(nullAtom (), contentValue.stringValue().impl(), nullAtom());1388 QualifiedName attr(nullAtom, contentValue.stringValue().impl(), nullAtom); 1389 1389 const AtomicString& value = styleResolver.element()->getAttribute(attr); 1390 styleResolver.style()->setContent(value.isNull() ? emptyAtom (): value.impl(), didSet);1390 styleResolver.style()->setContent(value.isNull() ? emptyAtom : value.impl(), didSet); 1391 1391 didSet = true; 1392 1392 // Register the fact that the attribute value affects the style. … … 1784 1784 const_cast<RenderStyle*>(styleResolver.parentStyle())->setUnique(); 1785 1785 1786 QualifiedName attr(nullAtom (), primitiveValue.stringValue(), nullAtom());1786 QualifiedName attr(nullAtom, primitiveValue.stringValue(), nullAtom); 1787 1787 const AtomicString& value = styleResolver.element()->getAttribute(attr); 1788 styleResolver.style()->setContentAltText(value.isNull() ? emptyAtom (): value);1788 styleResolver.style()->setContentAltText(value.isNull() ? emptyAtom : value); 1789 1789 1790 1790 // Register the fact that the attribute value affects the style. … … 1792 1792 styleResolver.ruleSets().mutableFeatures().attributeLocalNamesInRules.add(attr.localName().impl()); 1793 1793 } else 1794 styleResolver.style()->setContentAltText(emptyAtom ());1794 styleResolver.style()->setContentAltText(emptyAtom); 1795 1795 } 1796 1796 -
trunk/Source/WebCore/css/StyleSheetContents.cpp
r219178 r219199 69 69 : m_ownerRule(ownerRule) 70 70 , m_originalURL(originalURL) 71 , m_defaultNamespace(starAtom ())71 , m_defaultNamespace(starAtom) 72 72 , m_isUserStyleSheet(ownerRule && ownerRule->parentStyleSheet() && ownerRule->parentStyleSheet()->isUserStyleSheet()) 73 73 , m_parserContext(context) … … 312 312 PrefixNamespaceURIMap::const_iterator it = m_namespaces.find(prefix); 313 313 if (it == m_namespaces.end()) 314 return nullAtom ();314 return nullAtom; 315 315 return it->value; 316 316 } -
trunk/Source/WebCore/css/makeprop.pl
r219178 r219199 337 337 { 338 338 if (id < firstCSSProperty) 339 return nullAtom ();339 return nullAtom; 340 340 int index = id - firstCSSProperty; 341 341 if (index >= numCSSProperties) 342 return nullAtom ();342 return nullAtom; 343 343 344 344 static AtomicString* propertyStrings = new AtomicString[numCSSProperties]; // Intentionally never destroyed. -
trunk/Source/WebCore/css/parser/CSSParserImpl.cpp
r219178 r219199 281 281 std::unique_ptr<CSSParserSelector> selector; 282 282 if (!typeSelector.isNull() && pseudo.isNull()) 283 selector = std::unique_ptr<CSSParserSelector>(new CSSParserSelector(QualifiedName(nullAtom (), typeSelector, styleSheet->defaultNamespace())));283 selector = std::unique_ptr<CSSParserSelector>(new CSSParserSelector(QualifiedName(nullAtom, typeSelector, styleSheet->defaultNamespace()))); 284 284 else { 285 285 selector = std::unique_ptr<CSSParserSelector>(new CSSParserSelector); … … 290 290 } 291 291 if (!typeSelector.isNull()) 292 selector->prependTagSelector(QualifiedName(nullAtom (), typeSelector, styleSheet->defaultNamespace()));292 selector->prependTagSelector(QualifiedName(nullAtom, typeSelector, styleSheet->defaultNamespace())); 293 293 } 294 294 -
trunk/Source/WebCore/css/parser/CSSSelectorParser.cpp
r219178 r219199 303 303 } 304 304 if (namespaceURI == defaultNamespace()) 305 namespacePrefix = nullAtom ();305 namespacePrefix = nullAtom; 306 306 307 307 CSSParserSelector* rawSelector = new CSSParserSelector(QualifiedName(namespacePrefix, elementName, namespaceURI)); … … 334 334 bool CSSSelectorParser::consumeName(CSSParserTokenRange& range, AtomicString& name, AtomicString& namespacePrefix) 335 335 { 336 name = nullAtom ();337 namespacePrefix = nullAtom ();336 name = nullAtom; 337 namespacePrefix = nullAtom; 338 338 339 339 const CSSParserToken& firstToken = range.peek(); … … 342 342 range.consume(); 343 343 } else if (firstToken.type() == DelimiterToken && firstToken.delimiter() == '*') { 344 name = starAtom ();344 name = starAtom; 345 345 range.consume(); 346 346 } else if (firstToken.type() == DelimiterToken && firstToken.delimiter() == '|') { 347 347 // This is an empty namespace, which'll get assigned this value below 348 name = emptyAtom ();348 name = emptyAtom; 349 349 } else 350 350 return false; … … 359 359 name = nameToken.value().toAtomicString(); 360 360 } else if (nameToken.type() == DelimiterToken && nameToken.delimiter() == '*') 361 name = starAtom ();361 name = starAtom; 362 362 else { 363 name = nullAtom ();364 namespacePrefix = nullAtom ();363 name = nullAtom; 364 namespacePrefix = nullAtom; 365 365 return false; 366 366 } … … 422 422 423 423 QualifiedName qualifiedName = namespacePrefix.isNull() 424 ? QualifiedName(nullAtom (), attributeName, nullAtom())424 ? QualifiedName(nullAtom, attributeName, nullAtom) 425 425 : QualifiedName(namespacePrefix, attributeName, namespaceURI); 426 426 … … 804 804 { 805 805 if (!m_styleSheet) 806 return starAtom ();806 return starAtom; 807 807 return m_styleSheet->defaultNamespace(); 808 808 } … … 813 813 return defaultNamespace(); 814 814 if (prefix.isEmpty()) 815 return emptyAtom (); // No namespace. If an element/attribute has a namespace, we won't match it.816 if (prefix == starAtom ())817 return starAtom (); // We'll match any namespace.815 return emptyAtom; // No namespace. If an element/attribute has a namespace, we won't match it. 816 if (prefix == starAtom) 817 return starAtom; // We'll match any namespace. 818 818 if (!m_styleSheet) 819 return nullAtom (); // Cannot resolve prefix to namespace without a stylesheet, syntax error.819 return nullAtom; // Cannot resolve prefix to namespace without a stylesheet, syntax error. 820 820 return m_styleSheet->namespaceURIFromPrefix(prefix); 821 821 } … … 825 825 bool isShadowDOM = compoundSelector->needsImplicitShadowCombinatorForMatching(); 826 826 827 if (elementName.isNull() && defaultNamespace() == starAtom ()&& !isShadowDOM)827 if (elementName.isNull() && defaultNamespace() == starAtom && !isShadowDOM) 828 828 return; 829 829 830 AtomicString determinedElementName = elementName.isNull() ? starAtom (): elementName;830 AtomicString determinedElementName = elementName.isNull() ? starAtom : elementName; 831 831 AtomicString namespaceURI = determineNamespace(namespacePrefix); 832 832 if (namespaceURI.isNull()) { … … 836 836 AtomicString determinedPrefix = namespacePrefix; 837 837 if (namespaceURI == defaultNamespace()) 838 determinedPrefix = nullAtom ();838 determinedPrefix = nullAtom; 839 839 QualifiedName tag = QualifiedName(determinedPrefix, determinedElementName, namespaceURI); 840 840 … … 849 849 bool explicitForHost = compoundSelector->isHostPseudoSelector() && !elementName.isNull(); 850 850 if (tag != anyQName() || explicitForHost || isShadowDOM) 851 compoundSelector->prependTagSelector(tag, determinedPrefix == nullAtom () && determinedElementName == starAtom()&& !explicitForHost);851 compoundSelector->prependTagSelector(tag, determinedPrefix == nullAtom && determinedElementName == starAtom && !explicitForHost); 852 852 } 853 853 -
trunk/Source/WebCore/cssjit/SelectorCompiler.cpp
r219178 r219199 1047 1047 static inline bool attributeNameTestingRequiresNamespaceRegister(const CSSSelector& attributeSelector) 1048 1048 { 1049 return attributeSelector.attribute().prefix() != starAtom ()&& !attributeSelector.attribute().namespaceURI().isNull();1049 return attributeSelector.attribute().prefix() != starAtom && !attributeSelector.attribute().namespaceURI().isNull(); 1050 1050 } 1051 1051 … … 1387 1387 const AtomicString& lhsLocalName = lhsQualifiedName.localName(); 1388 1388 const AtomicString& rhsLocalName = rhsQualifiedName.localName(); 1389 if (lhsLocalName != starAtom () && rhsLocalName != starAtom()) {1389 if (lhsLocalName != starAtom && rhsLocalName != starAtom) { 1390 1390 const AtomicString& lhsLowercaseLocalName = lhs->tagLowercaseLocalName(); 1391 1391 const AtomicString& rhsLowercaseLocalName = rhs->tagLowercaseLocalName(); … … 1401 1401 const AtomicString& lhsNamespaceURI = lhsQualifiedName.namespaceURI(); 1402 1402 const AtomicString& rhsNamespaceURI = rhsQualifiedName.namespaceURI(); 1403 if (lhsNamespaceURI != starAtom () && rhsNamespaceURI != starAtom()) {1403 if (lhsNamespaceURI != starAtom && rhsNamespaceURI != starAtom) { 1404 1404 if (lhsNamespaceURI != rhsNamespaceURI) 1405 1405 return TagNameEquality::StrictlyNotEqual; … … 2801 2801 m_assembler.loadPtr(Assembler::Address(currentAttributeAddress, Attribute::nameMemoryOffset()), qualifiedNameImpl); 2802 2802 2803 bool shouldCheckNamespace = attributeSelector.attribute().prefix() != starAtom ();2803 bool shouldCheckNamespace = attributeSelector.attribute().prefix() != starAtom; 2804 2804 if (shouldCheckNamespace) { 2805 2805 Assembler::Jump nameDoesNotMatch = m_assembler.branchPtr(Assembler::NotEqual, Assembler::Address(qualifiedNameImpl, QualifiedName::QualifiedNameImpl::localNameMemoryOffset()), localNameToMatch); … … 3392 3392 3393 3393 const AtomicString& selectorLocalName = nameToMatch.localName(); 3394 if (selectorLocalName != starAtom ()) {3394 if (selectorLocalName != starAtom) { 3395 3395 const AtomicString& lowercaseLocalName = tagMatchingSelector.tagLowercaseLocalName(); 3396 3396 … … 3422 3422 3423 3423 const AtomicString& selectorNamespaceURI = nameToMatch.namespaceURI(); 3424 if (selectorNamespaceURI != starAtom ()) {3424 if (selectorNamespaceURI != starAtom) { 3425 3425 // Generate namespaceURI == element->namespaceURI(). 3426 3426 LocalRegister constantRegister(m_registerAllocator); -
trunk/Source/WebCore/dom/Attr.cpp
r219178 r219199 75 75 return result.releaseException(); 76 76 77 if ((prefix == xmlnsAtom () && namespaceURI() != XMLNSNames::xmlnsNamespaceURI) || qualifiedName() == xmlnsAtom())77 if ((prefix == xmlnsAtom && namespaceURI() != XMLNSNames::xmlnsNamespaceURI) || qualifiedName() == xmlnsAtom) 78 78 return Exception { NAMESPACE_ERR }; 79 79 80 const AtomicString& newPrefix = prefix.isEmpty() ? nullAtom (): prefix;80 const AtomicString& newPrefix = prefix.isEmpty() ? nullAtom : prefix; 81 81 if (m_element) 82 82 elementAttribute().setPrefix(newPrefix); … … 142 142 ASSERT(!m_element); 143 143 m_element = &element; 144 m_standaloneValue = nullAtom ();144 m_standaloneValue = nullAtom; 145 145 setTreeScopeRecursively(element.treeScope()); 146 146 } -
trunk/Source/WebCore/dom/Attribute.h
r219178 r219199 79 79 if (filterLocalName != name.localName()) 80 80 return false; 81 return filterPrefix == starAtom ()|| filterNamespaceURI == name.namespaceURI();81 return filterPrefix == starAtom || filterNamespaceURI == name.namespaceURI(); 82 82 } 83 83 -
trunk/Source/WebCore/dom/ConstantPropertyMap.cpp
r219178 r219199 67 67 } 68 68 69 return nullAtom ();69 return nullAtom; 70 70 } 71 71 -
trunk/Source/WebCore/dom/ContainerNode.cpp
r219178 r219199 898 898 ASSERT(!qualifiedName.isNull()); 899 899 900 if (qualifiedName == starAtom ())900 if (qualifiedName == starAtom) 901 901 return ensureRareData().ensureNodeLists().addCachedCollection<AllDescendantsCollection>(*this, AllDescendants); 902 902 … … 909 909 { 910 910 ASSERT(!localName.isNull()); 911 return ensureRareData().ensureNodeLists().addCachedTagCollectionNS(*this, namespaceURI.isEmpty() ? nullAtom (): namespaceURI, localName);911 return ensureRareData().ensureNodeLists().addCachedTagCollectionNS(*this, namespaceURI.isEmpty() ? nullAtom : namespaceURI, localName); 912 912 } 913 913 -
trunk/Source/WebCore/dom/CustomElementReactionQueue.cpp
r219178 r219199 188 188 for (auto& attribute : element.attributesIterator()) { 189 189 if (queue->m_interface->observesAttribute(attribute.localName())) 190 queue->m_items.append({attribute.name(), nullAtom (), attribute.value()});190 queue->m_items.append({attribute.name(), nullAtom, attribute.value()}); 191 191 } 192 192 } -
trunk/Source/WebCore/dom/DatasetDOMStringMap.cpp
r219178 r219199 134 134 { 135 135 if (name.isNull()) 136 return nullAtom ();136 return nullAtom; 137 137 138 138 StringImpl* nameImpl = name.impl(); -
trunk/Source/WebCore/dom/Document.cpp
r219178 r219199 855 855 static ALWAYS_INLINE Ref<HTMLElement> createUpgradeCandidateElement(Document& document, const AtomicString& localName) 856 856 { 857 return createUpgradeCandidateElement(document, QualifiedName { nullAtom (), localName, xhtmlNamespaceURI });857 return createUpgradeCandidateElement(document, QualifiedName { nullAtom, localName, xhtmlNamespaceURI }); 858 858 } 859 859 … … 900 900 return Exception { INVALID_CHARACTER_ERR }; 901 901 902 return createElement(QualifiedName(nullAtom (), name, nullAtom()), false);902 return createElement(QualifiedName(nullAtom, name, nullAtom), false); 903 903 } 904 904 … … 963 963 case ATTRIBUTE_NODE: 964 964 // FIXME: This will "Attr::normalize" child nodes of Attr. 965 return Ref<Node> { Attr::create(*this, QualifiedName(nullAtom (), downcast<Attr>(nodeToImport).name(), nullAtom()), downcast<Attr>(nodeToImport).value()) };965 return Ref<Node> { Attr::create(*this, QualifiedName(nullAtom, downcast<Attr>(nodeToImport).name(), nullAtom), downcast<Attr>(nodeToImport).value()) }; 966 966 967 967 case DOCUMENT_NODE: // Can't import a document into another document. … … 1018 1018 if (!qName.prefix().isEmpty() && qName.namespaceURI().isNull()) // createElementNS(null, "html:div") 1019 1019 return false; 1020 if (qName.prefix() == xmlAtom ()&& qName.namespaceURI() != XMLNames::xmlNamespaceURI) // createElementNS("http://www.example.com", "xml:lang")1020 if (qName.prefix() == xmlAtom && qName.namespaceURI() != XMLNames::xmlNamespaceURI) // createElementNS("http://www.example.com", "xml:lang") 1021 1021 return false; 1022 1022 … … 1024 1024 // http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-DocCrElNS 1025 1025 // createElementNS("http://www.w3.org/2000/xmlns/", "foo:bar"), createElementNS(null, "xmlns:bar"), createElementNS(null, "xmlns") 1026 if (qName.prefix() == xmlnsAtom () || (qName.prefix().isEmpty() && qName.localName() == xmlnsAtom()))1026 if (qName.prefix() == xmlnsAtom || (qName.prefix().isEmpty() && qName.localName() == xmlnsAtom)) 1027 1027 return qName.namespaceURI() == XMLNSNames::xmlnsNamespaceURI; 1028 1028 return qName.namespaceURI() != XMLNSNames::xmlnsNamespaceURI; … … 3053 3053 } 3054 3054 3055 m_baseTarget = target ? *target : nullAtom ();3055 m_baseTarget = target ? *target : nullAtom; 3056 3056 } 3057 3057 … … 7086 7086 auto* documentElement = this->documentElement(); 7087 7087 if (!is<HTMLHtmlElement>(documentElement)) 7088 return nullAtom ();7088 return nullAtom; 7089 7089 return downcast<HTMLHtmlElement>(*documentElement).dir(); 7090 7090 } … … 7165 7165 auto* bodyElement = body(); 7166 7166 if (!bodyElement) 7167 return emptyAtom ();7167 return emptyAtom; 7168 7168 return bodyElement->attributeWithoutSynchronization(bgcolorAttr); 7169 7169 } … … 7179 7179 auto* bodyElement = body(); 7180 7180 if (!bodyElement) 7181 return emptyAtom ();7181 return emptyAtom; 7182 7182 return bodyElement->attributeWithoutSynchronization(textAttr); 7183 7183 } … … 7193 7193 auto* bodyElement = body(); 7194 7194 if (!bodyElement) 7195 return emptyAtom ();7195 return emptyAtom; 7196 7196 return bodyElement->attributeWithoutSynchronization(alinkAttr); 7197 7197 } … … 7207 7207 auto* bodyElement = body(); 7208 7208 if (!bodyElement) 7209 return emptyAtom ();7209 return emptyAtom; 7210 7210 return bodyElement->attributeWithoutSynchronization(linkAttr); 7211 7211 } … … 7221 7221 auto* bodyElement = body(); 7222 7222 if (!bodyElement) 7223 return emptyAtom ();7223 return emptyAtom; 7224 7224 return bodyElement->attributeWithoutSynchronization(vlinkAttr); 7225 7225 } -
trunk/Source/WebCore/dom/Document.h
r219178 r219199 1247 1247 1248 1248 // Return a Locale for the default locale if the argument is null or empty. 1249 Locale& getCachedLocale(const AtomicString& locale = nullAtom ());1249 Locale& getCachedLocale(const AtomicString& locale = nullAtom); 1250 1250 1251 1251 const Document* templateDocument() const; -
trunk/Source/WebCore/dom/Element.cpp
r219178 r219199 403 403 { 404 404 if (value) 405 setAttribute(name, emptyAtom ());405 setAttribute(name, emptyAtom); 406 406 else 407 407 removeAttribute(name); … … 480 480 // We're not passing a namespace argument on purpose. SVGNames::*Attr are defined w/o namespaces as well. 481 481 ASSERT_WITH_SECURITY_IMPLICATION(isSVGElement()); 482 downcast<SVGElement>(*this).synchronizeAnimatedSVGAttribute(QualifiedName(nullAtom (), localName, nullAtom()));482 downcast<SVGElement>(*this).synchronizeAnimatedSVGAttribute(QualifiedName(nullAtom, localName, nullAtom)); 483 483 } 484 484 } … … 487 487 { 488 488 if (!elementData()) 489 return nullAtom ();489 return nullAtom; 490 490 synchronizeAttribute(name); 491 491 if (const Attribute* attribute = findAttributeByName(name)) 492 492 return attribute->value(); 493 return nullAtom ();493 return nullAtom; 494 494 } 495 495 … … 1214 1214 { 1215 1215 if (!elementData()) 1216 return nullAtom ();1216 return nullAtom; 1217 1217 synchronizeAttribute(localName); 1218 1218 if (const Attribute* attribute = elementData()->findAttributeByName(localName, shouldIgnoreAttributeCase(*this))) 1219 1219 return attribute->value(); 1220 return nullAtom ();1220 return nullAtom; 1221 1221 } 1222 1222 1223 1223 const AtomicString& Element::getAttributeNS(const AtomicString& namespaceURI, const AtomicString& localName) const 1224 1224 { 1225 return getAttribute(QualifiedName(nullAtom (), localName, namespaceURI));1225 return getAttribute(QualifiedName(nullAtom, localName, namespaceURI)); 1226 1226 } 1227 1227 … … 1234 1234 auto caseAdjustedLocalName = shouldIgnoreAttributeCase(*this) ? localName.convertToASCIILowercase() : localName; 1235 1235 unsigned index = elementData() ? elementData()->findAttributeIndexByName(caseAdjustedLocalName, false) : ElementData::attributeNotFound; 1236 auto name = index != ElementData::attributeNotFound ? attributeAt(index).name() : QualifiedName { nullAtom (), caseAdjustedLocalName, nullAtom()};1236 auto name = index != ElementData::attributeNotFound ? attributeAt(index).name() : QualifiedName { nullAtom, caseAdjustedLocalName, nullAtom }; 1237 1237 setAttributeInternal(index, name, value, NotInSynchronizationOfLazyAttribute); 1238 1238 … … 1529 1529 // Use attributeVector instead of m_elementData because attributeChanged might modify m_elementData. 1530 1530 for (const auto& attribute : attributeVector) 1531 attributeChanged(attribute.name(), nullAtom (), attribute.value(), ModifiedDirectly);1531 attributeChanged(attribute.name(), nullAtom, attribute.value(), ModifiedDirectly); 1532 1532 } 1533 1533 … … 1544 1544 // ElementData::m_classNames or ElementData::m_idForStyleResolution need to be updated with the right case. 1545 1545 if (hasID()) 1546 attributeChanged(idAttr, nullAtom (), getIdAttribute());1546 attributeChanged(idAttr, nullAtom, getIdAttribute()); 1547 1547 if (hasClass()) 1548 attributeChanged(classAttr, nullAtom (), getAttribute(classAttr));1548 attributeChanged(classAttr, nullAtom, getAttribute(classAttr)); 1549 1549 } 1550 1550 … … 1588 1588 return result.releaseException(); 1589 1589 1590 m_tagName.setPrefix(prefix.isEmpty() ? nullAtom (): prefix);1590 m_tagName.setPrefix(prefix.isEmpty() ? nullAtom : prefix); 1591 1591 return { }; 1592 1592 } … … 1640 1640 if (!idValue.isNull()) { 1641 1641 if (newScope) 1642 updateIdForTreeScope(*newScope, nullAtom (), idValue);1642 updateIdForTreeScope(*newScope, nullAtom, idValue); 1643 1643 if (newDocument) 1644 updateIdForDocument(*newDocument, nullAtom (), idValue, AlwaysUpdateHTMLDocumentNamedItemMaps);1644 updateIdForDocument(*newDocument, nullAtom, idValue, AlwaysUpdateHTMLDocumentNamedItemMaps); 1645 1645 } 1646 1646 … … 1648 1648 if (!nameValue.isNull()) { 1649 1649 if (newScope) 1650 updateNameForTreeScope(*newScope, nullAtom (), nameValue);1650 updateNameForTreeScope(*newScope, nullAtom, nameValue); 1651 1651 if (newDocument) 1652 updateNameForDocument(*newDocument, nullAtom (), nameValue);1652 updateNameForDocument(*newDocument, nullAtom, nameValue); 1653 1653 } 1654 1654 1655 1655 if (newScope && hasTagName(labelTag)) { 1656 1656 if (newScope->shouldCacheLabelsByForAttribute()) 1657 updateLabel(*newScope, nullAtom (), attributeWithoutSynchronization(forAttr));1657 updateLabel(*newScope, nullAtom, attributeWithoutSynchronization(forAttr)); 1658 1658 } 1659 1659 … … 1694 1694 if (!idValue.isNull()) { 1695 1695 if (oldScope) 1696 updateIdForTreeScope(*oldScope, idValue, nullAtom ());1696 updateIdForTreeScope(*oldScope, idValue, nullAtom); 1697 1697 if (oldDocument) 1698 updateIdForDocument(*oldDocument, idValue, nullAtom (), AlwaysUpdateHTMLDocumentNamedItemMaps);1698 updateIdForDocument(*oldDocument, idValue, nullAtom, AlwaysUpdateHTMLDocumentNamedItemMaps); 1699 1699 } 1700 1700 … … 1702 1702 if (!nameValue.isNull()) { 1703 1703 if (oldScope) 1704 updateNameForTreeScope(*oldScope, nameValue, nullAtom ());1704 updateNameForTreeScope(*oldScope, nameValue, nullAtom); 1705 1705 if (oldDocument) 1706 updateNameForDocument(*oldDocument, nameValue, nullAtom ());1706 updateNameForDocument(*oldDocument, nameValue, nullAtom); 1707 1707 } 1708 1708 1709 1709 if (oldScope && hasTagName(labelTag)) { 1710 1710 if (oldScope->shouldCacheLabelsByForAttribute()) 1711 updateLabel(*oldScope, attributeWithoutSynchronization(forAttr), nullAtom ());1711 updateLabel(*oldScope, attributeWithoutSynchronization(forAttr), nullAtom); 1712 1712 } 1713 1713 … … 2284 2284 2285 2285 if (!valueBeingRemoved.isNull()) 2286 willModifyAttribute(name, valueBeingRemoved, nullAtom ());2286 willModifyAttribute(name, valueBeingRemoved, nullAtom); 2287 2287 2288 2288 { 2289 Style::AttributeChangeInvalidation styleInvalidation(*this, name, valueBeingRemoved, nullAtom ());2289 Style::AttributeChangeInvalidation styleInvalidation(*this, name, valueBeingRemoved, nullAtom); 2290 2290 elementData.removeAttribute(index); 2291 2291 } … … 2301 2301 } 2302 2302 2303 willModifyAttribute(name, nullAtom (), value);2303 willModifyAttribute(name, nullAtom, value); 2304 2304 { 2305 Style::AttributeChangeInvalidation styleInvalidation(*this, name, nullAtom (), value);2305 Style::AttributeChangeInvalidation styleInvalidation(*this, name, nullAtom, value); 2306 2306 ensureUniqueElementData().addAttribute(name, value); 2307 2307 } … … 2328 2328 bool Element::removeAttributeNS(const AtomicString& namespaceURI, const AtomicString& localName) 2329 2329 { 2330 return removeAttribute(QualifiedName(nullAtom (), localName, namespaceURI));2330 return removeAttribute(QualifiedName(nullAtom, localName, namespaceURI)); 2331 2331 } 2332 2332 … … 2346 2346 if (!elementData()) 2347 2347 return 0; 2348 QualifiedName qName(nullAtom (), localName, namespaceURI);2348 QualifiedName qName(nullAtom, localName, namespaceURI); 2349 2349 synchronizeAttribute(qName); 2350 2350 const Attribute* attribute = elementData()->findAttributeByName(qName); … … 2366 2366 if (!elementData()) 2367 2367 return false; 2368 QualifiedName qName(nullAtom (), localName, namespaceURI);2368 QualifiedName qName(nullAtom, localName, namespaceURI); 2369 2369 synchronizeAttribute(qName); 2370 2370 return elementData()->findAttributeByName(qName); … … 2869 2869 } 2870 2870 2871 return nullAtom ();2871 return nullAtom; 2872 2872 } 2873 2873 … … 3263 3263 3264 3264 if (WindowNameCollection::elementMatchesIfNameAttributeMatch(*this)) { 3265 const AtomicString& id = WindowNameCollection::elementMatchesIfIdAttributeMatch(*this) ? getIdAttribute() : nullAtom ();3265 const AtomicString& id = WindowNameCollection::elementMatchesIfIdAttributeMatch(*this) ? getIdAttribute() : nullAtom; 3266 3266 if (!oldName.isEmpty() && oldName != id) 3267 3267 document.removeWindowNamedItem(*oldName.impl(), *this); … … 3271 3271 3272 3272 if (DocumentNameCollection::elementMatchesIfNameAttributeMatch(*this)) { 3273 const AtomicString& id = DocumentNameCollection::elementMatchesIfIdAttributeMatch(*this) ? getIdAttribute() : nullAtom ();3273 const AtomicString& id = DocumentNameCollection::elementMatchesIfIdAttributeMatch(*this) ? getIdAttribute() : nullAtom; 3274 3274 if (!oldName.isEmpty() && oldName != id) 3275 3275 document.removeDocumentNamedItem(*oldName.impl(), *this); … … 3316 3316 3317 3317 if (WindowNameCollection::elementMatchesIfIdAttributeMatch(*this)) { 3318 const AtomicString& name = condition == UpdateHTMLDocumentNamedItemMapsOnlyIfDiffersFromNameAttribute && WindowNameCollection::elementMatchesIfNameAttributeMatch(*this) ? getNameAttribute() : nullAtom ();3318 const AtomicString& name = condition == UpdateHTMLDocumentNamedItemMapsOnlyIfDiffersFromNameAttribute && WindowNameCollection::elementMatchesIfNameAttributeMatch(*this) ? getNameAttribute() : nullAtom; 3319 3319 if (!oldId.isEmpty() && oldId != name) 3320 3320 document.removeWindowNamedItem(*oldId.impl(), *this); … … 3324 3324 3325 3325 if (DocumentNameCollection::elementMatchesIfIdAttributeMatch(*this)) { 3326 const AtomicString& name = condition == UpdateHTMLDocumentNamedItemMapsOnlyIfDiffersFromNameAttribute && DocumentNameCollection::elementMatchesIfNameAttributeMatch(*this) ? getNameAttribute() : nullAtom ();3326 const AtomicString& name = condition == UpdateHTMLDocumentNamedItemMapsOnlyIfDiffersFromNameAttribute && DocumentNameCollection::elementMatchesIfNameAttributeMatch(*this) ? getNameAttribute() : nullAtom; 3327 3327 if (!oldId.isEmpty() && oldId != name) 3328 3328 document.removeDocumentNamedItem(*oldId.impl(), *this); … … 3367 3367 void Element::didAddAttribute(const QualifiedName& name, const AtomicString& value) 3368 3368 { 3369 attributeChanged(name, nullAtom (), value);3369 attributeChanged(name, nullAtom, value); 3370 3370 InspectorInstrumentation::didModifyDOMAttr(document(), *this, name.localName(), value); 3371 3371 dispatchSubtreeModifiedEvent(); … … 3381 3381 void Element::didRemoveAttribute(const QualifiedName& name, const AtomicString& oldValue) 3382 3382 { 3383 attributeChanged(name, oldValue, nullAtom ());3383 attributeChanged(name, oldValue, nullAtom); 3384 3384 InspectorInstrumentation::didRemoveDOMAttr(document(), *this, name.localName()); 3385 3385 dispatchSubtreeModifiedEvent(); … … 3575 3575 3576 3576 for (const Attribute& attribute : attributesIterator()) 3577 attributeChanged(attribute.name(), nullAtom (), attribute.value(), ModifiedByCloning);3577 attributeChanged(attribute.name(), nullAtom, attribute.value(), ModifiedByCloning); 3578 3578 } 3579 3579 -
trunk/Source/WebCore/dom/Element.h
r219178 r219199 723 723 return attribute->value(); 724 724 } 725 return nullAtom ();725 return nullAtom; 726 726 } 727 727 … … 733 733 inline const AtomicString& Element::idForStyleResolution() const 734 734 { 735 return hasID() ? elementData()->idForStyleResolution() : nullAtom ();735 return hasID() ? elementData()->idForStyleResolution() : nullAtom; 736 736 } 737 737 … … 740 740 if (hasID()) 741 741 return elementData()->findAttributeByName(HTMLNames::idAttr)->value(); 742 return nullAtom ();742 return nullAtom; 743 743 } 744 744 … … 747 747 if (hasName()) 748 748 return elementData()->findAttributeByName(HTMLNames::nameAttr)->value(); 749 return nullAtom ();749 return nullAtom; 750 750 } 751 751 -
trunk/Source/WebCore/dom/EventTarget.cpp
r219178 r219199 192 192 return eventNames().mousewheelEvent; 193 193 194 return nullAtom ();194 return nullAtom; 195 195 } 196 196 -
trunk/Source/WebCore/dom/MutationRecord.h
r219178 r219199 62 62 virtual Node* nextSibling() { return 0; } 63 63 64 virtual const AtomicString& attributeName() { return nullAtom (); }65 virtual const AtomicString& attributeNamespace() { return nullAtom (); }64 virtual const AtomicString& attributeName() { return nullAtom; } 65 virtual const AtomicString& attributeNamespace() { return nullAtom; } 66 66 67 67 virtual String oldValue() { return String(); } -
trunk/Source/WebCore/dom/NamedNodeMap.cpp
r219178 r219199 84 84 if (!m_element.hasAttributes()) 85 85 return Exception { NOT_FOUND_ERR }; 86 auto index = m_element.findAttributeIndexByName(QualifiedName { nullAtom (), localName, namespaceURI });86 auto index = m_element.findAttributeIndexByName(QualifiedName { nullAtom, localName, namespaceURI }); 87 87 if (index == ElementData::attributeNotFound) 88 88 return Exception { NOT_FOUND_ERR }; -
trunk/Source/WebCore/dom/Node.cpp
r219178 r219199 630 630 { 631 631 // For nodes other than elements and attributes, the prefix is always null 632 return nullAtom ();632 return nullAtom; 633 633 } 634 634 … … 643 643 const AtomicString& Node::localName() const 644 644 { 645 return nullAtom ();645 return nullAtom; 646 646 } 647 647 648 648 const AtomicString& Node::namespaceURI() const 649 649 { 650 return nullAtom ();650 return nullAtom; 651 651 } 652 652 … … 932 932 if (namespaceURI.isEmpty() && !prefix.isEmpty()) 933 933 return Exception { NAMESPACE_ERR }; 934 if (prefix == xmlAtom ()&& namespaceURI != XMLNames::xmlNamespaceURI)934 if (prefix == xmlAtom && namespaceURI != XMLNames::xmlNamespaceURI) 935 935 return Exception { NAMESPACE_ERR }; 936 936 … … 1393 1393 continue; 1394 1394 1395 if ((prefix.isNull() && attribute.prefix().isNull() && attribute.localName() == xmlnsAtom ()) || (attribute.prefix() == xmlnsAtom()&& attribute.localName() == prefix)) {1395 if ((prefix.isNull() && attribute.prefix().isNull() && attribute.localName() == xmlnsAtom) || (attribute.prefix() == xmlnsAtom && attribute.localName() == prefix)) { 1396 1396 auto& result = attribute.value(); 1397 return result.isEmpty() ? nullAtom (): result;1397 return result.isEmpty() ? nullAtom : result; 1398 1398 } 1399 1399 } 1400 1400 } 1401 1401 auto* parent = node.parentElement(); 1402 return parent ? locateDefaultNamespace(*parent, prefix) : nullAtom ();1402 return parent ? locateDefaultNamespace(*parent, prefix) : nullAtom; 1403 1403 } 1404 1404 case Node::DOCUMENT_NODE: 1405 1405 if (auto* documentElement = downcast<Document>(node).documentElement()) 1406 1406 return locateDefaultNamespace(*documentElement, prefix); 1407 return nullAtom ();1407 return nullAtom; 1408 1408 case Node::DOCUMENT_TYPE_NODE: 1409 1409 case Node::DOCUMENT_FRAGMENT_NODE: 1410 return nullAtom ();1410 return nullAtom; 1411 1411 case Node::ATTRIBUTE_NODE: 1412 1412 if (auto* ownerElement = downcast<Attr>(node).ownerElement()) 1413 1413 return locateDefaultNamespace(*ownerElement, prefix); 1414 return nullAtom ();1414 return nullAtom; 1415 1415 default: 1416 1416 if (auto* parent = node.parentElement()) 1417 1417 return locateDefaultNamespace(*parent, prefix); 1418 return nullAtom ();1418 return nullAtom; 1419 1419 } 1420 1420 } … … 1423 1423 bool Node::isDefaultNamespace(const AtomicString& potentiallyEmptyNamespace) const 1424 1424 { 1425 const AtomicString& namespaceURI = potentiallyEmptyNamespace.isEmpty() ? nullAtom (): potentiallyEmptyNamespace;1426 return locateDefaultNamespace(*this, nullAtom ()) == namespaceURI;1425 const AtomicString& namespaceURI = potentiallyEmptyNamespace.isEmpty() ? nullAtom : potentiallyEmptyNamespace; 1426 return locateDefaultNamespace(*this, nullAtom) == namespaceURI; 1427 1427 } 1428 1428 … … 1430 1430 const AtomicString& Node::lookupNamespaceURI(const AtomicString& potentiallyEmptyPrefix) const 1431 1431 { 1432 const AtomicString& prefix = potentiallyEmptyPrefix.isEmpty() ? nullAtom (): potentiallyEmptyPrefix;1432 const AtomicString& prefix = potentiallyEmptyPrefix.isEmpty() ? nullAtom : potentiallyEmptyPrefix; 1433 1433 return locateDefaultNamespace(*this, prefix); 1434 1434 } … … 1442 1442 if (element.hasAttributes()) { 1443 1443 for (auto& attribute : element.attributesIterator()) { 1444 if (attribute.prefix() == xmlnsAtom ()&& attribute.value() == namespaceURI)1444 if (attribute.prefix() == xmlnsAtom && attribute.value() == namespaceURI) 1445 1445 return attribute.localName(); 1446 1446 } 1447 1447 } 1448 1448 auto* parent = element.parentElement(); 1449 return parent ? locateNamespacePrefix(*parent, namespaceURI) : nullAtom ();1449 return parent ? locateNamespacePrefix(*parent, namespaceURI) : nullAtom; 1450 1450 } 1451 1451 … … 1454 1454 { 1455 1455 if (namespaceURI.isEmpty()) 1456 return nullAtom ();1456 return nullAtom; 1457 1457 1458 1458 switch (nodeType()) { … … 1462 1462 if (auto* documentElement = downcast<Document>(*this).documentElement()) 1463 1463 return locateNamespacePrefix(*documentElement, namespaceURI); 1464 return nullAtom ();1464 return nullAtom; 1465 1465 case DOCUMENT_FRAGMENT_NODE: 1466 1466 case DOCUMENT_TYPE_NODE: 1467 return nullAtom ();1467 return nullAtom; 1468 1468 case ATTRIBUTE_NODE: 1469 1469 if (auto* ownerElement = downcast<Attr>(*this).ownerElement()) 1470 1470 return locateNamespacePrefix(*ownerElement, namespaceURI); 1471 return nullAtom ();1471 return nullAtom; 1472 1472 default: 1473 1473 if (auto* parent = parentElement()) 1474 1474 return locateNamespacePrefix(*parent, namespaceURI); 1475 return nullAtom ();1475 return nullAtom; 1476 1476 } 1477 1477 } -
trunk/Source/WebCore/dom/NodeRareData.h
r219178 r219199 123 123 ALWAYS_INLINE Ref<TagCollectionNS> addCachedTagCollectionNS(ContainerNode& node, const AtomicString& namespaceURI, const AtomicString& localName) 124 124 { 125 QualifiedName name(nullAtom (), localName, namespaceURI);125 QualifiedName name(nullAtom, localName, namespaceURI); 126 126 TagCollectionNSCache::AddResult result = m_tagCollectionNSCache.fastAdd(name, nullptr); 127 127 if (!result.isNewEntry) … … 148 148 ALWAYS_INLINE Ref<T> addCachedCollection(ContainerType& container, CollectionType collectionType) 149 149 { 150 CollectionCacheMap::AddResult result = m_cachedCollections.fastAdd(namedCollectionKey(collectionType, starAtom ()), nullptr);150 CollectionCacheMap::AddResult result = m_cachedCollections.fastAdd(namedCollectionKey(collectionType, starAtom), nullptr); 151 151 if (!result.isNewEntry) 152 152 return static_cast<T&>(*result.iterator->value); … … 160 160 T* cachedCollection(CollectionType collectionType) 161 161 { 162 return static_cast<T*>(m_cachedCollections.get(namedCollectionKey(collectionType, starAtom ())));162 return static_cast<T*>(m_cachedCollections.get(namedCollectionKey(collectionType, starAtom))); 163 163 } 164 164 165 165 template <class NodeListType> 166 void removeCacheWithAtomicName(NodeListType* list, const AtomicString& name = starAtom ())166 void removeCacheWithAtomicName(NodeListType* list, const AtomicString& name = starAtom) 167 167 { 168 168 ASSERT(list == m_atomicNameCaches.get(namedNodeListKey<NodeListType>(name))); … … 174 174 void removeCachedTagCollectionNS(HTMLCollection& collection, const AtomicString& namespaceURI, const AtomicString& localName) 175 175 { 176 QualifiedName name(nullAtom (), localName, namespaceURI);176 QualifiedName name(nullAtom, localName, namespaceURI); 177 177 ASSERT(&collection == m_tagCollectionNSCache.get(name)); 178 178 if (deleteThisAndUpdateNodeRareDataIfAboutToRemoveLastList(collection.ownerNode())) … … 181 181 } 182 182 183 void removeCachedCollection(HTMLCollection* collection, const AtomicString& name = starAtom ())183 void removeCachedCollection(HTMLCollection* collection, const AtomicString& name = starAtom) 184 184 { 185 185 ASSERT(collection == m_cachedCollections.get(namedCollectionKey(collection->type(), name))); -
trunk/Source/WebCore/dom/PseudoElement.cpp
r219178 r219199 40 40 const QualifiedName& pseudoElementTagName() 41 41 { 42 static NeverDestroyed<QualifiedName> name(nullAtom (), "<pseudo>", nullAtom());42 static NeverDestroyed<QualifiedName> name(nullAtom, "<pseudo>", nullAtom); 43 43 return name; 44 44 } -
trunk/Source/WebCore/dom/QualifiedName.cpp
r219178 r219199 46 46 47 47 // Global init routines 48 DEFINE_GLOBAL(QualifiedName, anyName, nullAtom (), starAtom(), starAtom())48 DEFINE_GLOBAL(QualifiedName, anyName, nullAtom, starAtom, starAtom) 49 49 50 50 void QualifiedName::init() … … 56 56 // Use placement new to initialize the globals. 57 57 AtomicString::init(); 58 new (NotNull, (void*)&anyName) QualifiedName(nullAtom (), starAtom(), starAtom());58 new (NotNull, (void*)&anyName) QualifiedName(nullAtom, starAtom, starAtom); 59 59 initialized = true; 60 60 } … … 62 62 const QualifiedName& nullQName() 63 63 { 64 static NeverDestroyed<QualifiedName> nullName(nullAtom (), nullAtom(), nullAtom());64 static NeverDestroyed<QualifiedName> nullName(nullAtom, nullAtom, nullAtom); 65 65 return nullName; 66 66 } … … 81 81 void createQualifiedName(void* targetAddress, StringImpl* name, const AtomicString& nameNamespace) 82 82 { 83 new (NotNull, reinterpret_cast<void*>(targetAddress)) QualifiedName(nullAtom (), AtomicString(name), nameNamespace);83 new (NotNull, reinterpret_cast<void*>(targetAddress)) QualifiedName(nullAtom, AtomicString(name), nameNamespace); 84 84 } 85 85 86 86 void createQualifiedName(void* targetAddress, StringImpl* name) 87 87 { 88 new (NotNull, reinterpret_cast<void*>(targetAddress)) QualifiedName(nullAtom (), AtomicString(name), nullAtom());88 new (NotNull, reinterpret_cast<void*>(targetAddress)) QualifiedName(nullAtom, AtomicString(name), nullAtom); 89 89 } 90 90 -
trunk/Source/WebCore/dom/QualifiedName.h
r219178 r219199 82 82 bool matches(const QualifiedName& other) const { return m_impl == other.m_impl || (localName() == other.localName() && namespaceURI() == other.namespaceURI()); } 83 83 84 bool hasPrefix() const { return m_impl->m_prefix != nullAtom (); }84 bool hasPrefix() const { return m_impl->m_prefix != nullAtom; } 85 85 void setPrefix(const AtomicString& prefix) { *this = QualifiedName(prefix, localName(), namespaceURI()); } 86 86 -
trunk/Source/WebCore/dom/SelectorQuery.cpp
r219178 r219199 337 337 const AtomicString& selectorNamespaceURI = tagQualifiedName.namespaceURI(); 338 338 339 if (selectorNamespaceURI == starAtom ()) {340 if (selectorLocalName != starAtom ()) {339 if (selectorNamespaceURI == starAtom) { 340 if (selectorLocalName != starAtom) { 341 341 // Common case: name defined, selectorNamespaceURI is a wildcard. 342 342 elementsForLocalName<SelectorQueryTrait>(rootNode, selectorLocalName, selectorLowercaseLocalName, output); … … 346 346 } 347 347 } else { 348 // Fallback: NamespaceURI is set, selectorLocalName may be starAtom ().348 // Fallback: NamespaceURI is set, selectorLocalName may be starAtom. 349 349 for (auto& element : elementDescendants(const_cast<ContainerNode&>(rootNode))) { 350 350 if (element.namespaceURI() == selectorNamespaceURI && localNameMatches(element, selectorLocalName, selectorLowercaseLocalName)) { -
trunk/Source/WebCore/dom/SlotAssignment.cpp
r219178 r219199 38 38 static const AtomicString& slotNameFromAttributeValue(const AtomicString& value) 39 39 { 40 return value == nullAtom ()? SlotAssignment::defaultSlotName() : value;40 return value == nullAtom ? SlotAssignment::defaultSlotName() : value; 41 41 } 42 42 -
trunk/Source/WebCore/dom/SlotAssignment.h
r219178 r219199 46 46 virtual ~SlotAssignment(); 47 47 48 static const AtomicString& defaultSlotName() { return emptyAtom (); }48 static const AtomicString& defaultSlotName() { return emptyAtom; } 49 49 50 50 HTMLSlotElement* findAssignedSlot(const Node&, ShadowRoot&); … … 100 100 { 101 101 if (m_slotAssignment) // FIXME: This is incorrect when there were no elements or text nodes removed. 102 m_slotAssignment->didChangeSlot(nullAtom (), *this);102 m_slotAssignment->didChangeSlot(nullAtom, *this); 103 103 } 104 104 … … 106 106 { 107 107 if (m_slotAssignment) 108 m_slotAssignment->didChangeSlot(nullAtom (), *this);108 m_slotAssignment->didChangeSlot(nullAtom, *this); 109 109 } 110 110 -
trunk/Source/WebCore/dom/TagCollection.cpp
r219178 r219199 46 46 , m_qualifiedName(qualifiedName) 47 47 { 48 ASSERT(qualifiedName != starAtom ());48 ASSERT(qualifiedName != starAtom); 49 49 } 50 50 … … 59 59 , m_loweredQualifiedName(qualifiedName.convertToASCIILowercase()) 60 60 { 61 ASSERT(qualifiedName != starAtom ());61 ASSERT(qualifiedName != starAtom); 62 62 } 63 63 -
trunk/Source/WebCore/dom/TagCollection.h
r219178 r219199 89 89 inline bool TagCollectionNS::elementMatches(Element& element) const 90 90 { 91 if (m_localName != starAtom ()&& m_localName != element.localName())91 if (m_localName != starAtom && m_localName != element.localName()) 92 92 return false; 93 return m_namespaceURI == starAtom ()|| m_namespaceURI == element.namespaceURI();93 return m_namespaceURI == starAtom || m_namespaceURI == element.namespaceURI(); 94 94 } 95 95 -
trunk/Source/WebCore/dom/make_names.pl
r219178 r219199 807 807 808 808 if (keys %allTags) { 809 my $tagsNamespace = $parameters{tagsNullNamespace} ? "nullAtom ()" : "${lowercaseNamespacePrefix}NS";809 my $tagsNamespace = $parameters{tagsNullNamespace} ? "nullAtom" : "${lowercaseNamespacePrefix}NS"; 810 810 printDefinitions($F, \%allTags, "tags", $tagsNamespace); 811 811 } 812 812 if (keys %allAttrs) { 813 my $attrsNamespace = $parameters{attrsNullNamespace} ? "nullAtom ()" : "${lowercaseNamespacePrefix}NS";813 my $attrsNamespace = $parameters{attrsNullNamespace} ? "nullAtom" : "${lowercaseNamespacePrefix}NS"; 814 814 printDefinitions($F, \%allAttrs, "attributes", $attrsNamespace); 815 815 } … … 922 922 END 923 923 ; 924 if ($namespaceURI eq "nullAtom ()") {924 if ($namespaceURI eq "nullAtom") { 925 925 print F " createQualifiedName(entry.targetAddress, &entry.name);\n"; 926 926 } else { … … 1064 1064 return entry.function($argumentList); 1065 1065 } 1066 return $parameters{fallbackInterfaceName}::create(QualifiedName(nullAtom (), localName, ${lowercaseNamespacePrefix}NamespaceURI), document);1066 return $parameters{fallbackInterfaceName}::create(QualifiedName(nullAtom, localName, ${lowercaseNamespacePrefix}NamespaceURI), document); 1067 1067 } 1068 1068 -
trunk/Source/WebCore/editing/CompositeEditCommand.cpp
r219178 r219199 838 838 void CompositeEditCommand::removeNodeAttribute(Element& element, const QualifiedName& attribute) 839 839 { 840 setNodeAttribute(element, attribute, nullAtom ());840 setNodeAttribute(element, attribute, nullAtom); 841 841 } 842 842 -
trunk/Source/WebCore/editing/Editing.cpp
r219178 r219199 891 891 Ref<HTMLElement> createHTMLElement(Document& document, const AtomicString& tagName) 892 892 { 893 return createHTMLElement(document, QualifiedName(nullAtom (), tagName, xhtmlNamespaceURI));893 return createHTMLElement(document, QualifiedName(nullAtom, tagName, xhtmlNamespaceURI)); 894 894 } 895 895 -
trunk/Source/WebCore/editing/MarkupAccumulator.cpp
r219178 r219199 150 150 else if (inXMLFragmentSerialization()) { 151 151 // Make sure xml prefix and namespace are always known to uphold the constraints listed at http://www.w3.org/TR/xml-names11/#xmlReserved. 152 namespaceHash.set(xmlAtom ().impl(), XMLNames::xmlNamespaceURI.impl());153 namespaceHash.set(XMLNames::xmlNamespaceURI.impl(), xmlAtom ().impl());152 namespaceHash.set(xmlAtom.impl(), XMLNames::xmlNamespaceURI.impl()); 153 namespaceHash.set(XMLNames::xmlNamespaceURI.impl(), xmlAtom.impl()); 154 154 } 155 155 … … 256 256 const AtomicString& prefix = element.prefix(); 257 257 if (prefix.isEmpty()) 258 return !element.hasAttribute(xmlnsAtom ());258 return !element.hasAttribute(xmlnsAtom); 259 259 260 260 static NeverDestroyed<String> xmlnsWithColon(MAKE_STATIC_STRING_IMPL("xmlns:")); … … 268 268 // Don't add namespace attributes twice 269 269 // HTML Parser will create xmlns attributes without namespace for HTML elements, allow those as well. 270 if (attribute.name().localName() == xmlnsAtom ()&& (attribute.namespaceURI().isEmpty() || attribute.namespaceURI() == XMLNSNames::xmlnsNamespaceURI)) {271 namespaces.set(emptyAtom ().impl(), attribute.value().impl());270 if (attribute.name().localName() == xmlnsAtom && (attribute.namespaceURI().isEmpty() || attribute.namespaceURI() == XMLNSNames::xmlnsNamespaceURI)) { 271 namespaces.set(emptyAtom.impl(), attribute.value().impl()); 272 272 return false; 273 273 } 274 274 275 QualifiedName xmlnsPrefixAttr(xmlnsAtom (), attribute.localName(), XMLNSNames::xmlnsNamespaceURI);275 QualifiedName xmlnsPrefixAttr(xmlnsAtom, attribute.localName(), XMLNSNames::xmlnsNamespaceURI); 276 276 if (attribute.name() == xmlnsPrefixAttr) { 277 277 namespaces.set(attribute.localName().impl(), attribute.value().impl()); … … 288 288 if (namespaceURI.isEmpty()) { 289 289 // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-xhtml-syntax.html#xml-fragment-serialization-algorithm 290 if (allowEmptyDefaultNS && namespaces.get(emptyAtom ().impl())) {290 if (allowEmptyDefaultNS && namespaces.get(emptyAtom.impl())) { 291 291 result.append(' '); 292 result.append(xmlnsAtom ().string());292 result.append(xmlnsAtom.string()); 293 293 result.appendLiteral("=\"\""); 294 294 } … … 296 296 } 297 297 298 // Use emptyAtom ()s's impl() for both null and empty strings since the HashMap can't handle 0 as a key299 AtomicStringImpl* pre = prefix.isEmpty() ? emptyAtom ().impl() : prefix.impl();298 // Use emptyAtoms's impl() for both null and empty strings since the HashMap can't handle 0 as a key 299 AtomicStringImpl* pre = prefix.isEmpty() ? emptyAtom.impl() : prefix.impl(); 300 300 AtomicStringImpl* foundNS = namespaces.get(pre); 301 301 if (foundNS != namespaceURI.impl()) { … … 308 308 return; 309 309 result.append(' '); 310 result.append(xmlnsAtom ().string());310 result.append(xmlnsAtom.string()); 311 311 if (!prefix.isEmpty()) { 312 312 result.append(':'); … … 444 444 // "The prefix xml MUST NOT be declared as the default namespace.", so use the xml prefix explicitly. 445 445 if (element.namespaceURI() == XMLNames::xmlNamespaceURI) { 446 result.append(xmlAtom ());446 result.append(xmlAtom); 447 447 result.append(':'); 448 448 } … … 501 501 if (attribute.namespaceURI() == XMLNames::xmlNamespaceURI) { 502 502 // Always use xml as prefix if the namespace is the XML namespace. 503 prefixedName.setPrefix(xmlAtom ());503 prefixedName.setPrefix(xmlAtom); 504 504 } else { 505 505 AtomicStringImpl* foundNS = namespaces && attribute.prefix().impl() ? namespaces->get(attribute.prefix().impl()) : 0; … … 510 510 else { 511 511 bool shouldBeDeclaredUsingAppendNamespace = !attribute.prefix().isEmpty() && !foundNS; 512 if (!shouldBeDeclaredUsingAppendNamespace && attribute.localName() != xmlnsAtom ()&& namespaces)512 if (!shouldBeDeclaredUsingAppendNamespace && attribute.localName() != xmlnsAtom && namespaces) 513 513 generateUniquePrefix(prefixedName, *namespaces); 514 514 } -
trunk/Source/WebCore/editing/gtk/EditorGtk.cpp
r219178 r219199 104 104 if (is<HTMLEmbedElement>(element) || is<HTMLObjectElement>(element)) 105 105 return element.imageSourceURL(); 106 return nullAtom ();106 return nullAtom; 107 107 } 108 108 -
trunk/Source/WebCore/editing/markup.cpp
r219178 r219199 76 76 public: 77 77 AttributeChange() 78 : m_name(nullAtom (), nullAtom(), nullAtom())78 : m_name(nullAtom, nullAtom, nullAtom) 79 79 { 80 80 } -
trunk/Source/WebCore/html/Autocapitalize.cpp
r219178 r219199 54 54 switch (type) { 55 55 case AutocapitalizeTypeDefault: 56 return nullAtom ();56 return nullAtom; 57 57 case AutocapitalizeTypeNone: { 58 58 static NeverDestroyed<const AtomicString> valueNone("none", AtomicString::ConstructFromLiteral); … … 74 74 75 75 ASSERT_NOT_REACHED(); 76 return nullAtom ();76 return nullAtom; 77 77 } 78 78 -
trunk/Source/WebCore/html/Autofill.cpp
r219178 r219199 176 176 177 177 // 1. If the element has no autocomplete attribute, then jump to the step labeled default. 178 if (attributeValue == nullAtom ())178 if (attributeValue == nullAtom) 179 179 return defaultLabel(); 180 180 -
trunk/Source/WebCore/html/DOMTokenList.h
r219178 r219199 85 85 { 86 86 auto& tokens = this->tokens(); 87 return index < tokens.size() ? tokens[index] : nullAtom ();87 return index < tokens.size() ? tokens[index] : nullAtom; 88 88 } 89 89 -
trunk/Source/WebCore/html/FormAssociatedElement.cpp
r219178 r219199 283 283 { 284 284 const AtomicString& name = asHTMLElement().getNameAttribute(); 285 return name.isNull() ? emptyAtom (): name;285 return name.isNull() ? emptyAtom : name; 286 286 } 287 287 -
trunk/Source/WebCore/html/HTMLButtonElement.cpp
r219178 r219199 80 80 81 81 ASSERT_NOT_REACHED(); 82 return emptyAtom ();82 return emptyAtom; 83 83 } 84 84 -
trunk/Source/WebCore/html/HTMLDetailsElement.cpp
r219178 r219199 166 166 void HTMLDetailsElement::toggleOpen() 167 167 { 168 setAttributeWithoutSynchronization(openAttr, m_isOpen ? nullAtom () : emptyAtom());168 setAttributeWithoutSynchronization(openAttr, m_isOpen ? nullAtom : emptyAtom); 169 169 170 170 // We need to post to the document because toggling this element will delete it. -
trunk/Source/WebCore/html/HTMLDocument.cpp
r219178 r219199 237 237 { 238 238 static HashSet<AtomicStringImpl*>* htmlCaseInsensitiveAttributesSet = createHtmlCaseInsensitiveAttributesSet(); 239 bool isPossibleHTMLAttr = !attributeName.hasPrefix() && (attributeName.namespaceURI() == nullAtom ());239 bool isPossibleHTMLAttr = !attributeName.hasPrefix() && (attributeName.namespaceURI() == nullAtom); 240 240 return !isPossibleHTMLAttr || !htmlCaseInsensitiveAttributesSet->contains(attributeName.localName().impl()); 241 241 } -
trunk/Source/WebCore/html/HTMLElement.cpp
r219178 r219199 370 370 // Event handler attributes have no namespace. 371 371 if (!attributeName.namespaceURI().isNull()) 372 return nullAtom ();372 return nullAtom; 373 373 374 374 // Fast early return for names that don't start with "on". 375 375 AtomicStringImpl& localName = *attributeName.localName().impl(); 376 376 if (localName.length() < 3 || localName[0] != 'o' || localName[1] != 'n') 377 return nullAtom ();377 return nullAtom; 378 378 379 379 auto it = map.find(&localName); 380 return it == map.end() ? nullAtom (): it->value;380 return it == map.end() ? nullAtom : it->value; 381 381 } 382 382 … … 490 490 if (equalLettersIgnoringASCIICase(value, "auto")) 491 491 return autoValue; 492 return nullAtom ();492 return nullAtom; 493 493 } 494 494 -
trunk/Source/WebCore/html/HTMLImageElement.cpp
r219178 r219199 177 177 178 178 auto sourceSize = SizesAttributeParser(source.attributeWithoutSynchronization(sizesAttr).string(), document()).length(); 179 auto candidate = bestFitSourceForImageAttributes(document().deviceScaleFactor(), nullAtom (), srcset, sourceSize);179 auto candidate = bestFitSourceForImageAttributes(document().deviceScaleFactor(), nullAtom, srcset, sourceSize); 180 180 if (!candidate.isEmpty()) 181 181 return candidate; -
trunk/Source/WebCore/html/HTMLInputElement.cpp
r219178 r219199 167 167 const AtomicString& HTMLInputElement::name() const 168 168 { 169 return m_name.isNull() ? emptyAtom (): m_name;169 return m_name.isNull() ? emptyAtom : m_name; 170 170 } 171 171 … … 527 527 // FIXME: We don't have the old attribute values so we pretend that we didn't have the old values. 528 528 if (const Attribute* height = findAttributeByName(heightAttr)) 529 attributeChanged(heightAttr, nullAtom (), height->value());529 attributeChanged(heightAttr, nullAtom, height->value()); 530 530 if (const Attribute* width = findAttributeByName(widthAttr)) 531 attributeChanged(widthAttr, nullAtom (), width->value());531 attributeChanged(widthAttr, nullAtom, width->value()); 532 532 if (const Attribute* align = findAttributeByName(alignAttr)) 533 attributeChanged(alignAttr, nullAtom (), align->value());533 attributeChanged(alignAttr, nullAtom, align->value()); 534 534 } 535 535 -
trunk/Source/WebCore/html/HTMLMediaElement.cpp
r219178 r219199 7313 7313 bool HTMLMediaElement::doesHaveAttribute(const AtomicString& attribute, AtomicString* value) const 7314 7314 { 7315 QualifiedName attributeName(nullAtom (), attribute, nullAtom());7315 QualifiedName attributeName(nullAtom, attribute, nullAtom); 7316 7316 7317 7317 auto& elementValue = attributeWithoutSynchronization(attributeName); -
trunk/Source/WebCore/html/HTMLOptionElement.cpp
r219178 r219199 79 79 element->setValue(value); 80 80 if (defaultSelected) 81 element->setAttributeWithoutSynchronization(selectedAttr, emptyAtom ());81 element->setAttributeWithoutSynchronization(selectedAttr, emptyAtom); 82 82 element->setSelected(selected); 83 83 -
trunk/Source/WebCore/html/HTMLParamElement.cpp
r219178 r219199 46 46 if (hasName()) 47 47 return getNameAttribute(); 48 return document().isHTMLDocument() ? emptyAtom (): getIdAttribute();48 return document().isHTMLDocument() ? emptyAtom : getIdAttribute(); 49 49 } 50 50 -
trunk/Source/WebCore/html/HTMLSelectElement.cpp
r219178 r219199 393 393 bool oldMultiple = this->multiple(); 394 394 int oldSelectedIndex = selectedIndex(); 395 setAttributeWithoutSynchronization(multipleAttr, multiple ? emptyAtom () : nullAtom());395 setAttributeWithoutSynchronization(multipleAttr, multiple ? emptyAtom : nullAtom); 396 396 397 397 // Restore selectedIndex after changing the multiple flag to preserve -
trunk/Source/WebCore/html/HTMLTableCellElement.cpp
r219178 r219199 182 182 if (equalIgnoringASCIICase(value, colgroup)) 183 183 return colgroup; 184 return emptyAtom ();184 return emptyAtom; 185 185 } 186 186 -
trunk/Source/WebCore/html/HTMLTrackElement.cpp
r219178 r219199 280 280 if (HTMLMediaElement* parent = mediaElement()) 281 281 return parent->attributeWithoutSynchronization(HTMLNames::crossoriginAttr); 282 return nullAtom ();282 return nullAtom; 283 283 } 284 284 -
trunk/Source/WebCore/html/LabelableElement.cpp
r219178 r219199 46 46 return nullptr; 47 47 48 return ensureRareData().ensureNodeLists().addCacheWithAtomicName<LabelsNodeList>(*this, starAtom ());48 return ensureRareData().ensureNodeLists().addCacheWithAtomicName<LabelsNodeList>(*this, starAtom); 49 49 } 50 50 -
trunk/Source/WebCore/html/LabelsNodeList.cpp
r219178 r219199 41 41 LabelsNodeList::~LabelsNodeList() 42 42 { 43 ownerNode().nodeLists()->removeCacheWithAtomicName(this, starAtom ());43 ownerNode().nodeLists()->removeCacheWithAtomicName(this, starAtom); 44 44 } 45 45 -
trunk/Source/WebCore/html/MediaController.cpp
r219178 r219199 318 318 default: 319 319 ASSERT_NOT_REACHED(); 320 return nullAtom ();320 return nullAtom; 321 321 } 322 322 } … … 343 343 default: 344 344 ASSERT_NOT_REACHED(); 345 return nullAtom ();345 return nullAtom; 346 346 } 347 347 } -
trunk/Source/WebCore/html/MediaDocument.cpp
r219178 r219199 107 107 auto videoElement = HTMLVideoElement::create(document); 108 108 m_mediaElement = videoElement.ptr(); 109 videoElement->setAttributeWithoutSynchronization(controlsAttr, emptyAtom ());110 videoElement->setAttributeWithoutSynchronization(autoplayAttr, emptyAtom ());111 videoElement->setAttributeWithoutSynchronization(playsinlineAttr, emptyAtom ());109 videoElement->setAttributeWithoutSynchronization(controlsAttr, emptyAtom); 110 videoElement->setAttributeWithoutSynchronization(autoplayAttr, emptyAtom); 111 videoElement->setAttributeWithoutSynchronization(playsinlineAttr, emptyAtom); 112 112 videoElement->setAttributeWithoutSynchronization(srcAttr, document.url().string()); 113 113 if (auto* loader = document.loader()) -
trunk/Source/WebCore/html/parser/AtomicHTMLToken.h
r219178 r219199 207 207 // FIXME: This is N^2 for the number of attributes. 208 208 if (!hasAttribute(m_attributes, localName)) 209 m_attributes.uncheckedAppend(Attribute(QualifiedName(nullAtom (), localName, nullAtom()), AtomicString(attribute.value)));209 m_attributes.uncheckedAppend(Attribute(QualifiedName(nullAtom, localName, nullAtom), AtomicString(attribute.value))); 210 210 } 211 211 } -
trunk/Source/WebCore/html/parser/HTMLConstructionSite.cpp
r219178 r219199 642 642 Ref<Element> HTMLConstructionSite::createElement(AtomicHTMLToken& token, const AtomicString& namespaceURI) 643 643 { 644 QualifiedName tagName(nullAtom (), token.name(), namespaceURI);644 QualifiedName tagName(nullAtom, token.name(), namespaceURI); 645 645 auto element = ownerDocumentForCurrentNode().createElement(tagName, true); 646 646 setAttributes(element, token, m_parserContentPolicy); … … 677 677 } 678 678 679 QualifiedName qualifiedName(nullAtom (), localName, xhtmlNamespaceURI);679 QualifiedName qualifiedName(nullAtom, localName, xhtmlNamespaceURI); 680 680 if (Document::validateCustomElementName(localName) == CustomElementNameValidationStatus::Valid) { 681 681 element = HTMLElement::create(qualifiedName, ownerDocument); -
trunk/Source/WebCore/html/parser/HTMLParserIdioms.cpp
r219178 r219199 48 48 49 49 if (numLeadingSpaces == length) 50 return string.isNull() ? string : emptyAtom ().string();50 return string.isNull() ? string : emptyAtom.string(); 51 51 52 52 for (; numTrailingSpaces < length; ++numTrailingSpaces) { … … 68 68 69 69 if (!length) 70 return string.isNull() ? string : emptyAtom ().string();70 return string.isNull() ? string : emptyAtom.string(); 71 71 72 72 if (string.is8Bit()) … … 463 463 size_t numberSignIndex = usemap.find('#'); 464 464 if (numberSignIndex == notFound) 465 return nullAtom ();465 return nullAtom; 466 466 return usemap.substring(numberSignIndex + 1).toAtomicString(); 467 467 } -
trunk/Source/WebCore/html/parser/HTMLTreeBuilder.cpp
r219178 r219199 542 542 AtomicString xlinkName("xlink", AtomicString::ConstructFromLiteral); 543 543 addNamesWithPrefix(map, xlinkName, XLinkNames::getXLinkAttrs(), XLinkNames::XLinkAttrsCount); 544 addNamesWithPrefix(map, xmlAtom (), XMLNames::getXMLAttrs(), XMLNames::XMLAttrsCount);545 546 map.add(WTF::xmlnsAtom (), XMLNSNames::xmlnsAttr);547 map.add("xmlns:xlink", QualifiedName(xmlnsAtom (), xlinkName, XMLNSNames::xmlnsNamespaceURI));544 addNamesWithPrefix(map, xmlAtom, XMLNames::getXMLAttrs(), XMLNames::XMLAttrsCount); 545 546 map.add(WTF::xmlnsAtom, XMLNSNames::xmlnsAttr); 547 map.add("xmlns:xlink", QualifiedName(xmlnsAtom, xlinkName, XMLNSNames::xmlnsNamespaceURI)); 548 548 549 549 return map; -
trunk/Source/WebCore/html/track/InbandTextTrack.cpp
r219178 r219199 52 52 53 53 InbandTextTrack::InbandTextTrack(ScriptExecutionContext& context, TextTrackClient& client, InbandTextTrackPrivate& trackPrivate) 54 : TextTrack(&context, &client, emptyAtom (), trackPrivate.id(), trackPrivate.label(), trackPrivate.language(), InBand)54 : TextTrack(&context, &client, emptyAtom, trackPrivate.id(), trackPrivate.label(), trackPrivate.language(), InBand) 55 55 , m_private(trackPrivate) 56 56 { -
trunk/Source/WebCore/html/track/LoadableTextTrack.cpp
r219178 r219199 128 128 { 129 129 if (!m_trackElement) 130 return emptyAtom ();130 return emptyAtom; 131 131 return m_trackElement->attributeWithoutSynchronization(idAttr); 132 132 } -
trunk/Source/WebCore/html/track/TextTrack.cpp
r219178 r219199 85 85 TextTrack* TextTrack::captionMenuOffItem() 86 86 { 87 static TextTrack& off = TextTrack::create(nullptr, nullptr, "off menu item", emptyAtom (), emptyAtom(), emptyAtom()).leakRef();87 static TextTrack& off = TextTrack::create(nullptr, nullptr, "off menu item", emptyAtom, emptyAtom, emptyAtom).leakRef(); 88 88 return &off; 89 89 } … … 91 91 TextTrack* TextTrack::captionMenuAutomaticItem() 92 92 { 93 static TextTrack& automatic = TextTrack::create(nullptr, nullptr, "automatic menu item", emptyAtom (), emptyAtom(), emptyAtom()).leakRef();93 static TextTrack& automatic = TextTrack::create(nullptr, nullptr, "automatic menu item", emptyAtom, emptyAtom, emptyAtom).leakRef(); 94 94 return &automatic; 95 95 } -
trunk/Source/WebCore/html/track/TrackBase.cpp
r219178 r219199 150 150 m_kind = kind; 151 151 else 152 m_kind = emptyAtom ();152 m_kind = emptyAtom; 153 153 } 154 154 -
trunk/Source/WebCore/html/track/VTTRegion.cpp
r219178 r219199 136 136 const AtomicString& VTTRegion::scroll() const 137 137 { 138 return m_scroll ? upKeyword() : emptyAtom ();138 return m_scroll ? upKeyword() : emptyAtom; 139 139 } 140 140 -
trunk/Source/WebCore/html/track/WebVTTElement.cpp
r219178 r219199 38 38 static const QualifiedName& nodeTypeToTagName(WebVTTNodeType nodeType) 39 39 { 40 static NeverDestroyed<QualifiedName> cTag(nullAtom (), "c", nullAtom());41 static NeverDestroyed<QualifiedName> vTag(nullAtom (), "v", nullAtom());42 static NeverDestroyed<QualifiedName> langTag(nullAtom (), "lang", nullAtom());43 static NeverDestroyed<QualifiedName> bTag(nullAtom (), "b", nullAtom());44 static NeverDestroyed<QualifiedName> uTag(nullAtom (), "u", nullAtom());45 static NeverDestroyed<QualifiedName> iTag(nullAtom (), "i", nullAtom());46 static NeverDestroyed<QualifiedName> rubyTag(nullAtom (), "ruby", nullAtom());47 static NeverDestroyed<QualifiedName> rtTag(nullAtom (), "rt", nullAtom());40 static NeverDestroyed<QualifiedName> cTag(nullAtom, "c", nullAtom); 41 static NeverDestroyed<QualifiedName> vTag(nullAtom, "v", nullAtom); 42 static NeverDestroyed<QualifiedName> langTag(nullAtom, "lang", nullAtom); 43 static NeverDestroyed<QualifiedName> bTag(nullAtom, "b", nullAtom); 44 static NeverDestroyed<QualifiedName> uTag(nullAtom, "u", nullAtom); 45 static NeverDestroyed<QualifiedName> iTag(nullAtom, "i", nullAtom); 46 static NeverDestroyed<QualifiedName> rubyTag(nullAtom, "ruby", nullAtom); 47 static NeverDestroyed<QualifiedName> rtTag(nullAtom, "rt", nullAtom); 48 48 switch (nodeType) { 49 49 case WebVTTNodeTypeClass: -
trunk/Source/WebCore/html/track/WebVTTElement.h
r219178 r219199 63 63 static const QualifiedName& voiceAttributeName() 64 64 { 65 static NeverDestroyed<QualifiedName> voiceAttr(nullAtom (), "voice", nullAtom());65 static NeverDestroyed<QualifiedName> voiceAttr(nullAtom, "voice", nullAtom); 66 66 return voiceAttr; 67 67 } … … 69 69 static const QualifiedName& langAttributeName() 70 70 { 71 static NeverDestroyed<QualifiedName> voiceAttr(nullAtom (), "lang", nullAtom());71 static NeverDestroyed<QualifiedName> voiceAttr(nullAtom, "lang", nullAtom); 72 72 return voiceAttr; 73 73 } -
trunk/Source/WebCore/html/track/WebVTTToken.h
r219178 r219199 59 59 } 60 60 61 static WebVTTToken StartTag(const String& tagName, const AtomicString& classes = emptyAtom (), const AtomicString& annotation = emptyAtom())61 static WebVTTToken StartTag(const String& tagName, const AtomicString& classes = emptyAtom, const AtomicString& annotation = emptyAtom) 62 62 { 63 63 WebVTTToken token(Type::StartTag, tagName); -
trunk/Source/WebCore/loader/FrameLoader.cpp
r219178 r219199 628 628 629 629 if (shouldClearWindowName(m_frame, *newDocument)) 630 m_frame.tree().setName(nullAtom ());630 m_frame.tree().setName(nullAtom); 631 631 } 632 632 -
trunk/Source/WebCore/loader/FrameLoader.h
r219178 r219199 119 119 120 120 void changeLocation(FrameLoadRequest&&); 121 WEBCORE_EXPORT void urlSelected(const URL&, const String& target, Event*, LockHistory, LockBackForwardList, ShouldSendReferrer, ShouldOpenExternalURLsPolicy, std::optional<NewFrameOpenerPolicy> = std::nullopt, const AtomicString& downloadAttribute = nullAtom ());121 WEBCORE_EXPORT void urlSelected(const URL&, const String& target, Event*, LockHistory, LockBackForwardList, ShouldSendReferrer, ShouldOpenExternalURLsPolicy, std::optional<NewFrameOpenerPolicy> = std::nullopt, const AtomicString& downloadAttribute = nullAtom); 122 122 void submitForm(Ref<FormSubmission>&&); 123 123 -
trunk/Source/WebCore/loader/ImageLoader.cpp
r219178 r219199 472 472 inline void ImageLoader::clearFailedLoadURL() 473 473 { 474 m_failedLoadURL = nullAtom ();475 } 476 477 } 474 m_failedLoadURL = nullAtom; 475 } 476 477 } -
trunk/Source/WebCore/loader/NavigationAction.h
r219178 r219199 42 42 public: 43 43 NavigationAction(); 44 WEBCORE_EXPORT NavigationAction(Document&, const ResourceRequest&, NavigationType = NavigationType::Other, ShouldOpenExternalURLsPolicy = ShouldOpenExternalURLsPolicy::ShouldNotAllow, Event* = nullptr, const AtomicString& downloadAttribute = nullAtom ());45 NavigationAction(Document&, const ResourceRequest&, FrameLoadType, bool isFormSubmission, Event* = nullptr, ShouldOpenExternalURLsPolicy = ShouldOpenExternalURLsPolicy::ShouldNotAllow, const AtomicString& downloadAttribute = nullAtom ());44 WEBCORE_EXPORT NavigationAction(Document&, const ResourceRequest&, NavigationType = NavigationType::Other, ShouldOpenExternalURLsPolicy = ShouldOpenExternalURLsPolicy::ShouldNotAllow, Event* = nullptr, const AtomicString& downloadAttribute = nullAtom); 45 NavigationAction(Document&, const ResourceRequest&, FrameLoadType, bool isFormSubmission, Event* = nullptr, ShouldOpenExternalURLsPolicy = ShouldOpenExternalURLsPolicy::ShouldNotAllow, const AtomicString& downloadAttribute = nullAtom); 46 46 47 47 WEBCORE_EXPORT ~NavigationAction(); -
trunk/Source/WebCore/loader/PolicyChecker.cpp
r219178 r219199 147 147 148 148 m_delegateIsDecidingNavigationPolicy = true; 149 m_suggestedFilename = action.downloadAttribute().isEmpty() ? nullAtom (): action.downloadAttribute();149 m_suggestedFilename = action.downloadAttribute().isEmpty() ? nullAtom : action.downloadAttribute(); 150 150 m_frame.loader().client().dispatchDecidePolicyForNavigationAction(action, request, formState, [this](PolicyAction action) { 151 151 continueAfterNavigationPolicy(action); -
trunk/Source/WebCore/page/DOMWindow.cpp
r219178 r219199 2327 2327 return; 2328 2328 2329 RefPtr<Frame> dialogFrame = createWindow(urlString, emptyAtom (), parseDialogFeatures(dialogFeaturesString, screenAvailableRect(m_frame->view())), activeWindow, *firstFrame, *m_frame, prepareDialogFunction);2329 RefPtr<Frame> dialogFrame = createWindow(urlString, emptyAtom, parseDialogFeatures(dialogFeaturesString, screenAvailableRect(m_frame->view())), activeWindow, *firstFrame, *m_frame, prepareDialogFunction); 2330 2330 if (!dialogFrame) 2331 2331 return; -
trunk/Source/WebCore/page/EventHandler.cpp
r219178 r219199 3945 3945 default: 3946 3946 ASSERT_NOT_REACHED(); 3947 return emptyAtom ();3947 return emptyAtom; 3948 3948 } 3949 3949 } -
trunk/Source/WebCore/page/FrameTree.cpp
r219178 r219199 49 49 return; 50 50 } 51 m_uniqueName = nullAtom (); // Remove our old frame name so it's not considered in uniqueChildName.51 m_uniqueName = nullAtom; // Remove our old frame name so it's not considered in uniqueChildName. 52 52 m_uniqueName = parent()->tree().uniqueChildName(name); 53 53 } … … 55 55 void FrameTree::clearName() 56 56 { 57 m_name = nullAtom ();58 m_uniqueName = nullAtom ();57 m_name = nullAtom; 58 m_uniqueName = nullAtom; 59 59 } 60 60 -
trunk/Source/WebCore/page/Page.cpp
r219178 r219199 557 557 const String& Page::groupName() const 558 558 { 559 return m_group ? m_group->name() : nullAtom ().string();559 return m_group ? m_group->name() : nullAtom.string(); 560 560 } 561 561 -
trunk/Source/WebCore/platform/graphics/ComplexTextController.cpp
r219178 r219199 218 218 unsigned hitIndex = hitGlyphStart + (hitGlyphEnd - hitGlyphStart) * (m_run.ltr() ? x / adjustedAdvance : 1 - x / adjustedAdvance); 219 219 unsigned stringLength = complexTextRun.stringLength(); 220 CachedTextBreakIterator cursorPositionIterator(StringView(complexTextRun.characters(), stringLength), TextBreakIterator::Mode::Caret, nullAtom ());220 CachedTextBreakIterator cursorPositionIterator(StringView(complexTextRun.characters(), stringLength), TextBreakIterator::Mode::Caret, nullAtom); 221 221 unsigned clusterStart; 222 222 if (cursorPositionIterator.isBoundary(hitIndex)) -
trunk/Source/WebCore/platform/graphics/FontCache.cpp
r219178 r219199 226 226 } 227 227 228 return nullAtom ();228 return nullAtom; 229 229 } 230 230 -
trunk/Source/WebCore/platform/graphics/FontDescription.h
r219178 r219199 304 304 static FontVariantAlternates initialVariantAlternates() { return FontVariantAlternates::Normal; } 305 305 static FontOpticalSizing initialOpticalSizing() { return FontOpticalSizing::Enabled; } 306 static const AtomicString& initialLocale() { return nullAtom (); }306 static const AtomicString& initialLocale() { return nullAtom; } 307 307 308 308 private: -
trunk/Source/WebCore/platform/graphics/FontGenericFamilies.cpp
r219178 r219199 85 85 if (script != USCRIPT_COMMON) 86 86 return genericFontFamilyForScript(fontMap, USCRIPT_COMMON); 87 return emptyAtom ();87 return emptyAtom; 88 88 } 89 89 -
trunk/Source/WebCore/platform/graphics/InbandTextTrackPrivate.h
r219178 r219199 70 70 virtual bool isEasyToRead() const { return false; } 71 71 virtual bool isDefault() const { return false; } 72 AtomicString label() const override { return emptyAtom (); }73 AtomicString language() const override { return emptyAtom (); }74 AtomicString id() const override { return emptyAtom (); }75 virtual AtomicString inBandMetadataTrackDispatchType() const { return emptyAtom (); }72 AtomicString label() const override { return emptyAtom; } 73 AtomicString language() const override { return emptyAtom; } 74 AtomicString id() const override { return emptyAtom; } 75 virtual AtomicString inBandMetadataTrackDispatchType() const { return emptyAtom; } 76 76 77 77 virtual int textTrackIndex() const { return 0; } -
trunk/Source/WebCore/platform/graphics/TrackPrivateBase.h
r219178 r219199 53 53 virtual TrackPrivateBaseClient* client() const = 0; 54 54 55 virtual AtomicString id() const { return emptyAtom (); }56 virtual AtomicString label() const { return emptyAtom (); }57 virtual AtomicString language() const { return emptyAtom (); }55 virtual AtomicString id() const { return emptyAtom; } 56 virtual AtomicString label() const { return emptyAtom; } 57 virtual AtomicString language() const { return emptyAtom; } 58 58 59 59 virtual int trackIndex() const { return 0; } -
trunk/Source/WebCore/platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm
r219191 r219199 185 185 return [[m_mediaSelectionOption->avMediaSelectionOption() optionID] stringValue]; 186 186 ASSERT_NOT_REACHED(); 187 return emptyAtom ();187 return emptyAtom; 188 188 } 189 189 … … 200 200 NSArray *titles = [AVMetadataItem metadataItemsFromArray:commonMetadata withKey:AVMetadataCommonKeyTitle keySpace:AVMetadataKeySpaceCommon]; 201 201 if (![titles count]) 202 return emptyAtom ();202 return emptyAtom; 203 203 204 204 // If possible, return a title in one of the user's preferred languages. … … 217 217 218 218 ASSERT_NOT_REACHED(); 219 return emptyAtom ();219 return emptyAtom; 220 220 } 221 221 -
trunk/Source/WebCore/platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h
r219178 r219199 42 42 class InbandMetadataTextTrackPrivateAVF : public InbandTextTrackPrivate { 43 43 public: 44 static Ref<InbandMetadataTextTrackPrivateAVF> create(Kind, CueFormat, const AtomicString& id = emptyAtom ());44 static Ref<InbandMetadataTextTrackPrivateAVF> create(Kind, CueFormat, const AtomicString& id = emptyAtom); 45 45 46 46 ~InbandMetadataTextTrackPrivateAVF(); -
trunk/Source/WebCore/platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp
r219191 r219199 141 141 { 142 142 if (!m_mediaSelectionOption) 143 return emptyAtom ();143 return emptyAtom; 144 144 145 145 RetainPtr<CFStringRef> title; … … 148 148 RetainPtr<CFArrayRef> titles = adoptCF(AVCFMetadataItemCopyItemsWithKeyAndKeySpace(commonMetaData.get(), AVCFMetadataCommonKeyTitle, AVCFMetadataKeySpaceCommon)); 149 149 if (!titles) 150 return emptyAtom ();150 return emptyAtom; 151 151 152 152 CFIndex titlesCount = CFArrayGetCount(titles.get()); 153 153 if (!titlesCount) 154 return emptyAtom ();154 return emptyAtom; 155 155 156 156 // If possible, return a title in one of the user's preferred languages. … … 168 168 } 169 169 170 return title ? AtomicString(title.get()) : emptyAtom ();170 return title ? AtomicString(title.get()) : emptyAtom; 171 171 } 172 172 … … 174 174 { 175 175 if (!m_mediaSelectionOption) 176 return emptyAtom ();176 return emptyAtom; 177 177 178 178 RetainPtr<CFLocaleRef> locale = adoptCF(AVCFMediaSelectionOptionCopyLocale(mediaSelectionOption())); 179 179 if (!locale) 180 return emptyAtom ();180 return emptyAtom; 181 181 182 182 return CFLocaleGetIdentifier(locale.get()); -
trunk/Source/WebCore/platform/graphics/avfoundation/cf/InbandTextTrackPrivateLegacyAVCF.cpp
r219191 r219199 87 87 { 88 88 if (!m_playerItemTrack) 89 return emptyAtom ();89 return emptyAtom; 90 90 91 91 RetainPtr<CFStringRef> title; … … 110 110 } 111 111 112 return title ? AtomicString(title.get()) : emptyAtom ();112 return title ? AtomicString(title.get()) : emptyAtom; 113 113 } 114 114 … … 116 116 { 117 117 if (!m_playerItemTrack) 118 return emptyAtom ();118 return emptyAtom; 119 119 120 120 RetainPtr<AVCFAssetTrackRef> assetTrack = adoptCF(AVCFPlayerItemTrackCopyAssetTrack(m_playerItemTrack.get())); -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm
r219191 r219199 167 167 { 168 168 if (!m_mediaSelectionOption) 169 return emptyAtom ();169 return emptyAtom; 170 170 171 171 NSString *title = 0; … … 182 182 } 183 183 184 return title ? AtomicString(title) : emptyAtom ();184 return title ? AtomicString(title) : emptyAtom; 185 185 } 186 186 … … 188 188 { 189 189 if (!m_mediaSelectionOption) 190 return emptyAtom ();190 return emptyAtom; 191 191 192 192 return [[m_mediaSelectionOption.get() locale] localeIdentifier]; -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm
r219191 r219199 98 98 { 99 99 if (!m_playerItemTrack) 100 return emptyAtom ();100 return emptyAtom; 101 101 102 102 NSString *title = 0; … … 113 113 } 114 114 115 return title ? AtomicString(title) : emptyAtom ();115 return title ? AtomicString(title) : emptyAtom; 116 116 } 117 117 … … 119 119 { 120 120 if (!m_playerItemTrack) 121 return emptyAtom ();121 return emptyAtom; 122 122 123 123 NSString *languageCode = [[m_playerItemTrack assetTrack] languageCode]; -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
r219178 r219199 3114 3114 return id3Metadata; 3115 3115 3116 return emptyAtom ();3116 return emptyAtom; 3117 3117 } 3118 3118 … … 3152 3152 end = start + toMediaTime(item.duration); 3153 3153 3154 AtomicString type = nullAtom ();3154 AtomicString type = nullAtom; 3155 3155 if (item.keySpace) 3156 3156 type = metadataType(item.keySpace); -
trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp
r219178 r219199 1401 1401 } 1402 1402 1403 return nullAtom ();1404 } 1405 1406 } 1403 return nullAtom; 1404 } 1405 1406 } -
trunk/Source/WebCore/platform/graphics/cocoa/FontDescriptionCocoa.cpp
r219178 r219199 345 345 } 346 346 ASSERT_NOT_REACHED(); 347 return nullAtom ();348 } 349 350 } 351 352 #endif 353 347 return nullAtom; 348 } 349 350 } 351 352 #endif 353 -
trunk/Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp
r219178 r219199 388 388 const AtomicString& FontCache::platformAlternateFamilyName(const AtomicString&) 389 389 { 390 return nullAtom ();391 } 392 393 } 390 return nullAtom; 391 } 392 393 } -
trunk/Source/WebCore/platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h
r219178 r219199 34 34 class InbandMetadataTextTrackPrivateGStreamer : public InbandTextTrackPrivate { 35 35 public: 36 static Ref<InbandMetadataTextTrackPrivateGStreamer> create(Kind kind, CueFormat cueFormat, const AtomicString& id = emptyAtom ())36 static Ref<InbandMetadataTextTrackPrivateGStreamer> create(Kind kind, CueFormat cueFormat, const AtomicString& id = emptyAtom) 37 37 { 38 38 return adoptRef(*new InbandMetadataTextTrackPrivateGStreamer(kind, cueFormat, id)); -
trunk/Source/WebCore/platform/graphics/win/FontCacheWin.cpp
r219178 r219199 678 678 break; 679 679 } 680 return nullAtom ();681 } 682 683 } 680 return nullAtom; 681 } 682 683 } -
trunk/Source/WebCore/platform/mediastream/AudioTrackPrivateMediaStream.h
r219178 r219199 44 44 AtomicString id() const override { return m_id; } 45 45 AtomicString label() const override { return m_label; } 46 AtomicString language() const override { return emptyAtom (); }46 AtomicString language() const override { return emptyAtom; } 47 47 int trackIndex() const override { return m_index; } 48 48 -
trunk/Source/WebCore/platform/mediastream/RealtimeMediaSourceSettings.cpp
r219178 r219199 73 73 return rightFacing(); 74 74 case RealtimeMediaSourceSettings::Unknown: 75 return emptyAtom ();75 return emptyAtom; 76 76 } 77 77 78 78 ASSERT_NOT_REACHED(); 79 return emptyAtom ();79 return emptyAtom; 80 80 } 81 81 -
trunk/Source/WebCore/platform/mediastream/VideoTrackPrivateMediaStream.h
r219178 r219199 60 60 AtomicString id() const final { return m_id; } 61 61 AtomicString label() const final { return m_label; } 62 AtomicString language() const final { return emptyAtom (); }62 AtomicString language() const final { return emptyAtom; } 63 63 int trackIndex() const final { return m_index; } 64 64 -
trunk/Source/WebCore/rendering/HitTestResult.cpp
r219178 r219199 789 789 auto* urlElement = URLElement(); 790 790 if (!is<HTMLAnchorElement>(urlElement)) 791 return nullAtom ();791 return nullAtom; 792 792 return ResourceResponse::sanitizeSuggestedFilename(urlElement->attributeWithoutSynchronization(HTMLNames::downloadAttr)); 793 793 } -
trunk/Source/WebCore/rendering/InlineTextBox.cpp
r219178 r219199 528 528 bool emphasisMarkAbove; 529 529 bool hasTextEmphasis = emphasisMarkExistsAndIsAbove(lineStyle, emphasisMarkAbove); 530 const AtomicString& emphasisMark = hasTextEmphasis ? lineStyle.textEmphasisMarkString() : nullAtom ();530 const AtomicString& emphasisMark = hasTextEmphasis ? lineStyle.textEmphasisMarkString() : nullAtom; 531 531 if (!emphasisMark.isEmpty()) 532 532 emphasisMarkOffset = emphasisMarkAbove ? -font.fontMetrics().ascent() - font.emphasisMarkDescent(emphasisMark) : font.fontMetrics().descent() + font.emphasisMarkAscent(emphasisMark); -
trunk/Source/WebCore/rendering/RenderListItem.cpp
r219178 r219199 459 459 if (m_marker) 460 460 return m_marker->text(); 461 return nullAtom ().string();461 return nullAtom.string(); 462 462 } 463 463 -
trunk/Source/WebCore/rendering/RenderText.cpp
r219178 r219199 1535 1535 1536 1536 StringImpl* textImpl = m_text.impl(); 1537 CachedTextBreakIterator iterator(StringView(textImpl->characters16(), textImpl->length()), TextBreakIterator::Mode::Caret, nullAtom ());1537 CachedTextBreakIterator iterator(StringView(textImpl->characters16(), textImpl->length()), TextBreakIterator::Mode::Caret, nullAtom); 1538 1538 auto result = iterator.preceding(current).value_or(current - 1); 1539 1539 return result; … … 1708 1708 1709 1709 StringImpl* textImpl = m_text.impl(); 1710 CachedTextBreakIterator iterator(StringView(textImpl->characters16(), textImpl->length()), TextBreakIterator::Mode::Caret, nullAtom ());1710 CachedTextBreakIterator iterator(StringView(textImpl->characters16(), textImpl->length()), TextBreakIterator::Mode::Caret, nullAtom); 1711 1711 auto result = iterator.following(current).value_or(current + 1); 1712 1712 return result; -
trunk/Source/WebCore/rendering/RenderTreeAsText.cpp
r219178 r219199 191 191 // FIXME: Temporary hack to make tests pass by simulating the old generated content output. 192 192 if (o.isPseudoElement() || (o.parent() && o.parent()->isPseudoElement())) 193 tagName = emptyAtom ();193 tagName = emptyAtom; 194 194 if (!tagName.isEmpty()) { 195 195 ts << " {" << tagName << "}"; -
trunk/Source/WebCore/rendering/TextPainter.cpp
r219178 r219199 126 126 if (paintStyle.paintOrder == PaintOrder::Normal) { 127 127 // FIXME: Truncate right-to-left text correctly. 128 paintTextWithShadows(shadow, *m_font, textRun, boxRect, textOrigin, startOffset, endOffset, nullAtom (), 0, paintStyle.strokeWidth > 0);128 paintTextWithShadows(shadow, *m_font, textRun, boxRect, textOrigin, startOffset, endOffset, nullAtom, 0, paintStyle.strokeWidth > 0); 129 129 } else { 130 130 bool paintShadow = true; … … 135 135 case PaintType::Fill: 136 136 m_context.setTextDrawingMode(textDrawingMode & ~TextModeStroke); 137 paintTextWithShadows(paintShadow ? shadow : nullptr, *m_font, textRun, boxRect, textOrigin, startOffset, endOffset, nullAtom (), 0, false);137 paintTextWithShadows(paintShadow ? shadow : nullptr, *m_font, textRun, boxRect, textOrigin, startOffset, endOffset, nullAtom, 0, false); 138 138 paintShadow = false; 139 139 m_context.setTextDrawingMode(textDrawingMode); … … 141 141 case PaintType::Stroke: 142 142 m_context.setTextDrawingMode(textDrawingMode & ~TextModeFill); 143 paintTextWithShadows(paintShadow ? shadow : nullptr, *m_font, textRun, boxRect, textOrigin, startOffset, endOffset, nullAtom (), 0, paintStyle.strokeWidth > 0);143 paintTextWithShadows(paintShadow ? shadow : nullptr, *m_font, textRun, boxRect, textOrigin, startOffset, endOffset, nullAtom, 0, paintStyle.strokeWidth > 0); 144 144 paintShadow = false; 145 145 m_context.setTextDrawingMode(textDrawingMode); -
trunk/Source/WebCore/rendering/style/RenderStyle.cpp
r219178 r219199 1331 1331 switch (textEmphasisMark()) { 1332 1332 case TextEmphasisMarkNone: 1333 return nullAtom ();1333 return nullAtom; 1334 1334 case TextEmphasisMarkCustom: 1335 1335 return textEmphasisCustomMark(); … … 1361 1361 case TextEmphasisMarkAuto: 1362 1362 ASSERT_NOT_REACHED(); 1363 return nullAtom ();1363 return nullAtom; 1364 1364 } 1365 1365 1366 1366 ASSERT_NOT_REACHED(); 1367 return nullAtom ();1367 return nullAtom; 1368 1368 } 1369 1369 -
trunk/Source/WebCore/rendering/style/RenderStyle.h
r219178 r219199 1523 1523 static short initialHyphenationLimitAfter() { return -1; } 1524 1524 static short initialHyphenationLimitLines() { return -1; } 1525 static const AtomicString& initialHyphenationString() { return nullAtom (); }1525 static const AtomicString& initialHyphenationString() { return nullAtom; } 1526 1526 static EBorderFit initialBorderFit() { return BorderFitBorder; } 1527 1527 static EResize initialResize() { return RESIZE_NONE; } … … 1550 1550 static TextEmphasisFill initialTextEmphasisFill() { return TextEmphasisFillFilled; } 1551 1551 static TextEmphasisMark initialTextEmphasisMark() { return TextEmphasisMarkNone; } 1552 static const AtomicString& initialTextEmphasisCustomMark() { return nullAtom (); }1552 static const AtomicString& initialTextEmphasisCustomMark() { return nullAtom; } 1553 1553 static TextEmphasisPosition initialTextEmphasisPosition() { return TextEmphasisPositionOver | TextEmphasisPositionRight; } 1554 1554 static RubyPosition initialRubyPosition() { return RubyPositionBefore; } … … 1563 1563 static PrintColorAdjust initialPrintColorAdjust() { return PrintColorAdjustEconomy; } 1564 1564 static QuotesData* initialQuotes() { return nullptr; } 1565 static const AtomicString& initialContentAltText() { return emptyAtom (); }1565 static const AtomicString& initialContentAltText() { return emptyAtom; } 1566 1566 1567 1567 #if ENABLE(CSS3_TEXT) … … 1638 1638 static unsigned initialTabSize() { return 8; } 1639 1639 1640 static const AtomicString& initialLineGrid() { return nullAtom (); }1640 static const AtomicString& initialLineGrid() { return nullAtom; } 1641 1641 static LineSnap initialLineSnap() { return LineSnapNone; } 1642 1642 static LineAlign initialLineAlign() { return LineAlignNone; } 1643 1643 1644 static const AtomicString& initialFlowThread() { return nullAtom (); }1645 static const AtomicString& initialRegionThread() { return nullAtom (); }1644 static const AtomicString& initialFlowThread() { return nullAtom; } 1645 static const AtomicString& initialRegionThread() { return nullAtom; } 1646 1646 static RegionFragment initialRegionFragment() { return AutoRegionFragment; } 1647 1647 -
trunk/Source/WebCore/style/StyleScope.cpp
r219178 r219199 333 333 } 334 334 if (!linkElement.sheet()) 335 title = nullAtom ();335 title = nullAtom; 336 336 } 337 337 // Get the current preferred styleset. This is the -
trunk/Source/WebCore/svg/SVGElement.cpp
r219178 r219199 1033 1033 return 0; 1034 1034 1035 QualifiedName attributeName(nullAtom (), name, nullAtom());1035 QualifiedName attributeName(nullAtom, name, nullAtom); 1036 1036 const Attribute* attribute = findAttributeByName(attributeName); 1037 1037 if (!attribute) -
trunk/Source/WebCore/svg/SVGElement.h
r219178 r219199 219 219 { 220 220 if (key.hasPrefix()) { 221 QualifiedNameComponents components = { nullAtom ().impl(), key.localName().impl(), key.namespaceURI().impl() };221 QualifiedNameComponents components = { nullAtom.impl(), key.localName().impl(), key.namespaceURI().impl() }; 222 222 return hashComponents(components); 223 223 } -
trunk/Source/WebCore/svg/SVGUseElement.cpp
r219178 r219199 143 143 // values will override the corresponding attributes on the 'svg' in the generated tree. 144 144 SVGElement* correspondingElement = shadowElement.correspondingElement(); 145 shadowElement.setAttribute(SVGNames::widthAttr, (widthIsValid() && width().valueInSpecifiedUnits()) ? AtomicString(width().valueAsString()) : (correspondingElement ? correspondingElement->getAttribute(SVGNames::widthAttr) : nullAtom ()));146 shadowElement.setAttribute(SVGNames::heightAttr, (heightIsValid() && height().valueInSpecifiedUnits()) ? AtomicString(height().valueAsString()) : (correspondingElement ? correspondingElement->getAttribute(SVGNames::heightAttr) : nullAtom ()));145 shadowElement.setAttribute(SVGNames::widthAttr, (widthIsValid() && width().valueInSpecifiedUnits()) ? AtomicString(width().valueAsString()) : (correspondingElement ? correspondingElement->getAttribute(SVGNames::widthAttr) : nullAtom)); 146 shadowElement.setAttribute(SVGNames::heightAttr, (heightIsValid() && height().valueInSpecifiedUnits()) ? AtomicString(height().valueAsString()) : (correspondingElement ? correspondingElement->getAttribute(SVGNames::heightAttr) : nullAtom)); 147 147 } 148 148 } -
trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp
r219178 r219199 217 217 218 218 if (prefix.isNull()) 219 return { nullAtom (), localName, nullAtom()};219 return { nullAtom, localName, nullAtom }; 220 220 221 221 auto namespaceURI = lookupNamespaceURI(prefix); … … 223 223 return anyQName(); 224 224 225 return { nullAtom (), localName, namespaceURI };225 return { nullAtom, localName, namespaceURI }; 226 226 } 227 227 -
trunk/Source/WebCore/testing/MockCDMFactory.cpp
r219178 r219199 270 270 MockCDMFactory* factory = m_cdm ? m_cdm->factory() : nullptr; 271 271 if (!factory) { 272 callback(SharedBuffer::create(), emptyAtom (), false, SuccessValue::Failed);272 callback(SharedBuffer::create(), emptyAtom, false, SuccessValue::Failed); 273 273 return; 274 274 } -
trunk/Source/WebCore/xml/XMLErrors.cpp
r219178 r219199 90 90 static inline Ref<Element> createXHTMLParserErrorHeader(Document& document, const String& errorMessages) 91 91 { 92 Ref<Element> reportElement = document.createElement(QualifiedName(nullAtom (), "parsererror", xhtmlNamespaceURI), true);92 Ref<Element> reportElement = document.createElement(QualifiedName(nullAtom, "parsererror", xhtmlNamespaceURI), true); 93 93 94 94 Vector<Attribute> reportAttributes; -
trunk/Source/WebCore/xml/XPathStep.cpp
r219178 r219199 185 185 return false; 186 186 187 if (name == starAtom ())187 if (name == starAtom) 188 188 return namespaceURI.isEmpty() || node.namespaceURI() == namespaceURI; 189 189 … … 199 199 return false; 200 200 201 if (name == starAtom ())201 if (name == starAtom) 202 202 return namespaceURI.isEmpty() || namespaceURI == node.namespaceURI(); 203 203 … … 343 343 344 344 // Avoid lazily creating attribute nodes for attributes that we do not need anyway. 345 if (m_nodeTest.m_kind == NodeTest::NameTest && m_nodeTest.m_data != starAtom ()) {345 if (m_nodeTest.m_kind == NodeTest::NameTest && m_nodeTest.m_data != starAtom) { 346 346 auto attr = contextElement.getAttributeNodeNS(m_nodeTest.m_namespaceURI, m_nodeTest.m_data); 347 347 if (attr && attr->namespaceURI() != XMLNSNames::xmlnsNamespaceURI) { // In XPath land, namespace nodes are not accessible on the attribute axis. -
trunk/Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp
r219178 r219199 601 601 if (element->hasAttributes()) { 602 602 for (const Attribute& attribute : element->attributesIterator()) { 603 if (attribute.localName() == xmlnsAtom ())603 if (attribute.localName() == xmlnsAtom) 604 604 m_defaultNamespaceURI = attribute.value(); 605 else if (attribute.prefix() == xmlnsAtom ())605 else if (attribute.prefix() == xmlnsAtom) 606 606 m_prefixToNamespaceMap.set(attribute.localName(), attribute.value()); 607 607 } … … 696 696 xmlSAX2Namespace* namespaces = reinterpret_cast<xmlSAX2Namespace*>(libxmlNamespaces); 697 697 for (int i = 0; i < numNamespaces; i++) { 698 AtomicString namespaceQName = xmlnsAtom ();698 AtomicString namespaceQName = xmlnsAtom; 699 699 AtomicString namespaceURI = toAtomicString(namespaces[i].uri); 700 700 if (namespaces[i].prefix) … … 726 726 AtomicString attrValue = toAtomicString(attributes[i].value, valueLength); 727 727 String attrPrefix = toString(attributes[i].prefix); 728 AtomicString attrURI = attrPrefix.isEmpty() ? nullAtom (): toAtomicString(attributes[i].uri);728 AtomicString attrURI = attrPrefix.isEmpty() ? nullAtom : toAtomicString(attributes[i].uri); 729 729 AtomicString attrQName = attrPrefix.isEmpty() ? toAtomicString(attributes[i].localname) : attrPrefix + ":" + toString(attributes[i].localname); 730 730 -
trunk/Source/WebKit/mac/ChangeLog
r219191 r219199 1 2017-07-06 Matt Lewis <jlewis3@apple.com> 2 3 Unreviewed, rolling out r219178. 4 5 This caused a consistent failure with the API test 6 StringBuilderTest.ToAtomicStringOnEmpty on all Debug testers. 7 8 Reverted changeset: 9 10 "[WTF] Clean up StringStatics.cpp by using 11 LazyNeverDestroyed<> for Atoms" 12 https://bugs.webkit.org/show_bug.cgi?id=174150 13 http://trac.webkit.org/changeset/219178 14 1 15 2017-07-05 Don Olmstead <don.olmstead@sony.com> 2 16 -
trunk/Source/WebKit/mac/DOM/DOM.mm
r219178 r219199 165 165 // Do a special lookup to ignore element prefixes 166 166 if (tag.hasPrefix()) 167 return elementClassMap->get(QualifiedName(nullAtom (), tag.localName(), tag.namespaceURI()).impl());167 return elementClassMap->get(QualifiedName(nullAtom, tag.localName(), tag.namespaceURI()).impl()); 168 168 169 169 return elementClassMap->get(tag.impl()); -
trunk/Tools/ChangeLog
r219197 r219199 1 2017-07-06 Matt Lewis <jlewis3@apple.com> 2 3 Unreviewed, rolling out r219178. 4 5 This caused a consistent failure with the API test 6 StringBuilderTest.ToAtomicStringOnEmpty on all Debug testers. 7 8 Reverted changeset: 9 10 "[WTF] Clean up StringStatics.cpp by using 11 LazyNeverDestroyed<> for Atoms" 12 https://bugs.webkit.org/show_bug.cgi?id=174150 13 http://trac.webkit.org/changeset/219178 14 1 15 2017-07-06 Alicia Boya García <aboya@igalia.com> 2 16 -
trunk/Tools/TestWebKitAPI/Tests/WTF/StringBuilder.cpp
r219178 r219199 294 294 StringBuilder builder; 295 295 AtomicString atomicString = builder.toAtomicString(); 296 ASSERT_EQ(emptyAtom (), atomicString);296 ASSERT_EQ(emptyAtom, atomicString); 297 297 } 298 298 { // With capacity. … … 300 300 builder.reserveCapacity(64); 301 301 AtomicString atomicString = builder.toAtomicString(); 302 ASSERT_EQ(emptyAtom (), atomicString);302 ASSERT_EQ(emptyAtom, atomicString); 303 303 } 304 304 { // AtomicString constructed from a null string. … … 306 306 builder.append(String()); 307 307 AtomicString atomicString = builder.toAtomicString(); 308 ASSERT_EQ(emptyAtom (), atomicString);308 ASSERT_EQ(emptyAtom, atomicString); 309 309 } 310 310 { // AtomicString constructed from an empty string. … … 312 312 builder.append(emptyString()); 313 313 AtomicString atomicString = builder.toAtomicString(); 314 ASSERT_EQ(emptyAtom (), atomicString);314 ASSERT_EQ(emptyAtom, atomicString); 315 315 } 316 316 { // AtomicString constructed from an empty StringBuilder. … … 319 319 builder.append(emptyBuilder); 320 320 AtomicString atomicString = builder.toAtomicString(); 321 ASSERT_EQ(emptyAtom (), atomicString);321 ASSERT_EQ(emptyAtom, atomicString); 322 322 } 323 323 { // AtomicString constructed from an empty char* string. … … 325 325 builder.append("", 0); 326 326 AtomicString atomicString = builder.toAtomicString(); 327 ASSERT_EQ(emptyAtom (), atomicString);327 ASSERT_EQ(emptyAtom, atomicString); 328 328 } 329 329 { // Cleared StringBuilder. … … 332 332 builder.clear(); 333 333 AtomicString atomicString = builder.toAtomicString(); 334 ASSERT_EQ(emptyAtom (), atomicString);334 ASSERT_EQ(emptyAtom, atomicString); 335 335 } 336 336 }
Note: See TracChangeset
for help on using the changeset viewer.