зеркало из https://github.com/mozilla/gecko-dev.git
Bug 621802 - Make the bookmark star async (don't block UI during page load) [r=mfinkle]
This commit is contained in:
Родитель
cc6b3aa691
Коммит
00d1e28ecb
|
@ -654,10 +654,12 @@ var BrowserUI = {
|
|||
},
|
||||
|
||||
updateStar: function() {
|
||||
if (PlacesUtils.getMostRecentBookmarkForURI(Browser.selectedBrowser.currentURI) != -1)
|
||||
this.starButton.setAttribute("starred", "true");
|
||||
else
|
||||
this.starButton.removeAttribute("starred");
|
||||
PlacesUtils.asyncGetBookmarkIds(getBrowser().currentURI, function (aItemIds) {
|
||||
if (aItemIds.length)
|
||||
this.starButton.setAttribute("starred", "true");
|
||||
else
|
||||
this.starButton.removeAttribute("starred");
|
||||
}, this);
|
||||
},
|
||||
|
||||
newTab: function newTab(aURI, aOwner) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче