<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[173649] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/173649">173649</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2014-09-15 22:36:37 -0700 (Mon, 15 Sep 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Rename LiveNodeLists / HTMLCollections's nodeMatches() to elementMatches()
https://bugs.webkit.org/show_bug.cgi?id=136844

Reviewed by Sam Weinig.

Rename LiveNodeLists / HTMLCollections's nodeMatches() to elementMatches()
for clarity as the argument is an Element.

No new tests, no behavior change.

* dom/ClassNodeList.h:
(WebCore::ClassNodeList::elementMatches):
(WebCore::ClassNodeList::nodeMatches): Deleted.
* dom/DocumentOrderedMap.cpp:
(WebCore::keyMatchesWindowNamedItem):
(WebCore::keyMatchesDocumentNamedItem):
* dom/Element.cpp:
(WebCore::Element::updateNameForDocument):
(WebCore::Element::updateIdForDocument):
* dom/LiveNodeList.cpp:
(WebCore::LiveNodeList::namedItem):
* dom/LiveNodeList.h:
(WebCore::CachedLiveNodeList&lt;NodeListType&gt;::collectionBegin):
(WebCore::CachedLiveNodeList&lt;NodeListType&gt;::collectionLast):
(WebCore::CachedLiveNodeList&lt;NodeListType&gt;::collectionTraverseForward):
(WebCore::CachedLiveNodeList&lt;NodeListType&gt;::collectionTraverseBackward):
* dom/NameNodeList.h:
(WebCore::NameNodeList::elementMatches):
(WebCore::NameNodeList::nodeMatches): Deleted.
* dom/TagNodeList.h:
(WebCore::TagNodeList::elementMatches):
(WebCore::HTMLTagNodeList::elementMatches):
(WebCore::TagNodeList::nodeMatches): Deleted.
(WebCore::HTMLTagNodeList::nodeMatches): Deleted.
* html/HTMLCollection.cpp:
(WebCore::isMatchingElement):
* html/HTMLNameCollection.cpp:
(WebCore::WindowNameCollection::elementMatchesIfNameAttributeMatch):
(WebCore::WindowNameCollection::elementMatches):
(WebCore::DocumentNameCollection::elementMatchesIfIdAttributeMatch):
(WebCore::DocumentNameCollection::elementMatchesIfNameAttributeMatch):
(WebCore::DocumentNameCollection::elementMatches):
(WebCore::WindowNameCollection::nodeMatchesIfNameAttributeMatch): Deleted.
(WebCore::WindowNameCollection::nodeMatches): Deleted.
(WebCore::DocumentNameCollection::nodeMatchesIfIdAttributeMatch): Deleted.
(WebCore::DocumentNameCollection::nodeMatchesIfNameAttributeMatch): Deleted.
(WebCore::DocumentNameCollection::nodeMatches): Deleted.
* html/HTMLNameCollection.h:
* html/LabelsNodeList.cpp:
(WebCore::LabelsNodeList::elementMatches):
(WebCore::LabelsNodeList::nodeMatches): Deleted.
* html/LabelsNodeList.h:
* html/RadioNodeList.cpp:
(WebCore::RadioNodeList::elementMatches):
(WebCore::RadioNodeList::nodeMatches): Deleted.
* html/RadioNodeList.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoredomClassNodeListh">trunk/Source/WebCore/dom/ClassNodeList.h</a></li>
<li><a href="#trunkSourceWebCoredomDocumentOrderedMapcpp">trunk/Source/WebCore/dom/DocumentOrderedMap.cpp</a></li>
<li><a href="#trunkSourceWebCoredomElementcpp">trunk/Source/WebCore/dom/Element.cpp</a></li>
<li><a href="#trunkSourceWebCoredomLiveNodeListcpp">trunk/Source/WebCore/dom/LiveNodeList.cpp</a></li>
<li><a href="#trunkSourceWebCoredomLiveNodeListh">trunk/Source/WebCore/dom/LiveNodeList.h</a></li>
<li><a href="#trunkSourceWebCoredomNameNodeListh">trunk/Source/WebCore/dom/NameNodeList.h</a></li>
<li><a href="#trunkSourceWebCoredomTagNodeListh">trunk/Source/WebCore/dom/TagNodeList.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLCollectioncpp">trunk/Source/WebCore/html/HTMLCollection.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLNameCollectioncpp">trunk/Source/WebCore/html/HTMLNameCollection.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLNameCollectionh">trunk/Source/WebCore/html/HTMLNameCollection.h</a></li>
<li><a href="#trunkSourceWebCorehtmlLabelsNodeListcpp">trunk/Source/WebCore/html/LabelsNodeList.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlLabelsNodeListh">trunk/Source/WebCore/html/LabelsNodeList.h</a></li>
<li><a href="#trunkSourceWebCorehtmlRadioNodeListcpp">trunk/Source/WebCore/html/RadioNodeList.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlRadioNodeListh">trunk/Source/WebCore/html/RadioNodeList.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (173648 => 173649)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-09-16 04:09:58 UTC (rev 173648)
+++ trunk/Source/WebCore/ChangeLog        2014-09-16 05:36:37 UTC (rev 173649)
</span><span class="lines">@@ -1,5 +1,64 @@
</span><span class="cx"> 2014-09-15  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Rename LiveNodeLists / HTMLCollections's nodeMatches() to elementMatches()
+        https://bugs.webkit.org/show_bug.cgi?id=136844
+
+        Reviewed by Sam Weinig.
+
+        Rename LiveNodeLists / HTMLCollections's nodeMatches() to elementMatches()
+        for clarity as the argument is an Element.
+
+        No new tests, no behavior change.
+
+        * dom/ClassNodeList.h:
+        (WebCore::ClassNodeList::elementMatches):
+        (WebCore::ClassNodeList::nodeMatches): Deleted.
+        * dom/DocumentOrderedMap.cpp:
+        (WebCore::keyMatchesWindowNamedItem):
+        (WebCore::keyMatchesDocumentNamedItem):
+        * dom/Element.cpp:
+        (WebCore::Element::updateNameForDocument):
+        (WebCore::Element::updateIdForDocument):
+        * dom/LiveNodeList.cpp:
+        (WebCore::LiveNodeList::namedItem):
+        * dom/LiveNodeList.h:
+        (WebCore::CachedLiveNodeList&lt;NodeListType&gt;::collectionBegin):
+        (WebCore::CachedLiveNodeList&lt;NodeListType&gt;::collectionLast):
+        (WebCore::CachedLiveNodeList&lt;NodeListType&gt;::collectionTraverseForward):
+        (WebCore::CachedLiveNodeList&lt;NodeListType&gt;::collectionTraverseBackward):
+        * dom/NameNodeList.h:
+        (WebCore::NameNodeList::elementMatches):
+        (WebCore::NameNodeList::nodeMatches): Deleted.
+        * dom/TagNodeList.h:
+        (WebCore::TagNodeList::elementMatches):
+        (WebCore::HTMLTagNodeList::elementMatches):
+        (WebCore::TagNodeList::nodeMatches): Deleted.
+        (WebCore::HTMLTagNodeList::nodeMatches): Deleted.
+        * html/HTMLCollection.cpp:
+        (WebCore::isMatchingElement):
+        * html/HTMLNameCollection.cpp:
+        (WebCore::WindowNameCollection::elementMatchesIfNameAttributeMatch):
+        (WebCore::WindowNameCollection::elementMatches):
+        (WebCore::DocumentNameCollection::elementMatchesIfIdAttributeMatch):
+        (WebCore::DocumentNameCollection::elementMatchesIfNameAttributeMatch):
+        (WebCore::DocumentNameCollection::elementMatches):
+        (WebCore::WindowNameCollection::nodeMatchesIfNameAttributeMatch): Deleted.
+        (WebCore::WindowNameCollection::nodeMatches): Deleted.
+        (WebCore::DocumentNameCollection::nodeMatchesIfIdAttributeMatch): Deleted.
+        (WebCore::DocumentNameCollection::nodeMatchesIfNameAttributeMatch): Deleted.
+        (WebCore::DocumentNameCollection::nodeMatches): Deleted.
+        * html/HTMLNameCollection.h:
+        * html/LabelsNodeList.cpp:
+        (WebCore::LabelsNodeList::elementMatches):
+        (WebCore::LabelsNodeList::nodeMatches): Deleted.
+        * html/LabelsNodeList.h:
+        * html/RadioNodeList.cpp:
+        (WebCore::RadioNodeList::elementMatches):
+        (WebCore::RadioNodeList::nodeMatches): Deleted.
+        * html/RadioNodeList.h:
+
+2014-09-15  Chris Dumez  &lt;cdumez@apple.com&gt;
+
</ins><span class="cx">         Use an AtomicString as key for caching ClassNodeList objects
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=136830
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomClassNodeListh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ClassNodeList.h (173648 => 173649)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ClassNodeList.h        2014-09-16 04:09:58 UTC (rev 173648)
+++ trunk/Source/WebCore/dom/ClassNodeList.h        2014-09-16 05:36:37 UTC (rev 173649)
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual ~ClassNodeList();
</span><span class="cx"> 
</span><del>-    virtual bool nodeMatches(Element*) const override;
</del><ins>+    virtual bool elementMatches(Element*) const override;
</ins><span class="cx">     virtual bool isRootedAtDocument() const override { return false; }
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="lines">@@ -60,7 +60,7 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline bool ClassNodeList::nodeMatches(Element* element) const
</del><ins>+inline bool ClassNodeList::elementMatches(Element* element) const
</ins><span class="cx"> {
</span><span class="cx">     if (!element-&gt;hasClass())
</span><span class="cx">         return false;
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentOrderedMapcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/DocumentOrderedMap.cpp (173648 => 173649)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/DocumentOrderedMap.cpp        2014-09-16 04:09:58 UTC (rev 173648)
+++ trunk/Source/WebCore/dom/DocumentOrderedMap.cpp        2014-09-16 05:36:37 UTC (rev 173649)
</span><span class="lines">@@ -74,12 +74,12 @@
</span><span class="cx"> 
</span><span class="cx"> inline bool keyMatchesWindowNamedItem(const AtomicStringImpl&amp; key, const Element&amp; element)
</span><span class="cx"> {
</span><del>-    return WindowNameCollection::nodeMatches(const_cast&lt;Element*&gt;(&amp;element), &amp;key);
</del><ins>+    return WindowNameCollection::elementMatches(const_cast&lt;Element*&gt;(&amp;element), &amp;key);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> inline bool keyMatchesDocumentNamedItem(const AtomicStringImpl&amp; key, const Element&amp; element)
</span><span class="cx"> {
</span><del>-    return DocumentNameCollection::nodeMatches(const_cast&lt;Element*&gt;(&amp;element), &amp;key);
</del><ins>+    return DocumentNameCollection::elementMatches(const_cast&lt;Element*&gt;(&amp;element), &amp;key);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void DocumentOrderedMap::clear()
</span></span></pre></div>
<a id="trunkSourceWebCoredomElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Element.cpp (173648 => 173649)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Element.cpp        2014-09-16 04:09:58 UTC (rev 173648)
+++ trunk/Source/WebCore/dom/Element.cpp        2014-09-16 05:36:37 UTC (rev 173649)
</span><span class="lines">@@ -2606,16 +2606,16 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(oldName != newName);
</span><span class="cx"> 
</span><del>-    if (WindowNameCollection::nodeMatchesIfNameAttributeMatch(this)) {
-        const AtomicString&amp; id = WindowNameCollection::nodeMatchesIfIdAttributeMatch(this) ? getIdAttribute() : nullAtom;
</del><ins>+    if (WindowNameCollection::elementMatchesIfNameAttributeMatch(this)) {
+        const AtomicString&amp; id = WindowNameCollection::elementMatchesIfIdAttributeMatch(this) ? getIdAttribute() : nullAtom;
</ins><span class="cx">         if (!oldName.isEmpty() &amp;&amp; oldName != id)
</span><span class="cx">             document.removeWindowNamedItem(*oldName.impl(), *this);
</span><span class="cx">         if (!newName.isEmpty() &amp;&amp; newName != id)
</span><span class="cx">             document.addWindowNamedItem(*newName.impl(), *this);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (DocumentNameCollection::nodeMatchesIfNameAttributeMatch(this)) {
-        const AtomicString&amp; id = DocumentNameCollection::nodeMatchesIfIdAttributeMatch(this) ? getIdAttribute() : nullAtom;
</del><ins>+    if (DocumentNameCollection::elementMatchesIfNameAttributeMatch(this)) {
+        const AtomicString&amp; id = DocumentNameCollection::elementMatchesIfIdAttributeMatch(this) ? getIdAttribute() : nullAtom;
</ins><span class="cx">         if (!oldName.isEmpty() &amp;&amp; oldName != id)
</span><span class="cx">             document.removeDocumentNamedItem(*oldName.impl(), *this);
</span><span class="cx">         if (!newName.isEmpty() &amp;&amp; newName != id)
</span><span class="lines">@@ -2656,16 +2656,16 @@
</span><span class="cx">     ASSERT(inDocument());
</span><span class="cx">     ASSERT(oldId != newId);
</span><span class="cx"> 
</span><del>-    if (WindowNameCollection::nodeMatchesIfIdAttributeMatch(this)) {
-        const AtomicString&amp; name = condition == UpdateHTMLDocumentNamedItemMapsOnlyIfDiffersFromNameAttribute &amp;&amp; WindowNameCollection::nodeMatchesIfNameAttributeMatch(this) ? getNameAttribute() : nullAtom;
</del><ins>+    if (WindowNameCollection::elementMatchesIfIdAttributeMatch(this)) {
+        const AtomicString&amp; name = condition == UpdateHTMLDocumentNamedItemMapsOnlyIfDiffersFromNameAttribute &amp;&amp; WindowNameCollection::elementMatchesIfNameAttributeMatch(this) ? getNameAttribute() : nullAtom;
</ins><span class="cx">         if (!oldId.isEmpty() &amp;&amp; oldId != name)
</span><span class="cx">             document.removeWindowNamedItem(*oldId.impl(), *this);
</span><span class="cx">         if (!newId.isEmpty() &amp;&amp; newId != name)
</span><span class="cx">             document.addWindowNamedItem(*newId.impl(), *this);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (DocumentNameCollection::nodeMatchesIfIdAttributeMatch(this)) {
-        const AtomicString&amp; name = condition == UpdateHTMLDocumentNamedItemMapsOnlyIfDiffersFromNameAttribute &amp;&amp; DocumentNameCollection::nodeMatchesIfNameAttributeMatch(this) ? getNameAttribute() : nullAtom;
</del><ins>+    if (DocumentNameCollection::elementMatchesIfIdAttributeMatch(this)) {
+        const AtomicString&amp; name = condition == UpdateHTMLDocumentNamedItemMapsOnlyIfDiffersFromNameAttribute &amp;&amp; DocumentNameCollection::elementMatchesIfNameAttributeMatch(this) ? getNameAttribute() : nullAtom;
</ins><span class="cx">         if (!oldId.isEmpty() &amp;&amp; oldId != name)
</span><span class="cx">             document.removeDocumentNamedItem(*oldId.impl(), *this);
</span><span class="cx">         if (!newId.isEmpty() &amp;&amp; newId != name)
</span></span></pre></div>
<a id="trunkSourceWebCoredomLiveNodeListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/LiveNodeList.cpp (173648 => 173649)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/LiveNodeList.cpp        2014-09-16 04:09:58 UTC (rev 173648)
+++ trunk/Source/WebCore/dom/LiveNodeList.cpp        2014-09-16 05:36:37 UTC (rev 173649)
</span><span class="lines">@@ -58,7 +58,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (rootNode.inDocument()) {
</span><span class="cx">         Element* element = rootNode.treeScope().getElementById(elementId);
</span><del>-        if (element &amp;&amp; nodeMatches(element) &amp;&amp; element-&gt;isDescendantOf(&amp;rootNode))
</del><ins>+        if (element &amp;&amp; elementMatches(element) &amp;&amp; element-&gt;isDescendantOf(&amp;rootNode))
</ins><span class="cx">             return element;
</span><span class="cx">         if (!element)
</span><span class="cx">             return nullptr;
</span></span></pre></div>
<a id="trunkSourceWebCoredomLiveNodeListh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/LiveNodeList.h (173648 => 173649)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/LiveNodeList.h        2014-09-16 04:09:58 UTC (rev 173648)
+++ trunk/Source/WebCore/dom/LiveNodeList.h        2014-09-16 05:36:37 UTC (rev 173649)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual Node* namedItem(const AtomicString&amp;) const override final;
</span><span class="cx"> 
</span><del>-    virtual bool nodeMatches(Element*) const = 0;
</del><ins>+    virtual bool elementMatches(Element*) const = 0;
</ins><span class="cx">     virtual bool isRootedAtDocument() const = 0;
</span><span class="cx"> 
</span><span class="cx">     ALWAYS_INLINE NodeListInvalidationType invalidationType() const { return static_cast&lt;NodeListInvalidationType&gt;(m_invalidationType); }
</span><span class="lines">@@ -159,7 +159,7 @@
</span><span class="cx">     auto descendants = elementDescendants(rootNode());
</span><span class="cx">     auto end = descendants.end();
</span><span class="cx">     for (auto it = descendants.begin(); it != end; ++it) {
</span><del>-        if (nodeList.nodeMatches(&amp;*it))
</del><ins>+        if (nodeList.elementMatches(&amp;*it))
</ins><span class="cx">             return it;
</span><span class="cx">     }
</span><span class="cx">     return end;
</span><span class="lines">@@ -172,7 +172,7 @@
</span><span class="cx">     auto descendants = elementDescendants(rootNode());
</span><span class="cx">     auto end = descendants.end();
</span><span class="cx">     for (auto it = descendants.last(); it != end; --it) {
</span><del>-        if (nodeList.nodeMatches(&amp;*it))
</del><ins>+        if (nodeList.elementMatches(&amp;*it))
</ins><span class="cx">             return it;
</span><span class="cx">     }
</span><span class="cx">     return end;
</span><span class="lines">@@ -182,14 +182,14 @@
</span><span class="cx"> void CachedLiveNodeList&lt;NodeListType&gt;::collectionTraverseForward(ElementDescendantIterator&amp; current, unsigned count, unsigned&amp; traversedCount) const
</span><span class="cx"> {
</span><span class="cx">     auto&amp; nodeList = static_cast&lt;const NodeListType&amp;&gt;(*this);
</span><del>-    ASSERT(nodeList.nodeMatches(&amp;*current));
</del><ins>+    ASSERT(nodeList.elementMatches(&amp;*current));
</ins><span class="cx">     auto end = collectionEnd();
</span><span class="cx">     for (traversedCount = 0; traversedCount &lt; count; ++traversedCount) {
</span><span class="cx">         do {
</span><span class="cx">             ++current;
</span><span class="cx">             if (current == end)
</span><span class="cx">                 return;
</span><del>-        } while (!nodeList.nodeMatches(&amp;*current));
</del><ins>+        } while (!nodeList.elementMatches(&amp;*current));
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -197,14 +197,14 @@
</span><span class="cx"> void CachedLiveNodeList&lt;NodeListType&gt;::collectionTraverseBackward(ElementDescendantIterator&amp; current, unsigned count) const
</span><span class="cx"> {
</span><span class="cx">     auto&amp; nodeList = static_cast&lt;const NodeListType&amp;&gt;(*this);
</span><del>-    ASSERT(nodeList.nodeMatches(&amp;*current));
</del><ins>+    ASSERT(nodeList.elementMatches(&amp;*current));
</ins><span class="cx">     auto end = collectionEnd();
</span><span class="cx">     for (; count; --count) {
</span><span class="cx">         do {
</span><span class="cx">             --current;
</span><span class="cx">             if (current == end)
</span><span class="cx">                 return;
</span><del>-        } while (!nodeList.nodeMatches(&amp;*current));
</del><ins>+        } while (!nodeList.elementMatches(&amp;*current));
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomNameNodeListh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/NameNodeList.h (173648 => 173649)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/NameNodeList.h        2014-09-16 04:09:58 UTC (rev 173648)
+++ trunk/Source/WebCore/dom/NameNodeList.h        2014-09-16 05:36:37 UTC (rev 173649)
</span><span class="lines">@@ -40,7 +40,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual ~NameNodeList();
</span><span class="cx"> 
</span><del>-    virtual bool nodeMatches(Element*) const override;
</del><ins>+    virtual bool elementMatches(Element*) const override;
</ins><span class="cx">     virtual bool isRootedAtDocument() const override { return false; }
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="lines">@@ -49,7 +49,7 @@
</span><span class="cx">     AtomicString m_name;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-inline bool NameNodeList::nodeMatches(Element* element) const
</del><ins>+inline bool NameNodeList::elementMatches(Element* element) const
</ins><span class="cx"> {
</span><span class="cx">     return element-&gt;getNameAttribute() == m_name;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoredomTagNodeListh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/TagNodeList.h (173648 => 173649)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/TagNodeList.h        2014-09-16 04:09:58 UTC (rev 173648)
+++ trunk/Source/WebCore/dom/TagNodeList.h        2014-09-16 05:36:37 UTC (rev 173649)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual ~TagNodeList();
</span><span class="cx"> 
</span><del>-    virtual bool nodeMatches(Element*) const override;
</del><ins>+    virtual bool elementMatches(Element*) const override;
</ins><span class="cx">     virtual bool isRootedAtDocument() const override { return false; }
</span><span class="cx"> 
</span><span class="cx"> protected:
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx">     AtomicString m_localName;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-inline bool TagNodeList::nodeMatches(Element* element) const
</del><ins>+inline bool TagNodeList::elementMatches(Element* element) const
</ins><span class="cx"> {
</span><span class="cx">     // Implements http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-getelementsbytagnamens
</span><span class="cx">     if (m_localName != starAtom &amp;&amp; m_localName != element-&gt;localName())
</span><span class="lines">@@ -74,7 +74,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual ~HTMLTagNodeList();
</span><span class="cx"> 
</span><del>-    virtual bool nodeMatches(Element*) const override;
</del><ins>+    virtual bool elementMatches(Element*) const override;
</ins><span class="cx">     virtual bool isRootedAtDocument() const override { return false; }
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="lines">@@ -84,7 +84,7 @@
</span><span class="cx">     AtomicString m_loweredLocalName;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-inline bool HTMLTagNodeList::nodeMatches(Element* element) const
</del><ins>+inline bool HTMLTagNodeList::elementMatches(Element* element) const
</ins><span class="cx"> {
</span><span class="cx">     // Implements http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-getelementsbytagname
</span><span class="cx">     if (m_localName == starAtom)
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLCollectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLCollection.cpp (173648 => 173649)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLCollection.cpp        2014-09-16 04:09:58 UTC (rev 173648)
+++ trunk/Source/WebCore/html/HTMLCollection.cpp        2014-09-16 05:36:37 UTC (rev 173649)
</span><span class="lines">@@ -213,9 +213,9 @@
</span><span class="cx">     case NodeChildren:
</span><span class="cx">         return true;
</span><span class="cx">     case DocumentNamedItems:
</span><del>-        return static_cast&lt;const DocumentNameCollection&amp;&gt;(htmlCollection).nodeMatches(&amp;element);
</del><ins>+        return static_cast&lt;const DocumentNameCollection&amp;&gt;(htmlCollection).elementMatches(&amp;element);
</ins><span class="cx">     case WindowNamedItems:
</span><del>-        return static_cast&lt;const WindowNameCollection&amp;&gt;(htmlCollection).nodeMatches(&amp;element);
</del><ins>+        return static_cast&lt;const WindowNameCollection&amp;&gt;(htmlCollection).elementMatches(&amp;element);
</ins><span class="cx">     case FormControls:
</span><span class="cx">     case TableRows:
</span><span class="cx">         break;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLNameCollectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLNameCollection.cpp (173648 => 173649)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLNameCollection.cpp        2014-09-16 04:09:58 UTC (rev 173648)
+++ trunk/Source/WebCore/html/HTMLNameCollection.cpp        2014-09-16 05:36:37 UTC (rev 173649)
</span><span class="lines">@@ -49,35 +49,35 @@
</span><span class="cx">     document().nodeLists()-&gt;removeCachedCollection(this, m_name);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool WindowNameCollection::nodeMatchesIfNameAttributeMatch(Element* element)
</del><ins>+bool WindowNameCollection::elementMatchesIfNameAttributeMatch(Element* element)
</ins><span class="cx"> {
</span><span class="cx">     return isHTMLImageElement(element) || isHTMLFormElement(element) || element-&gt;hasTagName(appletTag)
</span><span class="cx">         || element-&gt;hasTagName(embedTag) || element-&gt;hasTagName(objectTag);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool WindowNameCollection::nodeMatches(Element* element, const AtomicStringImpl* name)
</del><ins>+bool WindowNameCollection::elementMatches(Element* element, const AtomicStringImpl* name)
</ins><span class="cx"> {
</span><span class="cx">     // Find only images, forms, applets, embeds and objects by name, but anything by id
</span><del>-    if (nodeMatchesIfNameAttributeMatch(element) &amp;&amp; element-&gt;getNameAttribute().impl() == name)
</del><ins>+    if (elementMatchesIfNameAttributeMatch(element) &amp;&amp; element-&gt;getNameAttribute().impl() == name)
</ins><span class="cx">         return true;
</span><span class="cx">     return element-&gt;getIdAttribute().impl() == name;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool DocumentNameCollection::nodeMatchesIfIdAttributeMatch(Element* element)
</del><ins>+bool DocumentNameCollection::elementMatchesIfIdAttributeMatch(Element* element)
</ins><span class="cx"> {
</span><span class="cx">     // FIXME: we need to fix HTMLImageElement to update the hash map for us when name attribute has been removed.
</span><span class="cx">     return element-&gt;hasTagName(appletTag) || (element-&gt;hasTagName(objectTag) &amp;&amp; toHTMLObjectElement(element)-&gt;isDocNamedItem())
</span><span class="cx">         || (isHTMLImageElement(element) &amp;&amp; element-&gt;hasName());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool DocumentNameCollection::nodeMatchesIfNameAttributeMatch(Element* element)
</del><ins>+bool DocumentNameCollection::elementMatchesIfNameAttributeMatch(Element* element)
</ins><span class="cx"> {
</span><span class="cx">     return isHTMLFormElement(element) || element-&gt;hasTagName(embedTag) || element-&gt;hasTagName(iframeTag)
</span><span class="cx">         || element-&gt;hasTagName(appletTag) || (element-&gt;hasTagName(objectTag) &amp;&amp; toHTMLObjectElement(element)-&gt;isDocNamedItem())
</span><span class="cx">         || isHTMLImageElement(element);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool DocumentNameCollection::nodeMatches(Element* element, const AtomicStringImpl* name)
</del><ins>+bool DocumentNameCollection::elementMatches(Element* element, const AtomicStringImpl* name)
</ins><span class="cx"> {
</span><span class="cx">     // Find images, forms, applets, embeds, objects and iframes by name, applets and object by id, and images by id
</span><span class="cx">     // but only if they have a name attribute (this very strange rule matches IE)
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLNameCollectionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLNameCollection.h (173648 => 173649)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLNameCollection.h        2014-09-16 04:09:58 UTC (rev 173648)
+++ trunk/Source/WebCore/html/HTMLNameCollection.h        2014-09-16 05:36:37 UTC (rev 173649)
</span><span class="lines">@@ -50,11 +50,11 @@
</span><span class="cx">         return adoptRef(*new WindowNameCollection(document, type, name));
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    bool nodeMatches(Element* element) const { return nodeMatches(element, m_name.impl()); }
</del><ins>+    bool elementMatches(Element* element) const { return elementMatches(element, m_name.impl()); }
</ins><span class="cx"> 
</span><del>-    static bool nodeMatchesIfIdAttributeMatch(Element*) { return true; }
-    static bool nodeMatchesIfNameAttributeMatch(Element*);
-    static bool nodeMatches(Element*, const AtomicStringImpl*);
</del><ins>+    static bool elementMatchesIfIdAttributeMatch(Element*) { return true; }
+    static bool elementMatchesIfNameAttributeMatch(Element*);
+    static bool elementMatches(Element*, const AtomicStringImpl*);
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     WindowNameCollection(Document&amp; document, CollectionType type, const AtomicString&amp; name)
</span><span class="lines">@@ -71,11 +71,11 @@
</span><span class="cx">         return adoptRef(*new DocumentNameCollection(document, type, name));
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    static bool nodeMatchesIfIdAttributeMatch(Element*);
-    static bool nodeMatchesIfNameAttributeMatch(Element*);
-    bool nodeMatches(Element* element) const { return nodeMatches(element, m_name.impl()); }
</del><ins>+    static bool elementMatchesIfIdAttributeMatch(Element*);
+    static bool elementMatchesIfNameAttributeMatch(Element*);
+    bool elementMatches(Element* element) const { return elementMatches(element, m_name.impl()); }
</ins><span class="cx"> 
</span><del>-    static bool nodeMatches(Element*, const AtomicStringImpl*);
</del><ins>+    static bool elementMatches(Element*, const AtomicStringImpl*);
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     DocumentNameCollection(Document&amp; document, CollectionType type, const AtomicString&amp; name)
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlLabelsNodeListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/LabelsNodeList.cpp (173648 => 173649)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/LabelsNodeList.cpp        2014-09-16 04:09:58 UTC (rev 173648)
+++ trunk/Source/WebCore/html/LabelsNodeList.cpp        2014-09-16 05:36:37 UTC (rev 173649)
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx">     ownerNode().nodeLists()-&gt;removeCacheWithAtomicName(this, starAtom);
</span><span class="cx"> } 
</span><span class="cx">     
</span><del>-bool LabelsNodeList::nodeMatches(Element* testNode) const
</del><ins>+bool LabelsNodeList::elementMatches(Element* testNode) const
</ins><span class="cx"> {
</span><span class="cx">     return isHTMLLabelElement(testNode) &amp;&amp; toHTMLLabelElement(testNode)-&gt;control() == &amp;ownerNode();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlLabelsNodeListh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/LabelsNodeList.h (173648 => 173649)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/LabelsNodeList.h        2014-09-16 04:09:58 UTC (rev 173648)
+++ trunk/Source/WebCore/html/LabelsNodeList.h        2014-09-16 05:36:37 UTC (rev 173649)
</span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx">     }
</span><span class="cx">     ~LabelsNodeList();
</span><span class="cx"> 
</span><del>-    virtual bool nodeMatches(Element*) const override;
</del><ins>+    virtual bool elementMatches(Element*) const override;
</ins><span class="cx">     virtual bool isRootedAtDocument() const override { return true; }
</span><span class="cx"> 
</span><span class="cx"> private:
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlRadioNodeListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/RadioNodeList.cpp (173648 => 173649)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/RadioNodeList.cpp        2014-09-16 04:09:58 UTC (rev 173648)
+++ trunk/Source/WebCore/html/RadioNodeList.cpp        2014-09-16 05:36:37 UTC (rev 173649)
</span><span class="lines">@@ -99,7 +99,7 @@
</span><span class="cx">     return testElement-&gt;getIdAttribute() == m_name || testElement-&gt;getNameAttribute() == m_name;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool RadioNodeList::nodeMatches(Element* testElement) const
</del><ins>+bool RadioNodeList::elementMatches(Element* testElement) const
</ins><span class="cx"> {
</span><span class="cx">     if (!testElement-&gt;hasTagName(objectTag) &amp;&amp; !testElement-&gt;isFormControlElement())
</span><span class="cx">         return false;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlRadioNodeListh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/RadioNodeList.h (173648 => 173649)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/RadioNodeList.h        2014-09-16 04:09:58 UTC (rev 173648)
+++ trunk/Source/WebCore/html/RadioNodeList.h        2014-09-16 05:36:37 UTC (rev 173649)
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx">     String value() const;
</span><span class="cx">     void setValue(const String&amp;);
</span><span class="cx"> 
</span><del>-    virtual bool nodeMatches(Element*) const override;
</del><ins>+    virtual bool elementMatches(Element*) const override;
</ins><span class="cx">     virtual bool isRootedAtDocument() const override { return m_isRootedAtDocument; }
</span><span class="cx"> 
</span><span class="cx"> private:
</span></span></pre>
</div>
</div>

</body>
</html>