Bug 16087 - Clean up more DRT code
Summary: Clean up more DRT code
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-21 16:46 PST by Eric Seidel (no email)
Modified: 2007-12-02 00:54 PST (History)
0 users

See Also:


Attachments
[PATCH] More refactoring for greater code readability (22.79 KB, patch)
2007-11-21 16:47 PST, Eric Seidel (no email)
aroben: review+
Details | Formatted Diff | Diff
[PATCH] Break out more of DumpRenderTree.mm into individual files (50.55 KB, patch)
2007-11-21 19:48 PST, Eric Seidel (no email)
timothy: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2007-11-21 16:46:24 PST
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).
Comment 1 Eric Seidel (no email) 2007-11-21 16:47:36 PST
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 2 Adam Roben (:aroben) 2007-11-21 17:45:30 PST
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 :-)
Comment 3 Eric Seidel (no email) 2007-11-21 19:48:44 PST
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 4 Eric Seidel (no email) 2007-11-21 19:50:24 PST
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.