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); |
} |