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

git-svn-id: svn://10.0.0.236/trunk@171086 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bryner%brianryner.com 2005-03-23 21:37:10 +00:00
parent cb50554bad
commit 87cf1ae9a4

View File

@ -61,8 +61,17 @@ function openNewTabWith(href, linkNode, event, securityCheck)
if (event && event.shiftKey)
loadInBackground = !loadInBackground;
// As in openNewWindowWith(), we want to pass the charset of the
// current document over to a new tab.
var wintype = document.firstChild.getAttribute('windowtype');
var originCharset;
if (wintype == "navigator:browser") {
originCharset = window._content.document.characterSet;
}
// open link in new tab
var browser = top.document.getElementById("content");
var theTab = browser.addTab(href, getReferrer(document));
var theTab = browser.addTab(href, getReferrer(document), originCharset);
if (!loadInBackground)
browser.selectedTab = theTab;