[Fission] [meta] Deprecate the Canvas drawWindow() method for extensions
Categories
(WebExtensions :: General, task, P2)
Tracking
(Fission Milestone:M7a)
Fission Milestone | M7a |
People
(Reporter: cpeterson, Assigned: zombie)
References
(Blocks 2 open bugs)
Details
(Keywords: meta)
CanvasRenderingContext2D.drawWindow() won't work in some cases with Fission. If you're calling drawWindow() from an extension, you should switch to browser.tabs.captureTab(). If you're writing chrome code, you probably want to call WindowGlobalParent.drawSnapshot() from the parent process.
The WebExtension deprecation policy says we need to:
- ⬜ Announce on the dev-addons mailing list with the subject "Intent to deprecate".
- An Extensions blog post announced that
drawWindow()
won't work with Fission and introduced thecaptureTab()
andcaptureVisibleTab()
replacement APIs. - And mentioned in this Fission announcement in the Add-ons Discourse forum.
- But we should still post a Discourse announcement with the subject "Intent to deprecate CanvasRenderingContext2D.drawWindow()"
- An Extensions blog post announced that
⬜ Alter the addons-linter repository to warn developers using "web-ext lint" or AMO that the API is now deprecated.(addons-linter team recommends emailing authors instead: https://github.com/mozilla/addons-linter/issues/3661)- ✅ Alter Firefox to output a warning to the browser console: bug 1696976
- ✅ Update the docs on MDN. The MDN docs for
drawWindow()
have a big deprecation warning:-
This API cannot be used by Web content. It is synchronous, and as such can't capture cross-origin (out of process) iframes with Fission. If you're using it from an extension, you should switch to tabs.captureTab. If you're writing chrome code, you probably want WindowGlobalParent.drawSnapshot from the parent process.
-
- ⬜ Wait for change to ride the change to ride Firefox trains to release.
- ⬜ At a minimum, wait for 3 Firefox releases, from when the deprecation lands in nightly.
⬜ Alter the add-ons linter repository to fail if the API is present.- ⬜ Alter Firefox to remove the API: bug 1682545
- ⬜ Update the docs on MDN.
Andreas Wagner is searching the code of AMO extensions for drawWindow()
callers and DRAWWINDOW_
flags. We can then reach out to affected extension developers.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Reporter | ||
Comment 1•3 years ago
|
||
This meta bug doesn't need to block the Fission Beta experiment (M7). Looks like the drawWindow deprecation warning in bug 1696976 will land in time for M7, which will help diagnose beta bug reports related to screenshots.
Reporter | ||
Comment 2•3 years ago
|
||
Tomislav, now that we're logging an API warning (bug 1696976), it looks like the next steps (from comment 0) for drawWindow deprecation are:
- Post a Discourse announcement with the subject "Intent to deprecate CanvasRenderingContext2D.drawWindow()"
- Alter the addons-linter repository to warn developers using "web-ext lint" or AMO that the API is now deprecated.
Where should I file a bug for the addons-linter changes? We should add the addons-linter warning before we ship Fission, but I don't think we need to actually remove the drawWindow API or change the addons-linter warning to an error before we ship Fission.
Assignee | ||
Comment 3•3 years ago
|
||
Here's the addon linter bug https://github.com/mozilla/addons-linter/issues/3661, it looks like people are leaning toward a one time email to devs instead of a linter warning.
I'll work with Caitlin for the email and the Discourse announcement, potentially for next week.
Assignee | ||
Comment 4•3 years ago
|
||
Deprecation announced on Discourse and targeted emails scheduled, closing this.
https://discourse.mozilla.org/t/deprecation-announcement-for-canvas-drawwindow-method/79685
Assignee | ||
Updated•3 years ago
|
Description
•