gh-13982: fix boosts size override not resetting zoom to default after disabling it (gh-14091)

This commit is contained in:
Ashvin Jangid
2026-06-10 02:30:41 +05:30
committed by GitHub
parent bd3adba05e
commit ccefb76168
2 changed files with 18 additions and 1 deletions

View File

@@ -638,7 +638,7 @@ ${cssSelector} {
/**
* Handles the size toggle button press, cycling through size override options
*/
onBoostSizePressed() {
async onBoostSizePressed() {
if (this.currentBoostData.sizeOverride == 1) {
this.currentBoostData.sizeOverride = 1.1;
} else if (this.currentBoostData.sizeOverride == 1.1) {
@@ -649,6 +649,12 @@ ${cssSelector} {
this.currentBoostData.sizeOverride = 0.9;
} else if (this.currentBoostData.sizeOverride == 0.9) {
this.currentBoostData.sizeOverride = 1;
const linkedBrowser =
this.openerWindow.gBrowser.selectedTab.linkedBrowser;
const actor =
linkedBrowser.browsingContext.currentWindowGlobal.getActor("ZenBoosts");
await actor.sendQuery("ZenBoost:DisableSizeOverride");
}
this.updateSizeButtonVisuals();

View File

@@ -280,6 +280,9 @@ export class ZenBoostsChild extends JSWindowActorChild {
case "ZenBoost:OpenInspector":
this.sendAsyncMessage("ZenBoost:OpenInspector");
break;
case "ZenBoost:DisableSizeOverride":
this.disableSizeOverride();
break;
}
return null;
}
@@ -549,6 +552,14 @@ export class ZenBoostsChild extends JSWindowActorChild {
this.sendNotify("selector-picker-state-update", "ondisable");
}
disableSizeOverride() {
const browsingContext = this.browsingContext;
if (!browsingContext || browsingContext.parent !== null) {
return;
}
browsingContext.fullZoom = 1;
}
sendNotify(topic, msg = null) {
this.sendAsyncMessage("ZenBoost:Notify", { topic, msg });
}