Commit 6efe1ac5 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 29520e5d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -173,6 +173,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
@@ -2071,6 +2071,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;
@@ -15569,7 +15572,8 @@ class SignatureManager {
    this.#uiManager.removeEditListeners();
    const isStorageFull = this.#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();