In the CSS Shaders tests we've used setTimeout to make sure the resources are loaded and the painting is ready. Remove the setTimeout.
We cannot remove the setTimeout, but we can make the setTimeout use a 0 delay. The problem is that the onload event is triggered before the last resource notifies its clients that it finished. The code is in SubresourceLoader::releaseResources() which calls "m_document->cachedResourceLoader()->loadDone();" before "m_resource->stopLoading();" . "loadDone()" triggers the onload JS event. Even if we do a layout in this event the RenderLayer is not notified yet that the resources are now loaded and ready for paint. The notification will come only after the onload event is triggered, meaning that a simple setTimeout("", 0) will do the trick.
Created attachment 123120 [details] Patch V1 It was much simpler than I expected. It just needed to call the CachedResource::data in CachedShader::data when the resource was finished. Otherwise the notification was postponed only after the onload event.
Comment on attachment 123120 [details] Patch V1 Clearing flags on attachment: 123120 Committed r105454: <http://trac.webkit.org/changeset/105454>
All reviewed patches have been landed. Closing bug.