[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Public WebGL] Bug in context-lost.html test




The test does this:

  image = document.createElement("image");

and then later does this:

  gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE,
                image);

This passes in Chrome because as far as I can see WebKit has a bug that causes the createElement call above to create an HTMLImageElement (with localName "img"); per spec it should create an HTMLElement (with localName "image").

This used to pass in Gecko because Gecko would actually accept any HTMLElement as the last argument to texImage2D and silently do nothing if it couldn't get an image out of it. So the call did not throw, and the test didn't actually test that the call had behaved correctly.

With my update of Gecko to use WebIDL for the WebGL context, Gecko now fails the test, which is the correct behavior given the test code.

I believe the test should be passing "img" to createElement here.

-Boris

-----------------------------------------------------------
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------