Commit 86c09c76 authored by ma1's avatar ma1 Committed by Pier Angelo Vendrame
Browse files

BB 44125: Do not offer to save signatures by default in Private Browsing Mode

parent d66a7bdd
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -148,6 +148,8 @@ export class PdfjsParent extends JSWindowActorParent {
        return this.#getSignatures(data);
      case "delete":
        return this.#deleteSignature(data);
      case "isVolatile":
        return lazy.PrivateBrowsingUtils.isBrowserPrivate(this.browser);
      default:
        return null;
    }
+5 −1
Original line number Diff line number Diff line
@@ -2009,6 +2009,9 @@ class SignatureStorage {
  async size() {
    return (await this.getAll()).size;
  }
  async isVolatile() {
    return await this.#handleSignature({action: "isVolatile"});
  }
  async create(data) {
    if (await this.isFull()) {
      return null;
@@ -12751,7 +12754,8 @@ class SignatureManager {
    this.#uiManager.removeEditListeners();
    const isStorageFull = await this.#signatureStorage.isFull();
    this.#saveContainer.classList.toggle("fullStorage", isStorageFull);
    this.#saveCheckbox.checked = !isStorageFull;
    const isVolatile = await this.#signatureStorage.isVolatile();
    this.#saveCheckbox.checked = !(isStorageFull || isVolatile);
    await this.#overlayManager.open(this.#dialog);
    const tabType = this.#tabButtons.get("type");
    tabType.focus();