Bug 980904 - Disable the Character Encoding menu when document is decoded as UTF-8 without errors. r=hsivonen,emk,Gijs

This commit is contained in:
Alphan Chen
2017-11-23 15:03:41 +08:00
parent d1ed26c512
commit f742ba195a
13 changed files with 65 additions and 19 deletions

View File

@@ -1075,6 +1075,11 @@ nsHtml5TreeOperation::Perform(nsHtml5TreeOpExecutor* aBuilder,
aBuilder->MaybeComplainAboutCharset(msgId, error, (uint32_t)lineNumber);
return NS_OK;
}
case eTreeOpDisableEncodingMenu: {
nsIDocument* doc = aBuilder->GetDocument();
doc->DisableEncodingMenu();
return NS_OK;
}
case eTreeOpAddClass: {
nsIContent* node = *(mOne.node);
char16_t* str = mTwo.unicharPtr;