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

Unified Diff: android_webview/renderer/aw_render_view_ext.cc

Issue 149313005: Update android WebView to use WebElementCollection instead of WebNodeCollection (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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 | « no previous file | no next file » | 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 25fa97111033dcc58f8added867f7d90a9ee141d..a20e55c59b517791576ebda552ed3381dd991ac6 100644
--- a/android_webview/renderer/aw_render_view_ext.cc
+++ b/android_webview/renderer/aw_render_view_ext.cc
@@ -23,11 +23,11 @@
#include "third_party/WebKit/public/web/WebDataSource.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/WebHitTestResult.h"
#include "third_party/WebKit/public/web/WebImageCache.h"
#include "third_party/WebKit/public/web/WebNode.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"
@@ -54,11 +54,11 @@ GURL GetAbsoluteSrcUrl(const blink::WebElement& element) {
return GetAbsoluteUrl(element, element.getAttribute("src"));
}
-blink::WebNode GetImgChild(const blink::WebNode& node) {
+blink::WebElement GetImgChild(const blink::WebElement& element) {
// This implementation is incomplete (for example if is an area tag) but
// matches the original WebViewClassic implementation.
- blink::WebNodeCollection collection = node.getElementsByTagName("img");
+ blink::WebElementCollection collection = element.getElementsByTagName("img");
DCHECK(!collection.isNull());
return collection.firstItem();
}
@@ -261,10 +261,10 @@ void AwRenderViewExt::FocusedNodeChanged(const blink::WebNode& node) {
absolute_link_url = GetAbsoluteUrl(node, data.href);
GURL absolute_image_url;
- const blink::WebNode child_img = GetImgChild(node);
- if (!child_img.isNull() && child_img.isElementNode()) {
+ const blink::WebElement child_img = GetImgChild(element);
+ if (!child_img.isNull()) {
absolute_image_url =
- GetAbsoluteSrcUrl(child_img.toConst<blink::WebElement>());
+ GetAbsoluteSrcUrl(child_img);
}
PopulateHitTestData(absolute_link_url,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698