Added code to pass default charset to directory viewer, bug 28787, r=law.

This commit is contained in:
nhotta%netscape.com 2006-09-14 05:51:34 +00:00
Родитель 0b17846c53
Коммит 63cb55ffdc
1 изменённых файлов: 12 добавлений и 0 удалений

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

@ -411,6 +411,7 @@ function Startup()
{
contentArea.addEventListener("load", UpdateBookmarksLastVisitedDate, true);
contentArea.addEventListener("load", UpdateInternetSearchResults, true);
contentArea.addEventListener("load", checkForDirectoryListing, true);
contentArea.addEventListener("load", getContentAreaFrameCount, true);
contentArea.addEventListener("focus", contentAreaFrameFocus, true);
contentArea.addEventListener("load",postURLToNativeWidget, true);
@ -1587,6 +1588,17 @@ function postURLToNativeWidget() {
}
}
function checkForDirectoryListing() {
if ( window._content.HTTPIndex == "[xpconnect wrapped nsIHTTPIndex]"
&&
typeof window._content.HTTPIndex == "object"
&&
!window._content.HTTPIndex.constructor ) {
// Give directory .xul/.js access to browser instance.
window._content.defaultCharacterset = appCore.GetDocumentCharset();
}
}
/**
* Content area tooltip.
* XXX - this must move into XBL binding/equiv! Do not want to pollute