Created attachment 46148 [details] Testcase The attached testcase has a WebGL canvas that draws a triangle. When you hover over it, it gains a border. In WebKit, at that point the contents of the canvas are lost. This does not happen in Firefox.
This actually works as expected on nightly. There is a bug with resizing, but it's filed (https://bugs.webkit.org/show_bug.cgi?id=30073)
Reopening, since this will be an issue once the patch in bug 33361 is landed. The issue is that, for a directly composited WebGL layer, HTMLCanvasElement::paint() may never be called, so the beginPaint()/reshape()/endPaint() calls will never be called on the WebGLRenderingContext. Now, some style change can happen that requires that the canvas's layer gets backing store and paints (say, a border is added). Then this method will call WebGLRenderingContext::reshape(), which causes the canvas to be cleared.
Works now