Most of WebGLRenderingContext's texImage2D and texSubImage2D code paths, in particular those taking DOM elements and ImageData, have to pack the texture data into a temporary buffer before uploading. This temporary buffer is tightly packed, so the UNPACK_ALIGNMENT pixel store parameter has to be set to 1 during the upload. This was done for texImage2D a long time ago but is missing in the texSubImage2D code paths.
Created attachment 143095 [details] Patch
Comment on attachment 143095 [details] Patch R=me. C++ changes look fine, I haven't carefully looked at the layout tests but since they are imports I'm assuming they are fine.
Comment on attachment 143095 [details] Patch Clearing flags on attachment: 143095 Committed r117918: <http://trac.webkit.org/changeset/117918>
All reviewed patches have been landed. Closing bug.
(In reply to comment #2) > (From update of attachment 143095 [details]) > R=me. C++ changes look fine, I haven't carefully looked at the layout tests but since they are imports I'm assuming they are fine. They weren't. This started 4 failures on Mac bots http://build.webkit.org/results/Lion%20Release%20(Tests)/r117918%20(8526)/results.html