Bug 33392 - WebGL content disappears when style changes
Summary: WebGL content disappears when style changes
Status: REOPENED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Dean Jackson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-08 11:47 PST by Simon Fraser (smfr)
Modified: 2014-01-09 20:37 PST (History)
2 users (show)

See Also:


Attachments
Testcase (5.62 KB, text/html)
2010-01-08 11:47 PST, Simon Fraser (smfr)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2010-01-08 11:47:07 PST
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.
Comment 1 Chris Marrin 2010-01-08 13:24:10 PST
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)
Comment 2 Simon Fraser (smfr) 2010-01-08 13:51:27 PST
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.