#44011 the bookmark charset does not work correctly if we select sidebar first

ra = ftang
doc charset can be and should be get directly from window without paying
any attention to focused window.
This commit is contained in:
shanjian%netscape.com 2006-09-14 05:53:05 +00:00
Родитель 6705a3f95e
Коммит 13c55906d7
1 изменённых файлов: 1 добавлений и 6 удалений

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

@ -145,15 +145,10 @@ function UpdateBookmarksLastVisitedDate(event)
{
try
{
var wnd = document.commandDispatcher.focusedWindow;
if (window == wnd) wnd = window._content;
var docCharset = wnd.document.characterSet;
// if the URL is bookmarked, update its "Last Visited" date
var bmks = Components.classes["component://netscape/browser/bookmarks-service"].getService();
if (bmks) bmks = bmks.QueryInterface(Components.interfaces.nsIBookmarksService);
if (bmks) bmks.UpdateBookmarkLastVisitedDate(window._content.location.href, docCharset);
if (bmks) bmks.UpdateBookmarkLastVisitedDate(window._content.location.href, window._content.document.characterSet);
}
catch(ex)
{