Closed Bug 1784920 Opened 2 years ago Closed 7 months ago

Add `activeTab` as permission for `tabs.captureVisibleTab` API

Categories

(WebExtensions :: General, enhancement, P2)

Firefox 104
enhancement

Tracking

(firefox126 fixed)

RESOLVED FIXED
126 Branch
Tracking Status
firefox126 --- fixed

People

(Reporter: juraj.masiar, Assigned: willdurand)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-complete, Whiteboard: [addons-jira])

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0

Steps to reproduce:

From what I can see in the docs, both Chrome and Safari (see compatibility table) requires only activeTab permission to capture the tab.

Why is this different in Firefox?
The problem is, that even super simple addons that needs to work with screenshots now requires this huge permission that nobody likes.

And I see no reason why. The addon with active:tab has already full HTML access, so what else is there to hide?
Thanks :)

The Bugbug bot thinks this bug should belong to the 'Firefox::Tabbed Browser' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Tabbed Browser

Thank you for submitting this enhancement. I'll set this to NEW and waiting for the developer's opinion about it.

Status: UNCONFIRMED → NEW
Ever confirmed: true

Thanks!
Just to clarify and summarize my original post:

  • currently addons needs <all_urls> permission to use tabs.captureVisibleTab
  • I'm suggesting adding also activeTab permission
  • Chrome and Safari already supports activeTab permission for this API

I coincidentally came across this bug when searching for captureVisibleTab. I'm moving this to the right component so that it can be seen by the right developers (extension team).

Blocks: 1800421
Component: Tabbed Browser → General
Product: Firefox → WebExtensions

This sounds reasonable.

Some additional considerations: we now treat activeTab as only covering same-origin iframes, to better align with new host permission controls and user expectations, but change in this bug would mean we're muddling the the water again. I think the compromise is still worth it here, because (unlike other considerations with different-origin iframes) this would capture only what is visible (and "obvious") in the tab.

Severity: -- → N/A
Priority: -- → P2
Whiteboard: [addons-jira]
Assignee: nobody → wdurand
Status: NEW → ASSIGNED
Attachment #9395489 - Attachment description: Bug 1784920 - Add `activeTab` as permission for `tabs.captureVisibleTab` API. r?robwu! → WIP: Bug 1784920 - Add `activeTab` as permission for `tabs.captureVisibleTab` API. r?robwu!
Attachment #9395489 - Attachment description: WIP: Bug 1784920 - Add `activeTab` as permission for `tabs.captureVisibleTab` API. r?robwu! → Bug 1784920 - Add `activeTab` as permission for `tabs.captureVisibleTab` API. r?robwu!
Pushed by wdurand@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/740ec3fa0c99 Add `activeTab` as permission for `tabs.captureVisibleTab` API. r=robwu,geckoview-reviewers,amejiamarmol
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 126 Branch
Keywords: dev-doc-needed
Flags: needinfo?(wdurand)
Flags: needinfo?(wdurand)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: