Index: content/renderer/render_frame_impl.cc |
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc |
index f0b5cf8608e5009adc379bf6a98d0b8f83561e1b..d40694ed3a8082deee177e4f92aa2b4eaffae13f 100644 |
--- a/content/renderer/render_frame_impl.cc |
+++ b/content/renderer/render_frame_impl.cc |
@@ -5643,11 +5643,17 @@ WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation( |
} |
} |
+ // When an MHTML Archive is present, it should be used to serve iframe content |
+ // instead of doing a network request. |
+ bool use_archive = |
+ (info.archive_status == NavigationPolicyInfo::ArchiveStatus::Present) && |
+ !url.SchemeIs(url::kDataScheme); |
+ |
// PlzNavigate: if the navigation is not synchronous, send it to the browser. |
// This includes navigations with no request being sent to the network stack. |
if (IsBrowserSideNavigationEnabled() && |
info.url_request.CheckForBrowserSideNavigation() && |
- ShouldMakeNetworkRequestForURL(url)) { |
+ ShouldMakeNetworkRequestForURL(url) && !use_archive) { |
if (info.default_policy == blink::kWebNavigationPolicyCurrentTab) { |
// The BeginNavigation() call happens in didStartProvisionalLoad(). We |
// need to save information about the navigation here. |