Again, I started to work on bug 15565 and ended up cleaning up more DRT code. This is sorta a continuation of bug 16080, but I've attached the patches separately here. This change also includes the resultString/resultData change found originally in bug 15558 (since this undoubtably breaks the patch attached to bug 15558).
Created attachment 17437 [details] [PATCH] More refactoring for greater code readability WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm | 384 +++++++++++--------- WebKitTools/DumpRenderTree/mac/DumpRenderTreeMac.h | 2 +- WebKitTools/DumpRenderTree/mac/UIDelegate.mm | 2 +- 3 files changed, 220 insertions(+), 168 deletions(-)
Comment on attachment 17437 [details] [PATCH] More refactoring for greater code readability Your setup* methods should really be setUp*, since you're using the verb "to set up", not the noun "setup". r=me, assuming the tests still pass :-)
Created attachment 17439 [details] [PATCH] Break out more of DumpRenderTree.mm into individual files .../DumpRenderTree.xcodeproj/project.pbxproj | 24 ++ WebKitTools/DumpRenderTree/mac/CheckedMalloc.cpp | 59 ++++ WebKitTools/DumpRenderTree/mac/CheckedMalloc.h | 31 ++ WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm | 320 +------------------- WebKitTools/DumpRenderTree/mac/DumpRenderTreeMac.h | 3 + .../DumpRenderTree/mac/DumpRenderTreePasteboard.h | 1 + .../DumpRenderTree/mac/DumpRenderTreePasteboard.m | 1 + .../DumpRenderTree/mac/DumpRenderTreeWindow.h | 1 + .../DumpRenderTree/mac/DumpRenderTreeWindow.mm | 1 + .../DumpRenderTree/mac/JavaScriptThreading.cpp | 132 ++++++++ .../DumpRenderTree/mac/JavaScriptThreading.h | 35 +++ WebKitTools/DumpRenderTree/mac/PixelDumpSupport.h | 38 +++ WebKitTools/DumpRenderTree/mac/PixelDumpSupport.mm | 221 ++++++++++++++ 13 files changed, 558 insertions(+), 309 deletions(-)
Comment on attachment 17439 [details] [PATCH] Break out more of DumpRenderTree.mm into individual files I'm re-using this bug because it was already here. Another relatively simple patch, restructuring more of DRT into individual files. At some level this is needless code-churn. At another, this is useful not only to future DRT hackers (for better hackability) but also for possible future abstraction. For example, CheckedMalloc could already be used by any other DRT implementation. With a little tweaking (to remove CF dependencies) JavaScriptThreading.* could as well.