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

Unified Diff: Source/core/dom/Document.cpp

Issue 137433008: Have HTMLCollection::item() return an Element as per specification (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update WebNodeCollection API Created 6 years, 11 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: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 3bb3df2b0f652935bc8aed69128367a495072f08..41b552dc72ea61afe786facc891d2286fd6ab791 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -4226,7 +4226,7 @@ KURL Document::openSearchDescriptionURL()
return KURL();
RefPtr<HTMLCollection> children = head()->children();
- for (unsigned i = 0; Node* child = children->item(i); i++) {
+ for (unsigned i = 0; Element* child = children->item(i); i++) {
if (!child->hasTagName(linkTag))
continue;
HTMLLinkElement* linkElement = toHTMLLinkElement(child);
@@ -4484,7 +4484,7 @@ Vector<IconURL> Document::iconURLs(int iconTypesMask)
RefPtr<HTMLCollection> children = head() ? head()->children() : 0;
unsigned length = children ? children->length() : 0;
for (unsigned i = 0; i < length; i++) {
- Node* child = children->item(i);
+ Element* child = children->item(i);
if (!child->hasTagName(linkTag))
continue;
HTMLLinkElement* linkElement = toHTMLLinkElement(child);

Powered by Google App Engine
This is Rietveld 408576698