Bug 871161 comm-central part - Stop inheriting charset where other browsers do not inherit it. r=neil, a=Standard8 to land on CLOSED TREE.

This commit is contained in:
Henri Sivonen 2013-10-16 04:42:52 +03:00
Родитель 7a8746a149
Коммит be152587e2
3 изменённых файлов: 4 добавлений и 14 удалений

Просмотреть файл

@ -115,7 +115,6 @@ function EditorStartup(aUrl, aCharset)
// the editingSession when the URL has finished loading.
try {
var contentViewer = GetCurrentEditorElement().markupDocumentViewer;
contentViewer.defaultCharacterSet = aCharset;
contentViewer.forceCharacterSet = aCharset;
} catch (e) {}
EditorLoadUrl(aUrl);

Просмотреть файл

@ -1559,7 +1559,6 @@ NS_IMETHODIMP nsMsgCompose::InitEditor(nsIEditor* aEditor, nsIDOMWindow* aConten
{
nsCOMPtr<nsIMarkupDocumentViewer> markupCV = do_QueryInterface(childCV);
if (markupCV) {
NS_ENSURE_SUCCESS(markupCV->SetDefaultCharacterSet(msgCharSet), NS_ERROR_FAILURE);
NS_ENSURE_SUCCESS(markupCV->SetForceCharacterSet(msgCharSet), NS_ERROR_FAILURE);
}
}

Просмотреть файл

@ -521,17 +521,6 @@ function Startup()
setTimeout(pageShowEventHandlers, 0, aEvent);
}, true);
// set default character set if provided
if ("arguments" in window && window.arguments.length > 1 && window.arguments[1]) {
if (window.arguments[1].indexOf("charset=") != -1) {
var arrayArgComponents = window.arguments[1].split("=");
if (arrayArgComponents) {
//we should "inherit" the charset menu setting in a new window
getMarkupDocumentViewer().defaultCharacterSet = arrayArgComponents[1];
}
}
}
// Set a sane starting width/height for all resolutions on new profiles.
if (!document.documentElement.hasAttribute("width")) {
var defaultHeight = screen.availHeight;
@ -1926,7 +1915,10 @@ function checkForDirectoryListing()
{
if ( "HTTPIndex" in content &&
content.HTTPIndex instanceof Components.interfaces.nsIHTTPIndex ) {
content.defaultCharacterset = getMarkupDocumentViewer().defaultCharacterSet;
var forced = getBrowser().docShell.forcedCharset;
if (forced) {
content.defaultCharacterset = forced;
}
}
}