summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/web_contents.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/chrome/browser/web_contents.cc b/chrome/browser/web_contents.cc
index 40c9f78..082852c 100644
--- a/chrome/browser/web_contents.cc
+++ b/chrome/browser/web_contents.cc
@@ -688,9 +688,13 @@ void WebContents::DidNavigate(RenderViewHost* rvh,
// Need to update MIME type here because it's referred to in
// UpdateNavigationCommands() called by RendererDidNavigate() to
// determine whether or not to enable the encoding menu.
+ // It's updated only for the main frame. For a subframe,
+ // RenderView::UpdateURL does not set params.contents_mime_type.
+ // (see http://code.google.com/p/chromium/issues/detail?id=2929 )
// TODO(jungshik): Add a test for the encoding menu to avoid
// regressing it again.
- contents_mime_type_ = params.contents_mime_type;
+ if (PageTransition::IsMainFrame(params.transition))
+ contents_mime_type_ = params.contents_mime_type;
NavigationController::LoadCommittedDetails details;
if (!controller()->RendererDidNavigate(