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

Unified Diff: android_webview/renderer/aw_render_view_ext.cc

Issue 152133004: Update WebNode::getElementsByTagName() callers to use a WebNodeCollection (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « no previous file | components/autofill/content/renderer/form_autofill_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/renderer/aw_render_view_ext.cc
diff --git a/android_webview/renderer/aw_render_view_ext.cc b/android_webview/renderer/aw_render_view_ext.cc
index 0f9797d2491a301b1a35669ee3bcaf39c3ce3d7f..25fa97111033dcc58f8added867f7d90a9ee141d 100644
--- a/android_webview/renderer/aw_render_view_ext.cc
+++ b/android_webview/renderer/aw_render_view_ext.cc
@@ -27,7 +27,7 @@
#include "third_party/WebKit/public/web/WebHitTestResult.h"
#include "third_party/WebKit/public/web/WebImageCache.h"
#include "third_party/WebKit/public/web/WebNode.h"
-#include "third_party/WebKit/public/web/WebNodeList.h"
+#include "third_party/WebKit/public/web/WebNodeCollection.h"
#include "third_party/WebKit/public/web/WebSecurityOrigin.h"
#include "third_party/WebKit/public/web/WebView.h"
#include "url/url_canon.h"
@@ -58,10 +58,9 @@ blink::WebNode GetImgChild(const blink::WebNode& node) {
// This implementation is incomplete (for example if is an area tag) but
// matches the original WebViewClassic implementation.
- blink::WebNodeList list = node.getElementsByTagName("img");
- if (list.length() > 0)
- return list.item(0);
- return blink::WebNode();
+ blink::WebNodeCollection collection = node.getElementsByTagName("img");
+ DCHECK(!collection.isNull());
+ return collection.firstItem();
}
bool RemovePrefixAndAssignIfMatches(const base::StringPiece& prefix,
« no previous file with comments | « no previous file | components/autofill/content/renderer/form_autofill_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698