w3c / w3c/webextensions

Proposal: Clarify the scale parameter for tabs.captureVisibleTab

Open
#855 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs-triage: firefox needs-triage: safari
Dominant language
Bikeshed
Stars
711
Forks
95
Avg merge
10d 11h
Merged PRs (30d)
2

Description

Following the recent implementation of the rect parameter in tabs.captureVisibleTab in Chrome (see w3c/webextensions#850), we also added the scale parameter, which is already supported by Firefox.

However, we've realized that the behavior of the scale param differs between Chrome and Firefox as reported here in this issue tracker.

Image

Firefox (top row): scale controls the rendering resolution of the captured image. A developer can capture the same rectangular area at different resolutions just by changing the scale value.

Chrome (bottom row): scale adjusts the dimensions of the capture rectangle itself, not the resolution of the content within it.

We're unlikely to handle capturing at a higher resolution like what Firefox does in the near future as we do not have a way to re-render content at a different DPI of the rendering surface itself.

We wanted to double check to see which is the intended behavior (should scale be controlling resolution or dimensions?).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the tabs.captureVisibleTab specification and its scale parameter, then compare the Chrome report and Firefox documentation linked in the issue. Done means reaching agreement on whether scale controls resolution or capture dimensions and updating the specification to state that behavior clearly.

Written by the indexing model from the issue text.

Assessment

Domain
api, web-dev
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.