We need an equivilent DumpKCanvasTree, like DumpRenderTree for khml. This will allow for much faster KSVG regression testing.
Created attachment 3235 [details] A preliminary patch, which seems to work except for a pesky crash
Created attachment 3237 [details] DumpKCanvasTree tool, including a few necessary WebCore+SVG changes.
There are several components to this most recent patch. #1 fixes the previous crash, by removing the "delete renderingDevice" from KCanvas, the renderingDevice is treated as a singleton under WebCore. #2 adds two methods to KCanvasContainer to allow traversal of children #3 includes a full "first pass" implementation of DumpKCanvasTree (modeled after DumpRenderTree) #4 includes KCanvasTreeDebug.* support files, and renderTreeAsExternalRepresentation addition to DrawDocument #5 includes missing operator<<(float) and operator<<(double) for QTextStream (declared but not previously defined). #6 includes a somewhat unrelated fix to bison build script, removing bison generated headers before running bison to prevent double-concat. #7 includes run-webkit-tests-svg script for running DumpKCanvasTree.
Comment on attachment 3237 [details] DumpKCanvasTree tool, including a few necessary WebCore+SVG changes. I'm not really happy with the copy and paste approach to developing scripts. And also I'm worried that there are too many scripts. It's now to the point where almost half the scripts in the scripts directory are SVG-specific -- I worked hard to keep the number of scripts needed for WebKit to a minimum and this is pulling in the other direction. For example, WebKit has two build scripts, and SVG has a lot more. Having a script named run-webkit-tests-svg makes it harder to use bash completion to type run-webkit-tests. All that having been said, I guess it's OK to land this.
Darin and I talked about this offline, and I followed up with: http://bugzilla.opendarwin.org/show_bug.cgi?id=4300