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

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

Issue 2868823002: getElementsByTagName() should take a qualifiedName in parameter (Closed)
Patch Set: Rebased And Align with review comments Created 3 years, 7 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
Index: third_party/WebKit/Source/core/html/HTMLCollection.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLCollection.cpp b/third_party/WebKit/Source/core/html/HTMLCollection.cpp
index 07c45002b58c5edc4b4eccf1abc447680d52ce41..4f509ba32078ef4635f82eb830a01dcf31ad95f4 100644
--- a/third_party/WebKit/Source/core/html/HTMLCollection.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLCollection.cpp
@@ -46,6 +46,7 @@ static bool ShouldTypeOnlyIncludeDirectChildren(CollectionType type) {
switch (type) {
case kClassCollectionType:
case kTagCollectionType:
+ case kTagCollectionNSType:
case kHTMLTagCollectionType:
case kDocAll:
case kDocAnchors:
@@ -95,6 +96,7 @@ static NodeListRootType RootTypeFromCollectionType(const ContainerNode& owner,
return NodeListRootType::kTreeScope;
case kClassCollectionType:
case kTagCollectionType:
+ case kTagCollectionNSType:
case kHTMLTagCollectionType:
case kNodeChildren:
case kTableTBodies:
@@ -125,6 +127,7 @@ static NodeListInvalidationType InvalidationTypeExcludingIdAndNameAttributes(
CollectionType type) {
switch (type) {
case kTagCollectionType:
+ case kTagCollectionNSType:
case kHTMLTagCollectionType:
case kDocImages:
case kDocEmbeds:
@@ -244,6 +247,7 @@ static inline bool IsMatchingHTMLElement(const HTMLCollection& html_collection,
return isHTMLObjectElement(element) || IsHTMLFormControlElement(element);
case kClassCollectionType:
case kTagCollectionType:
+ case kTagCollectionNSType:
case kHTMLTagCollectionType:
case kDocAll:
case kNodeChildren:
@@ -270,6 +274,8 @@ inline bool HTMLCollection::ElementMatches(const Element& element) const {
return ToTagCollection(*this).ElementMatches(element);
case kHTMLTagCollectionType:
return ToHTMLTagCollection(*this).ElementMatches(element);
+ case kTagCollectionNSType:
+ return ToTagCollectionNS(*this).ElementMatches(element);
case kWindowNamedItems:
return ToWindowNameCollection(*this).ElementMatches(element);
default:
« no previous file with comments | « third_party/WebKit/Source/core/html/CollectionType.h ('k') | third_party/WebKit/Source/core/html/HTMLTagCollection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698