зеркало из https://github.com/mozilla/gecko-dev.git
#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:
Родитель
6705a3f95e
Коммит
13c55906d7
|
@ -145,15 +145,10 @@ function UpdateBookmarksLastVisitedDate(event)
|
||||||
{
|
{
|
||||||
try
|
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
|
// if the URL is bookmarked, update its "Last Visited" date
|
||||||
var bmks = Components.classes["component://netscape/browser/bookmarks-service"].getService();
|
var bmks = Components.classes["component://netscape/browser/bookmarks-service"].getService();
|
||||||
if (bmks) bmks = bmks.QueryInterface(Components.interfaces.nsIBookmarksService);
|
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)
|
catch(ex)
|
||||||
{
|
{
|
||||||
|
|
Загрузка…
Ссылка в новой задаче