Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Unified Diff: Source/core/html/HTMLCollection.cpp

Issue 492453002: Make it clear a DocumentNameCollection can only contain HTMLElements (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Clean up Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/DocumentNameCollection.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLCollection.cpp
diff --git a/Source/core/html/HTMLCollection.cpp b/Source/core/html/HTMLCollection.cpp
index f42ae7098827d9584b9764e99962f1c14d778345..4282de9c9bfc3bb8776fdcb87a7849a56fc99f68 100644
--- a/Source/core/html/HTMLCollection.cpp
+++ b/Source/core/html/HTMLCollection.cpp
@@ -210,6 +210,8 @@ static inline bool isMatchingHTMLElement(const HTMLCollection& htmlCollection, c
return element.hasTagName(scriptTag);
case DocForms:
return element.hasTagName(formTag);
+ case DocumentNamedItems:
+ return toDocumentNameCollection(htmlCollection).elementMatches(element);
case TableTBodies:
return element.hasTagName(tbodyTag);
case TRCells:
@@ -243,7 +245,6 @@ static inline bool isMatchingHTMLElement(const HTMLCollection& htmlCollection, c
case DocAll:
case NodeChildren:
case FormControls:
- case DocumentNamedItems:
case TableRows:
case WindowNamedItems:
case NameNodeListType:
@@ -268,8 +269,6 @@ inline bool HTMLCollection::elementMatches(const Element& element) const
return toTagCollection(*this).elementMatches(element);
case HTMLTagCollectionType:
return toHTMLTagCollection(*this).elementMatches(element);
- case DocumentNamedItems:
- return toDocumentNameCollection(*this).elementMatches(element);
case WindowNamedItems:
return toWindowNameCollection(*this).elementMatches(element);
default:
« no previous file with comments | « Source/core/html/DocumentNameCollection.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698