diff --git a/mozilla/suite/browser/navigator.js b/mozilla/suite/browser/navigator.js
index 6aad91b1254..f8f41e6fad7 100644
--- a/mozilla/suite/browser/navigator.js
+++ b/mozilla/suite/browser/navigator.js
@@ -121,6 +121,19 @@ function UpdateBookmarksLastVisitedDate(event)
}
}
+function HandleBookmarkIcon(iconURL, addFlag)
+{
+ var url = _content.location.href;
+ if (url) {
+ // update URL with new icon reference
+ if (!gBookmarksService)
+ gBookmarksService = Components.classes["@mozilla.org/browser/bookmarks-service;1"]
+ .getService(Components.interfaces.nsIBookmarksService);
+ if (addFlag) gBookmarksService.UpdateBookmarkIcon(url, iconURL);
+ else gBookmarksService.RemoveBookmarkIcon(url, iconURL);
+ }
+}
+
function UpdateInternetSearchResults(event)
{
// XXX This somehow causes a big leak, back to the old way
diff --git a/mozilla/suite/browser/navigator.xul b/mozilla/suite/browser/navigator.xul
index 3e2bff78341..55914854947 100644
--- a/mozilla/suite/browser/navigator.xul
+++ b/mozilla/suite/browser/navigator.xul
@@ -189,8 +189,8 @@ Contributor(s): ______________________________________. -->
ondraggesture="PageProxyDragGesture(event);"/>
+ onload="this.parentNode.selectedIndex = 1; event.stopPropagation(); event.preventBubble(); HandleBookmarkIcon(this.src, true);"
+ onerror="gBrowser.addToMissedIconCache(this.src); HandleBookmarkIcon(this.src, false);"/>