Bug 943888 - Always keep the bookmark star button enabled [r=mak]

MozReview-Commit-ID: 27ee1dbLSM1

--HG--
extra : rebase_source : 2d9a4aa005d585fa6ceafe174bbbd5f8c6b8f5ec
This commit is contained in:
Matt Brubeck 2016-04-25 13:59:00 -07:00
parent b0077c1653
commit a17fb5bfed
3 changed files with 0 additions and 28 deletions

View File

@ -1409,27 +1409,6 @@ var BookmarkingUI = {
aHeaderItem.parentNode.insertBefore(fragment, aHeaderItem.nextSibling);
},
/**
* Handles star styling based on page proxy state changes.
*/
onPageProxyStateChanged: function BUI_onPageProxyStateChanged(aState) {
if (!this._shouldUpdateStarState() || !this.star) {
return;
}
if (aState == "invalid") {
this.star.setAttribute("disabled", "true");
this.broadcaster.setAttribute("stardisabled", "true");
this.broadcaster.removeAttribute("starred");
this.broadcaster.setAttribute("buttontooltiptext", "");
}
else {
this.star.removeAttribute("disabled");
this.broadcaster.removeAttribute("stardisabled");
this._updateStar();
}
},
_updateCustomizationState: function BUI__updateCustomizationState() {
let placement = CustomizableUI.getPlacementOfWidget(this.BOOKMARK_BUTTON_ID);
this._currentAreaType = placement && CustomizableUI.getAreaType(placement.area);
@ -1546,11 +1525,6 @@ var BookmarkingUI = {
delete this._pendingStmt;
}
// We can load about:blank before the actual page, but there is no point in handling that page.
if (isBlankPageURL(this._uri.spec)) {
return;
}
this._pendingStmt = PlacesUtils.asyncGetBookmarkIds(this._uri, (aItemIds, aURI) => {
// Safety check that the bookmarked URI equals the tracked one.
if (!aURI.equals(this._uri)) {

View File

@ -2473,7 +2473,6 @@ function UpdatePageProxyState()
function SetPageProxyState(aState)
{
BookmarkingUI.onPageProxyStateChanged(aState);
if (!gURLBar)
return;

View File

@ -291,7 +291,6 @@ nsContextMenu.prototype = {
this.onImage || this.onVideo || this.onAudio || this.onSocial ||
this.onCanvas));
bookmarkPage.setAttribute("tooltiptext", bookmarkPage.getAttribute("buttontooltiptext"));
bookmarkPage.disabled = bookmarkPage.hasAttribute("stardisabled");
this.showItem("context-bookmarklink", (this.onLink && !this.onMailtoLink &&
!this.onSocial) || this.onPlainTextLink);