зеркало из https://github.com/mozilla/gecko-dev.git
Fix bug #108809. r=ben sr=hyatt
This commit is contained in:
Родитель
4a2e0875e9
Коммит
d02d08c92d
|
@ -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
|
||||
|
|
|
@ -189,8 +189,8 @@ Contributor(s): ______________________________________. -->
|
|||
ondraggesture="PageProxyDragGesture(event);"/>
|
||||
<image id="page-proxy-favicon" validate="never"
|
||||
ondraggesture="PageProxyDragGesture(event);"
|
||||
onload="this.parentNode.selectedIndex = 1; event.stopPropagation(); event.preventBubble();"
|
||||
onerror="gBrowser.addToMissedIconCache(this.src);"/>
|
||||
onload="this.parentNode.selectedIndex = 1; event.stopPropagation(); event.preventBubble(); HandleBookmarkIcon(this.src, true);"
|
||||
onerror="gBrowser.addToMissedIconCache(this.src); HandleBookmarkIcon(this.src, false);"/>
|
||||
</deck>
|
||||
<menupopup id="ubhist-popup" class="autocomplete-history-popup"
|
||||
popupalign="topleft" popupanchor="bottomleft"
|
||||
|
@ -312,6 +312,8 @@ Contributor(s): ______________________________________. -->
|
|||
|
||||
<rule parent="hbox">
|
||||
<toolbarbutton class="bookmark-item" uri="rdf:*" editable="true"
|
||||
image="rdf:http://home.netscape.com/NC-rdf#Icon"
|
||||
validate="never"
|
||||
status="rdf:http://home.netscape.com/WEB-rdf#status"
|
||||
rdf:type="http://home.netscape.com/NC-rdf#Bookmark"
|
||||
tooltiptext="rdf:http://home.netscape.com/NC-rdf#URL"
|
||||
|
@ -349,6 +351,8 @@ Contributor(s): ______________________________________. -->
|
|||
<rule>
|
||||
<menupopup>
|
||||
<menuitem class="menuitem-iconic bookmark-item" uri="rdf:*"
|
||||
src="rdf:http://home.netscape.com/NC-rdf#Icon"
|
||||
validate="never"
|
||||
status="rdf:http://home.netscape.com/WEB-rdf#status"
|
||||
label="rdf:http://home.netscape.com/NC-rdf#Name"/>
|
||||
</menupopup>
|
||||
|
|
|
@ -329,7 +329,9 @@
|
|||
</rule>
|
||||
<rule>
|
||||
<menupopup>
|
||||
<menuitem class="menuitem-iconic bookmark-item" uri="rdf:*"
|
||||
<menuitem class="menuitem-iconic bookmark-item" uri="rdf:*"
|
||||
src="rdf:http://home.netscape.com/NC-rdf#Icon"
|
||||
validate="never"
|
||||
label="rdf:http://home.netscape.com/NC-rdf#Name"
|
||||
status="rdf:http://home.netscape.com/WEB-rdf#status"/>
|
||||
</menupopup>
|
||||
|
|
|
@ -166,7 +166,15 @@ nsBrowserStatusHandler.prototype =
|
|||
|
||||
onLinkIconAvailable : function(aHref) {
|
||||
if (gProxyFavIcon && pref.getBoolPref("browser.chrome.site_icons"))
|
||||
{
|
||||
gProxyFavIcon.setAttribute("src", aHref);
|
||||
|
||||
// update any bookmarks with new icon reference
|
||||
if (!gBookmarksService)
|
||||
gBookmarksService = Components.classes["@mozilla.org/browser/bookmarks-service;1"]
|
||||
.getService(Components.interfaces.nsIBookmarksService);
|
||||
gBookmarksService.UpdateBookmarkIcon(this.urlBar.value, aHref);
|
||||
}
|
||||
},
|
||||
|
||||
onProgressChange : function (aWebProgress, aRequest,
|
||||
|
|
Загрузка…
Ссылка в новой задаче