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

Unified Diff: Source/web/WebDocument.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: Rebase Created 6 years, 10 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/rendering/RenderTheme.cpp ('k') | Source/web/WebHelperPluginImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebDocument.cpp
diff --git a/Source/web/WebDocument.cpp b/Source/web/WebDocument.cpp
index 8d7479d624350628d54262bda4bf7579a79b6fb4..884fb2b56728d3263aad6e422a09a91db15d2140 100644
--- a/Source/web/WebDocument.cpp
+++ b/Source/web/WebDocument.cpp
@@ -164,9 +164,9 @@ void WebDocument::images(WebVector<WebElement>& results)
Vector<WebElement> temp;
temp.reserveCapacity(sourceLength);
for (size_t i = 0; i < sourceLength; ++i) {
- Node* node = images->item(i);
- if (node && node->isHTMLElement())
- temp.append(WebElement(toElement(node)));
+ Element* element = images->item(i);
+ if (element && element->isHTMLElement())
+ temp.append(WebElement(element));
}
results.assign(temp);
}
@@ -178,10 +178,10 @@ void WebDocument::forms(WebVector<WebFormElement>& results) const
Vector<WebFormElement> temp;
temp.reserveCapacity(sourceLength);
for (size_t i = 0; i < sourceLength; ++i) {
- Node* node = forms->item(i);
+ Element* element = forms->item(i);
// Strange but true, sometimes node can be 0.
- if (node && node->isHTMLElement())
- temp.append(WebFormElement(toHTMLFormElement(node)));
+ if (element && element->isHTMLElement())
+ temp.append(WebFormElement(toHTMLFormElement(element)));
}
results.assign(temp);
}
« no previous file with comments | « Source/core/rendering/RenderTheme.cpp ('k') | Source/web/WebHelperPluginImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698