summaryrefslogtreecommitdiffstats
path: root/android_webview/renderer
diff options
context:
space:
mode:
authormnaganov@chromium.org <mnaganov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-17 09:20:54 +0000
committermnaganov@chromium.org <mnaganov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-17 09:20:54 +0000
commit4b1f621eb1d309681695fba3d02a4e990e5a2f9a (patch)
tree82a81502410169a288713813c6d14247c8ccf01d /android_webview/renderer
parent61a741eede7e32d54b4347f9d40e1d974fc252ef (diff)
downloadchromium_src-4b1f621eb1d309681695fba3d02a4e990e5a2f9a.zip
chromium_src-4b1f621eb1d309681695fba3d02a4e990e5a2f9a.tar.gz
chromium_src-4b1f621eb1d309681695fba3d02a4e990e5a2f9a.tar.bz2
[Android WebView] Fix LoadsImagesAutomatically tests after crbug.com/224317
Blink now has more reasonable behavior of LoadsImagesAutomatically and ImagesDisabled settings. Namely, ImagesDisabled prevents any images from showing up, including cached ones. LoadsImagesAutomatically now allows "loading" of data uri images embedded in pages. This allows us to simplify our wirings for implementing Android WebView's LoadsImagesAutomatically and BlockNetworkImage. The trick is that we should wire them cris-cross, as WebView's LoadsImagesAutomatically must block all images from loading / showing up (as ImagesDisabled), while BlockNetworkImage's contract is now fulfilled by Blink's LoadsImagesAutomatically. Please read comments on the bugs referenced if this sounds weird to you. AwSettingsTest.testLoadsImagesAutomaticallyWithCachedImage is removed because this behavior is not in fact standardized in WebView Classic and isn't preserved anymore. In fact, as cache is transient, it would be unwise for an application to rely on the fact that cached images will stay there forever and thus could be shown even if LoadsImagesAutomatically is disabled. BUG=248249,224317 R=benm@chromium.org, joth@chromium.org Review URL: https://codereview.chromium.org/16932006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206692 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'android_webview/renderer')
-rw-r--r--android_webview/renderer/aw_render_view_ext.cc15
-rw-r--r--android_webview/renderer/aw_render_view_ext.h3
2 files changed, 0 insertions, 18 deletions
diff --git a/android_webview/renderer/aw_render_view_ext.cc b/android_webview/renderer/aw_render_view_ext.cc
index 36bf766..17aa4a6 100644
--- a/android_webview/renderer/aw_render_view_ext.cc
+++ b/android_webview/renderer/aw_render_view_ext.cc
@@ -174,21 +174,6 @@ void AwRenderViewExt::OnDocumentHasImagesRequest(int id) {
hasImages));
}
-bool AwRenderViewExt::allowImage(WebKit::WebFrame* frame,
- bool enabled_per_settings,
- const WebKit::WebURL& image_url) {
- // Implementing setBlockNetworkImages, so allow local scheme images to be
- // loaded.
- if (enabled_per_settings)
- return true;
-
- // For compatibility, only blacklist network schemes instead of whitelisting.
- const GURL url(image_url);
- return !(url.SchemeIs(chrome::kHttpScheme) ||
- url.SchemeIs(chrome::kHttpsScheme) ||
- url.SchemeIs(chrome::kFtpScheme));
-}
-
bool AwRenderViewExt::allowDisplayingInsecureContent(
WebKit::WebFrame* frame,
bool enabled_per_settings,
diff --git a/android_webview/renderer/aw_render_view_ext.h b/android_webview/renderer/aw_render_view_ext.h
index 8a9b68e..f271cb9 100644
--- a/android_webview/renderer/aw_render_view_ext.h
+++ b/android_webview/renderer/aw_render_view_ext.h
@@ -51,9 +51,6 @@ class AwRenderViewExt : public content::RenderViewObserver,
void UpdatePageScaleFactor();
// WebKit::WebPermissionClient implementation.
- virtual bool allowImage(WebKit::WebFrame* frame,
- bool enabledPerSettings,
- const WebKit::WebURL& imageURL) OVERRIDE;
virtual bool allowDisplayingInsecureContent(
WebKit::WebFrame* frame,
bool enabled_per_settings,