Can't sample from packaged apps' icons in WebGL

RESOLVED INVALID

Status

()

RESOLVED INVALID
4 years ago
4 years ago

People

(Reporter: nick, Unassigned)

Tracking

30 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

In FxOS 2.0+ there will be the ability to have custom homescreens.  I'm working on one now.  Unfortunately, sampling fails with "this operation is insecure" message, probably because the src's of the images all begin with app:// (for packaged apps).  Can we allow app:// url's to be sampled from within WebGL?

Now that I think about it, it's going to be tough to sample icons for hosted apps, since they are cross domain.  Any way we can enable developers to create 3D home screens for Firefox OS?
I'm not very familiar with sampling, and there are lots of places that cause that or a similar error[0] so I'm probably not gonna be very helpful... what exactly is the operation and in what context?  Are you trying to read bytes from a canvas via content script?

[0] http://mxr.mozilla.org/mozilla-central/ident?i=NS_ERROR_DOM_SECURITY_ERR
(In reply to Nick Desaulniers [:\n] from comment #0)
> In FxOS 2.0+ there will be the ability to have custom homescreens.  I'm
> working on one now.  Unfortunately, sampling fails with "this operation is
> insecure" message, probably because the src's of the images all begin with
> app:// (for packaged apps).  Can we allow app:// url's to be sampled from
> within WebGL?
We can't allow them in general, but this should be allowed for privileged content. If homescreens aren't privileged content, then basically we can't support this operation.
> 
> Now that I think about it, it's going to be tough to sample icons for hosted
> apps, since they are cross domain.  Any way we can enable developers to
> create 3D home screens for Firefox OS?
CSS 3D transforms can operate on tainted data.
Actually, Harald Kirschner :digitarald, pointed out to me that I should be able to load the images as blobs using systemXHR in FxOS.  I don't believe that blobs are subject to origin policies.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.