Summary: | Tidy up the remaining bits of the AtomicString to AtomString rename | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Darin Adler <darin> | ||||||
Component: | WebCore Misc. | Assignee: | Darin Adler <darin> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | dbates, mcatanzaro, mitz, sam, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Darin Adler
2019-06-18 21:11:57 PDT
Created attachment 372426 [details]
Patch
Created attachment 372427 [details]
Patch
Passes all the tests, so ready to go Comment on attachment 372427 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=372427&action=review > Source/WTF/wtf/text/AtomString.h:-180 > -using AtomicString = AtomString; Ah you got rid of it already! That was quick. > Source/WTF/wtf/text/AtomStringImpl.h:52 > if (!string) > - return static_cast<AtomStringImpl*>(string); > + return nullptr; Good cleanup. > Source/WTF/wtf/text/StringImpl.h:211 > enum StringKind { > StringNormal = 0u, // non-symbol, non-atomic > - StringAtomic = s_hashFlagStringKindIsAtomic, // non-symbol, atomic > + StringAtomic = s_hashFlagStringKindIsAtom, // non-symbol, atomic > StringSymbol = s_hashFlagStringKindIsSymbol, // symbol, non-atomic > }; Missed some spots here! I found a few more things I missed, so after I land this, I’ll return to these: AtomicHTMLToken WebCore/css/StyleSheetContents.cpp: // The assumption is that nearly all of of them are atomic and would exist anyway. WebCore/dom/ContainerNode.cpp: return ensureRareData().ensureNodeLists().addCacheWithAtomicName<NameNodeList>(*this, elementName); WebCore/dom/ContainerNode.cpp: return ensureRareData().ensureNodeLists().addCacheWithAtomicName<RadioNodeList>(*this, name); WebCore/dom/Element.h: // A fast function for checking the local name against another atomic string. WebCore/dom/NameNodeList.cpp: ownerNode().nodeLists()->removeCacheWithAtomicName(this, m_name); WebCore/dom/Node.cpp: for (auto& atomicName : m_atomicNameCaches) WebCore/dom/Node.cpp: atomicName.value->invalidateCache(); WebCore/dom/Node.cpp: for (auto& atomicName : m_atomicNameCaches) WebCore/dom/Node.cpp: atomicName.value->invalidateCacheForAttribute(attrName); WebCore/dom/NodeRareData.h: typedef HashMap<std::pair<unsigned char, AtomString>, LiveNodeList*, NodeListCacheMapEntryHash> NodeListAtomicNameCacheMap; WebCore/dom/NodeRareData.h: ALWAYS_INLINE Ref<T> addCacheWithAtomicName(ContainerType& container, const AtomString& name) WebCore/dom/NodeRareData.h: NodeListAtomicNameCacheMap::AddResult result = m_atomicNameCaches.fastAdd(namedNodeListKey<T>(name), nullptr); WebCore/dom/NodeRareData.h: void removeCacheWithAtomicName(NodeListType* list, const AtomString& name = starAtom()) WebCore/dom/NodeRareData.h: ASSERT(list == m_atomicNameCaches.get(namedNodeListKey<NodeListType>(name))); WebCore/dom/NodeRareData.h: m_atomicNameCaches.remove(namedNodeListKey<NodeListType>(name)); WebCore/dom/NodeRareData.h: for (auto& cache : m_atomicNameCaches.values()) WebCore/dom/NodeRareData.h: NodeListAtomicNameCacheMap m_atomicNameCaches; WebCore/dom/NodeRareData.h: if ((m_childNodeList ? 1 : 0) + (m_emptyChildNodeList ? 1 : 0) + m_atomicNameCaches.size() WebCore/dom/TreeScope.cpp: if (RefPtr<AtomStringImpl> atomicElementId = AtomStringImpl::lookUp(elementId.impl())) WebCore/dom/TreeScope.cpp: return m_elementsById->getElementById(*atomicElementId, *this); WebCore/dom/TreeScope.cpp: if (auto atomicElementId = elementId.toExistingAtomString()) WebCore/dom/TreeScope.cpp: return m_elementsById->getElementById(*atomicElementId, *this); WebCore/html/LabelableElement.cpp: return ensureRareData().ensureNodeLists().addCacheWithAtomicName<LabelsNodeList>(*this, starAtom()); WebCore/html/LabelsNodeList.cpp: ownerNode().nodeLists()->removeCacheWithAtomicName(this, starAtom()); WebCore/html/RadioNodeList.cpp: ownerNode().nodeLists()->removeCacheWithAtomicName(this, m_name); WebCore/html/parser/HTMLDocumentParser.cpp: // We clear the rawToken in case constructTreeFromAtomicToken WebCore/loader/appcache/ApplicationCacheStorage.cpp: // Save memory by putting the header names into atomic strings so each is stored only once, WebCore/loader/appcache/ApplicationCacheStorage.cpp: // even though the setHTTPHeaderField function does not require an atomic string. WebCore/platform/text/TextEncoding.cpp: : m_name(atomicCanonicalTextEncodingName(name)) WebCore/platform/text/TextEncoding.cpp: : m_name(atomicCanonicalTextEncodingName(name)) WebCore/platform/text/TextEncoding.cpp: static const char* const a = atomicCanonicalTextEncodingName("windows-949"); WebCore/platform/text/TextEncoding.cpp: static const char* const a = atomicCanonicalTextEncodingName("ISO-8859-8"); WebCore/platform/text/TextEncodingRegistry.cpp: const char* atomicName = textEncodingNameMap->get(name); WebCore/platform/text/TextEncodingRegistry.cpp: ASSERT(strcmp(alias, name) == 0 || atomicName); WebCore/platform/text/TextEncodingRegistry.cpp: if (!atomicName) WebCore/platform/text/TextEncodingRegistry.cpp: atomicName = name; WebCore/platform/text/TextEncodingRegistry.cpp: ASSERT_WITH_MESSAGE(!textEncodingNameMap->get(alias), "Duplicate text encoding name %s for %s (previously registered as %s)", alias, atomicName, textEncodingNameMap->get(alias)); WebCore/platform/text/TextEncodingRegistry.cpp: textEncodingNameMap->add(alias, atomicName); WebCore/platform/text/TextEncodingRegistry.cpp: const char* atomicName = textEncodingNameMap->get(name); WebCore/platform/text/TextEncodingRegistry.cpp: ASSERT(atomicName); WebCore/platform/text/TextEncodingRegistry.cpp: textCodecMap->add(atomicName, WTFMove(function)); WebCore/platform/text/TextEncodingRegistry.cpp: auto* atomicName = textEncodingNameMap->get(nameFromBlacklist); WebCore/platform/text/TextEncodingRegistry.cpp: if (!atomicName) WebCore/platform/text/TextEncodingRegistry.cpp: if (entry.value == atomicName) WebCore/platform/text/TextEncodingRegistry.cpp: textCodecMap->remove(atomicName); WebCore/platform/text/TextEncodingRegistry.cpp: // We must not use atomicCanonicalTextEncodingName() because this function is called in it. WebCore/platform/text/TextEncodingRegistry.cpp: const char* atomicName = textEncodingNameMap->get(name); WebCore/platform/text/TextEncodingRegistry.cpp: if (atomicName) WebCore/platform/text/TextEncodingRegistry.cpp: set->add(atomicName); WebCore/platform/text/TextEncodingRegistry.cpp:const char* atomicCanonicalTextEncodingName(const char* name) WebCore/platform/text/TextEncodingRegistry.cpp: if (const char* atomicName = textEncodingNameMap->get(name)) WebCore/platform/text/TextEncodingRegistry.cpp: if (atomicName) WebCore/platform/text/TextEncodingRegistry.cpp: set->add(atomicName); WebCore/platform/text/TextEncodingRegistry.cpp:const char* atomicCanonicalTextEncodingName(const char* name) WebCore/platform/text/TextEncodingRegistry.cpp: if (const char* atomicName = textEncodingNameMap->get(name)) WebCore/platform/text/TextEncodingRegistry.cpp: return atomicName; WebCore/platform/text/TextEncodingRegistry.cpp:template<typename CharacterType> static const char* atomicCanonicalTextEncodingName(const CharacterType* characters, size_t length) WebCore/platform/text/TextEncodingRegistry.cpp: return atomicCanonicalTextEncodingName(buffer); WebCore/platform/text/TextEncodingRegistry.cpp:const char* atomicCanonicalTextEncodingName(const String& alias) WebCore/platform/text/TextEncodingRegistry.cpp: return atomicCanonicalTextEncodingName(alias.characters8(), alias.length()); WebCore/platform/text/TextEncodingRegistry.cpp: return atomicCanonicalTextEncodingName(alias.characters16(), alias.length()); WebCore/platform/text/TextEncodingRegistry.h:const char* atomicCanonicalTextEncodingName(const char* alias); WebCore/platform/text/TextEncodingRegistry.h:const char* atomicCanonicalTextEncodingName(const String&); WebCore/xml/XPathFunctions.cpp:static AtomString atomicSubstring(StringBuilder& builder, unsigned start, unsigned length) WebCore/xml/XPathFunctions.cpp: Node* node = contextScope.getElementById(atomicSubstring(idList, startPos, endPos - startPos)); WebKitLegacy/win/AccessibleBase.cpp: AtomString keyAtomic(key, ::SysStringLen(key)); WebKitLegacy/win/AccessibleBase.cpp: accessibilityAttributeValue(keyAtomic, value); Committed r246636: <https://trac.webkit.org/changeset/246636> |