Bug 234628 part 2 - Make manual encoding overrides not apply to internal URL schemes or to docs declared as UTF-16 on the HTTP level; make docshells able to report when the encoding menu should be disabled. r=bzbarsky.
This commit is contained in:
@@ -2248,6 +2248,25 @@ nsDocShell::SetFullscreenAllowed(bool aFullscreenAllowed)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::GetMayEnableCharacterEncodingMenu(bool* aMayEnableCharacterEncodingMenu)
|
||||
{
|
||||
*aMayEnableCharacterEncodingMenu = false;
|
||||
if (!mContentViewer) {
|
||||
return NS_OK;
|
||||
}
|
||||
nsIDocument* doc = mContentViewer->GetDocument();
|
||||
if (!doc) {
|
||||
return NS_OK;
|
||||
}
|
||||
if (doc->WillIgnoreCharsetOverride()) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
*aMayEnableCharacterEncodingMenu = true;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::GetDocShellEnumerator(int32_t aItemType, int32_t aDirection, nsISimpleEnumerator **outEnum)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user