Closed Bug 1698000 Opened 4 years ago Closed 4 years ago

Grace periods should disappear on block, not when blocks are cleared.

Categories

(Firefox :: Site Permissions, defect, P1)

Desktop
All
defect

Tracking

()

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: jib, Assigned: pbz)

References

(Blocks 1 open bug)

Details

(Whiteboard: [proton-door-hangers])

Attachments

(2 files)

+++ This bug was initially created as a clone of Bug #1693621 +++

(I'm filing this as a follow-up to bug 1693621 so the latter can land.)

STRs:

  1. Open https://mozilla.github.io/webrtc-landing/enumerate.html in a new tab
  2. Click Start Cam! and Allow in prompt
  3. Click Stop!
  4. Click Start Both! and Don't Allow in prompt
  5. Refresh the page with ↻
  6. Click Start Cam!

Expected result: prompt
Actual result: camera turns on

Reasoning:

  • The purpose of blocks is to block future getUserMedia calls, so having grace periods co-exist with them is confusing.
  • The fact that blocks can be lifted by ↻ while grace periods can't doesn't change user intent when enacting (as opposed to lifting) them.

Known corner-case:

  • Due to bug 1695757, there's a corner case with device switching, where a site may have an active camera, while at the same time be blocked from calling getUserMedia again. I don't think I care terribly about whether there's a grace period or not when that active camera stops capturing, as I'd rather we fix bug 1695757 to avoid that user trap.

Proposal:

  • Don't store opposing intents. If we clear all grace periods at the point a block is enacted, I think that should do the right thing.

Found by written test, which I'll add to this bug.

(obsolete)

Assignee: nobody → pbz
Status: NEW → ASSIGNED
Attachment #9208600 - Attachment description: Bug 1698000 - Test that permission grace periods are cleared by blocks. → Bug 1698000 - Test that permission grace periods are cleared by blocks. r=johannh!
Pushed by pzuhlcke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4c4a84ba40a5 Test that permission grace periods are cleared by blocks. r=jib,johannh https://hg.mozilla.org/integration/autoland/rev/bd76766e6018 Clear grace periods when user denies WebRTC permission prompt. r=johannh,jib
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: