Index: chrome/renderer/safe_browsing/malware_dom_details.cc |
diff --git a/chrome/renderer/safe_browsing/malware_dom_details.cc b/chrome/renderer/safe_browsing/malware_dom_details.cc |
index 605ab69f7acf3e27ad641eb55d2824e6ba76df11..3e83261d420d35b596f990749d52645770980211 100644 |
--- a/chrome/renderer/safe_browsing/malware_dom_details.cc |
+++ b/chrome/renderer/safe_browsing/malware_dom_details.cc |
@@ -11,8 +11,8 @@ |
#include "third_party/WebKit/public/platform/WebString.h" |
#include "third_party/WebKit/public/web/WebDocument.h" |
#include "third_party/WebKit/public/web/WebElement.h" |
+#include "third_party/WebKit/public/web/WebElementCollection.h" |
#include "third_party/WebKit/public/web/WebFrame.h" |
-#include "third_party/WebKit/public/web/WebNodeCollection.h" |
#include "third_party/WebKit/public/web/WebView.h" |
namespace safe_browsing { |
@@ -71,13 +71,9 @@ void MalwareDOMDetails::ExtractResources( |
continue; |
} |
- blink::WebNodeCollection elements = document.all(); |
- blink::WebNode cur_node = elements.firstItem(); |
- for (; !cur_node.isNull(); cur_node = elements.nextItem()) { |
- if (!cur_node.isElementNode()) { |
- continue; |
- } |
- blink::WebElement element = cur_node.to<blink::WebElement>(); |
+ blink::WebElementCollection elements = document.all(); |
+ blink::WebElement element = elements.firstItem(); |
+ for (; !element.isNull(); element = elements.nextItem()) { |
if (element.hasTagName("iframe") || element.hasTagName("frame") || |
element.hasTagName("embed") || element.hasTagName("script")) { |
HandleElement(element, &details_node, resources); |