| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "android_webview/renderer/aw_render_view_ext.h" | 5 #include "android_webview/renderer/aw_render_view_ext.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "android_webview/common/aw_hit_test_data.h" | 9 #include "android_webview/common/aw_hit_test_data.h" |
| 10 #include "android_webview/common/render_view_messages.h" | 10 #include "android_webview/common/render_view_messages.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 GURL GetAbsoluteSrcUrl(const blink::WebElement& element) { | 51 GURL GetAbsoluteSrcUrl(const blink::WebElement& element) { |
| 52 if (element.isNull()) | 52 if (element.isNull()) |
| 53 return GURL(); | 53 return GURL(); |
| 54 return GetAbsoluteUrl(element, element.getAttribute("src")); | 54 return GetAbsoluteUrl(element, element.getAttribute("src")); |
| 55 } | 55 } |
| 56 | 56 |
| 57 blink::WebElement GetImgChild(const blink::WebElement& element) { | 57 blink::WebElement GetImgChild(const blink::WebElement& element) { |
| 58 // This implementation is incomplete (for example if is an area tag) but | 58 // This implementation is incomplete (for example if is an area tag) but |
| 59 // matches the original WebViewClassic implementation. | 59 // matches the original WebViewClassic implementation. |
| 60 | 60 |
| 61 blink::WebElementCollection collection = element.getElementsByTagName("img"); | 61 blink::WebElementCollection collection = |
| 62 element.getElementsByHTMLTagName("img"); |
| 62 DCHECK(!collection.isNull()); | 63 DCHECK(!collection.isNull()); |
| 63 return collection.firstItem(); | 64 return collection.firstItem(); |
| 64 } | 65 } |
| 65 | 66 |
| 66 bool RemovePrefixAndAssignIfMatches(const base::StringPiece& prefix, | 67 bool RemovePrefixAndAssignIfMatches(const base::StringPiece& prefix, |
| 67 const GURL& url, | 68 const GURL& url, |
| 68 std::string* dest) { | 69 std::string* dest) { |
| 69 const base::StringPiece spec(url.possibly_invalid_spec()); | 70 const base::StringPiece spec(url.possibly_invalid_spec()); |
| 70 | 71 |
| 71 if (spec.starts_with(prefix)) { | 72 if (spec.starts_with(prefix)) { |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 render_view()->GetWebView()->setFixedLayoutSize(size); | 314 render_view()->GetWebView()->setFixedLayoutSize(size); |
| 314 } | 315 } |
| 315 | 316 |
| 316 void AwRenderViewExt::OnSetBackgroundColor(SkColor c) { | 317 void AwRenderViewExt::OnSetBackgroundColor(SkColor c) { |
| 317 if (!render_view() || !render_view()->GetWebView()) | 318 if (!render_view() || !render_view()->GetWebView()) |
| 318 return; | 319 return; |
| 319 render_view()->GetWebView()->setBaseBackgroundColor(c); | 320 render_view()->GetWebView()->setBaseBackgroundColor(c); |
| 320 } | 321 } |
| 321 | 322 |
| 322 } // namespace android_webview | 323 } // namespace android_webview |
| OLD | NEW |