Chromium Code Reviews| 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..697aa461c8cb445ee568cfd290b14e4171c8a0fa 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::WebNode& node) { |
|
benm (inactive)
2014/02/07 14:46:15
Should the parameter be WebElement too?
Inactive
2014/02/07 15:09:42
This is not strictly necessary but it doesn't hurt
|
| // 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 = node.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(node); |
| + if (!child_img.isNull()) { |
| absolute_image_url = |
| - GetAbsoluteSrcUrl(child_img.toConst<blink::WebElement>()); |
| + GetAbsoluteSrcUrl(child_img); |
| } |
| PopulateHitTestData(absolute_link_url, |