bug 199237 : fix the rendering of the non-ASCII title of a non-text doc(image, media) opened in a new tab/window (r=bryner, sr=bz)

This commit is contained in:
jshin%mailaps.org 2006-07-29 05:42:17 +00:00
parent 7946953f96
commit ffa9f9d286

View File

@ -160,7 +160,16 @@ function openNewTabWith(url, sendReferrer, reverseBackgroundPref)
var referrer = sendReferrer ? getReferrer(browserDocument) : null;
var tab = browser.addTab(url, referrer); // open link in new tab
// As in openNewWindowWith(), we want to pass the charset of the
// current document over to a new tab.
var wintype = browserDocument.firstChild.getAttribute('windowtype');
var originCharset;
if (wintype == "navigator:browser") {
originCharset = window._content.document.characterSet;
}
// open link in new tab
var tab = browser.addTab(url, referrer, originCharset);
if (pref) {
var loadInBackground = pref.getBoolPref("browser.tabs.loadInBackground");
if (reverseBackgroundPref)