Title: [292874] trunk/Source/WebCore
Revision
292874
Author
cdu...@apple.com
Date
2022-04-14 10:07:18 -0700 (Thu, 14 Apr 2022)

Log Message

Update ContainerNode::getElementsByName() to take in an AtomString
https://bugs.webkit.org/show_bug.cgi?id=239333

Reviewed by Alexey Shvayka.

Update ContainerNode::getElementsByName() to take in an AtomString instead of a String.
Its implementation ends up atomizing the name anyway.

* dom/ContainerNode.cpp:
(WebCore::ContainerNode::getElementsByName):
* dom/ContainerNode.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (292873 => 292874)


--- trunk/Source/WebCore/ChangeLog	2022-04-14 16:39:48 UTC (rev 292873)
+++ trunk/Source/WebCore/ChangeLog	2022-04-14 17:07:18 UTC (rev 292874)
@@ -1,3 +1,17 @@
+2022-04-14  Chris Dumez  <cdu...@apple.com>
+
+        Update ContainerNode::getElementsByName() to take in an AtomString
+        https://bugs.webkit.org/show_bug.cgi?id=239333
+
+        Reviewed by Alexey Shvayka.
+
+        Update ContainerNode::getElementsByName() to take in an AtomString instead of a String.
+        Its implementation ends up atomizing the name anyway.
+
+        * dom/ContainerNode.cpp:
+        (WebCore::ContainerNode::getElementsByName):
+        * dom/ContainerNode.h:
+
 2022-04-14  Youenn Fablet  <you...@apple.com>
 
         Add logging for persistent notification event handler failure

Modified: trunk/Source/WebCore/dom/ContainerNode.cpp (292873 => 292874)


--- trunk/Source/WebCore/dom/ContainerNode.cpp	2022-04-14 16:39:48 UTC (rev 292873)
+++ trunk/Source/WebCore/dom/ContainerNode.cpp	2022-04-14 17:07:18 UTC (rev 292874)
@@ -947,7 +947,7 @@
     return ensureRareData().ensureNodeLists().addCachedTagCollectionNS(*this, namespaceURI.isEmpty() ? nullAtom() : namespaceURI, localName);
 }
 
-Ref<NodeList> ContainerNode::getElementsByName(const String& elementName)
+Ref<NodeList> ContainerNode::getElementsByName(const AtomString& elementName)
 {
     return ensureRareData().ensureNodeLists().addCacheWithAtomName<NameNodeList>(*this, elementName);
 }

Modified: trunk/Source/WebCore/dom/ContainerNode.h (292873 => 292874)


--- trunk/Source/WebCore/dom/ContainerNode.h	2022-04-14 16:39:48 UTC (rev 292873)
+++ trunk/Source/WebCore/dom/ContainerNode.h	2022-04-14 17:07:18 UTC (rev 292874)
@@ -140,7 +140,7 @@
 
     WEBCORE_EXPORT Ref<HTMLCollection> getElementsByTagName(const AtomString&);
     WEBCORE_EXPORT Ref<HTMLCollection> getElementsByTagNameNS(const AtomString& namespaceURI, const AtomString& localName);
-    WEBCORE_EXPORT Ref<NodeList> getElementsByName(const String& elementName);
+    WEBCORE_EXPORT Ref<NodeList> getElementsByName(const AtomString& elementName);
     WEBCORE_EXPORT Ref<HTMLCollection> getElementsByClassName(const AtomString& classNames);
     Ref<RadioNodeList> radioNodeList(const AtomString&);
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to