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

2012-01-06 Thread Alexandru Chiculita
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?

Thanks,
Alex Chiculita
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


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

2012-01-06 Thread Dan Bernstein


On Jan 6, 2012, at 8:18 AM, Alexandru Chiculita ach...@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.
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev