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

Unified Diff: Source/web/WebPageSerializer.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/web/WebNodeCollection.cpp ('k') | Source/web/WebPageSerializerImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebPageSerializer.cpp
diff --git a/Source/web/WebPageSerializer.cpp b/Source/web/WebPageSerializer.cpp
index 973c618509c9918629771bf87bb7dfb256e61736..35beb60f28fcec361ccb0b99a0b9847edefc537d 100644
--- a/Source/web/WebPageSerializer.cpp
+++ b/Source/web/WebPageSerializer.cpp
@@ -165,13 +165,10 @@ void retrieveResourcesForFrame(Frame* frame,
frameURLs->append(frameURL);
// Now get the resources associated with each node of the document.
- RefPtr<HTMLCollection> allNodes = frame->document()->all();
- for (unsigned i = 0; i < allNodes->length(); ++i) {
- Node* node = allNodes->item(i);
- // We are only interested in HTML resources.
- if (!node->isElementNode())
- continue;
- retrieveResourcesForElement(toElement(node),
+ RefPtr<HTMLCollection> allElements = frame->document()->all();
+ for (unsigned i = 0; i < allElements->length(); ++i) {
+ Element* element = allElements->item(i);
+ retrieveResourcesForElement(element,
visitedFrames, framesToVisit,
frameURLs, resourceURLs);
}
« no previous file with comments | « Source/web/WebNodeCollection.cpp ('k') | Source/web/WebPageSerializerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698