[webkit-dev] Load event for cached resources in DRT

Dan Bernstein mitz at apple.com
Fri Jan 6 08:27:06 PST 2012



On Jan 6, 2012, at 8:18 AM, Alexandru Chiculita <achicu at adobe.com> wrote:

> I need to add more tests for CSS Shaders, but I couldn't find a nice way to know that a cached resource is loaded. So the result is that in DRT the screenshot is taken too early. Other tests use the "onload" event of the associated tag (ie. img, iframe, script), but CSS Shaders have no such tag. Do you know if there's any DRT method that forces a sync load or waits for a specific resource?
> 
> If not, I think a workaround would be to use a hidden iframe (or script tag) and the "onload" event. Other ideas?

What triggers loading the shaders? If you can force them to start loading before the load event fires, then it shouldn't fire until they're finished loading. This is the case with custom fonts: the forced layout that happens when we finish parsing the main resource triggers the requests for @font-face sources, and thus holds up the load event.


More information about the webkit-dev mailing list