New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 630356 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac , Fuchsia
Pri: 3
Type: Bug

Blocked on:
issue 448332
issue 607575



Sign in to add a comment

Make DisableReadingFromCanvas flag apply to WebGL

Project Member Reported by xlai@chromium.org, Jul 21 2016

Issue description

Currently, the disableReadingFromCanvas flag is used in HTMLCanvasElement 2d rendering context. Also the flag will be
used in OffscreenCanvas 2d context (CL 
https://codereview.chromium.org/2171563002/).

But the flag should apply to WebGL rendering context too, both in
OffscreenCanvas and HTMLCanvasElement. 
 
Status: WontFix (was: Available)
per discussion with kbr@, webgl interface doesn't have to worry about tainted canvas, because there is no API in that interface that could taint the canvas. In other words, this flag doesn't need to be applied to WebGL, it should be applied to 2D.

Comment 2 by junov@chromium.org, Aug 4 2016

Owner: xidac...@chromium.org
Status: Assigned (was: WontFix)
Re-opening this issue.
There is a misunderstanding about the purpose of this flag.  It has nothing to do with origin-cleanness, we just happened to implementit via the origin-clean flag for 2D canvas because doing it that way was practical. This flag is meant to prevent readbacks all the time because, among other things, readbacks can be used for fingerprinting.  This is true for WebGL too. For example, different GPU models and driver versions may have slightly different behaviors. These differences could be used to identify users who widh to browse anonymously.

Comment 3 by xlai@chromium.org, Aug 4 2016

Cc: kbr@chromium.org

Comment 4 by kbr@chromium.org, Aug 5 2016

Blockedon: 607575
 Issue 607575  doesn't provide enough background for people unfamiliar with the concept (like myself) to understand the motivation. Is this going to be a public-facing web API? Something exposed in Chrome's settings UI? Something turned on automatically in Incognito mode?

At first glance this changes the WebGL API's semantics significantly. Developers expect readPixels to work. The WebGL API does not allow tainting of the canvas ever, so the only pixels written to it were generated from the same origin as the top-level document. I'm concerned about the possibility of breaking WebGL content in workers, and in OffscreenCanvas scenarios.

Could someone please provide more motivation either here or in  Issue 607575  for changing the API in this way?

Comment 5 by junov@chromium.org, Aug 5 2016

It is a command line option, it has existed for a very long time in WebKit. AFAICT we just forgot to apply it to WebGL when WebGL was created.

This is a "use at your own risk" feature. It is expected that many sites will not work normally when the option is used.  We should not worry about it from a standards perspective, IMHO.

Comment 6 by junov@chromium.org, Aug 5 2016

Also the comment that describes the flag should be updated to be more general. It should not talk about origins or tainting.

https://cs.chromium.org/chromium/src/content/public/common/content_switches.cc?q=kDisableReadingFromCanvas&sq=package:chromium&type=cs&l=263

Comment 7 by kbr@chromium.org, Aug 5 2016

I rather think that the flag should be removed. What's the point of adding a never-tested option that will break web sites?

Comment 8 by junov@chromium.org, Aug 5 2016

I think that before deciding whether to remove or improve this feature we should do a bit of research to determine whether it still presents significant advantages over "canvas blocker" chrome extensions.

Comment 9 by xlai@chromium.org, Aug 5 2016

The detailed explanation of this flag is written in  crbug.com/448332 . There are 3 different CLs to implement this flag.
Cc: mkwst@chromium.org
Thanks for finding that. It is a lot more recent than I thought.

+mkwst

Comment 11 by kbr@chromium.org, Aug 5 2016

Blockedon: 448332
I'm dubious of the value of this flag especially given that it is expected that it will break large parts of the web.

Owner: ----
Status: Available (was: Assigned)
Labels: Hotlist-EnamelAndFriendsFixIt
Cc: msramek@chromium.org
Components: Privacy
Labels: -OS-All OS-Android OS-Chrome OS-Fuchsia OS-Linux OS-Mac OS-Windows
Note fingerprinting issue in #2.

Comment 15 by mkwst@chromium.org, Jan 22 2018

Owner: tnagel@chromium.org
Status: Assigned (was: Available)
tnagel@: Perhaps this fits with your work?
Labels: -Hotlist-EnamelAndFriendsFixIt
Cc: -junov@chromium.org
Components: -Privacy Privacy>Fingerprinting

Sign in to add a comment