Chromium Code Reviews| Index: android_webview/renderer/aw_render_frame_ext.cc |
| diff --git a/android_webview/renderer/aw_render_frame_ext.cc b/android_webview/renderer/aw_render_frame_ext.cc |
| index 69b06f05458d8f66dd32f89e7b9c987892e3d47e..dba80725ef77fa086a5cf98ac1961df6ea2d30ce 100644 |
| --- a/android_webview/renderer/aw_render_frame_ext.cc |
| +++ b/android_webview/renderer/aw_render_frame_ext.cc |
| @@ -17,6 +17,7 @@ |
| #include "third_party/WebKit/public/web/WebElementCollection.h" |
| #include "third_party/WebKit/public/web/WebFrameWidget.h" |
| #include "third_party/WebKit/public/web/WebHitTestResult.h" |
| +#include "third_party/WebKit/public/web/WebImageCache.h" |
| #include "third_party/WebKit/public/web/WebLocalFrame.h" |
| #include "third_party/WebKit/public/web/WebMeaningfulLayout.h" |
| #include "third_party/WebKit/public/web/WebNode.h" |
| @@ -146,6 +147,15 @@ void AwRenderFrameExt::DidCommitProvisionalLoad(bool is_new_navigation, |
| blink::WebSecurityOrigin origin = frame->document().getSecurityOrigin(); |
| origin.grantLoadLocalResources(); |
| } |
| + |
| + // Clear the cache when we cross site boundaries in the main frame. |
|
boliu
2016/03/10 21:59:58
Can add what we found in the email thread as a com
Avi (use Gerrit)
2016/03/10 22:07:56
Done.
|
| + if (!frame->parent()) { |
| + url::Origin new_origin(frame->document().url()); |
| + if (!new_origin.IsSameOriginWith(last_origin_)) { |
| + last_origin_ = new_origin; |
| + blink::WebImageCache::clear(); |
| + } |
| + } |
| } |
| bool AwRenderFrameExt::OnMessageReceived(const IPC::Message& message) { |