The Color Adjust demo is blue in Firefox 5.0b5. It is OK in 4.0.1. The Web Console shows an infinite loop of the following error: uncaught exception: [Exception... "Failure arg 6 [nsIDOMWebGLRenderingContext.texSubImage2D]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://webglsamples.googlecode.com/hg/color-adjust/color-adjust.html :: render :: line 437" data: no]
Just before the exception, I get this in the JS console: Warning: WebGL: It is forbidden to load a WebGL texture from a cross-domain element. See https://developer.mozilla.org/en/WebGL/Cross-Domain_Textures Source File: http://webglsamples.googlecode.com/hg/color-adjust/color-adjust.html Line: 437 So this is just another demo broken by bug 656277. A tracking bug for such demos has been opened: bug 662570.
...though, you should have gotten a DOM_SECURITY_ERR error here... investigating.
Created attachment 538928 [details] [diff] [review] patch This is a quite stupid patch in already stupid code; the reason why it's so dumb is that it has to determine whether the argument is a DOMElement or ImageData and we don't have a real ImageData interface, see bug 637077, so it has to use duck typing. We should revisit this whole code once bug 637077 is fixed.
We'll live with the incorrect error for Firefox 5, tracking-firefox5:-
(In reply to comment #5) > We'll live with the incorrect error for Firefox 5, tracking-firefox5:- The main issue is not about an incorrect error but about a non-working Google demo (regression from 4.0.1).
(In reply to comment #6) > (In reply to comment #5) > > We'll live with the incorrect error for Firefox 5, tracking-firefox5:- > The main issue is not about an incorrect error but about a non-working > Google demo (regression from 4.0.1). This is a known unavoidable problem, see bug 662570 and http://hacks.mozilla.org/2011/06/cross-domain-webgl-textures-disabled-in-firefox-5/
We will not track this one specifically for Firefox 6 but we'd likely take a patch if it was nominated. Please do so.
Comment on attachment 538928 [details] [diff] [review] patch Approved for mozilla-aurora. Please land on mozilla-central as well.
Landed on central: http://hg.mozilla.org/mozilla-central/rev/baa619406bea
Landed on aurora: http://hg.mozilla.org/releases/mozilla-aurora/rev/124306745839
Mozilla/5.0 (Windows NT 6.1; rv:7.0) Gecko/20100101 Firefox/7.0 Marking VERIFIED because if I visit the page in Firefox 7 i get the correct error [18:30:45.840] uncaught exception: [Exception... "Security error" code: "1000" nsresult: "0x805303e8 (NS_ERROR_DOM_SECURITY_ERR)" location: "http://webglsamples.googlecode.com/hg/color-adjust/color-adjust.html Line: 437"]