Bug 6905 - DumpRenderTree needs a way to force painting (to allow invalidation tests)
Summary: DumpRenderTree needs a way to force painting (to allow invalidation tests)
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P4 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-28 23:16 PST by Eric Seidel (no email)
Modified: 2006-04-23 12:18 PDT (History)
3 users (show)

See Also:


Attachments
Patch (3.27 KB, patch)
2006-04-20 08:36 PDT, mitz
darin: 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) 2006-01-28 23:16:14 PST
DumpRenderTree needs a way to force painting (to allow invalidation tests)
Comment 1 mitz 2006-04-20 08:36:00 PDT
Created attachment 7850 [details]
Patch
Comment 2 Darin Adler 2006-04-20 09:25:02 PDT
Comment on attachment 7850 [details]
Patch

Looks like a good start.
Comment 3 Darin Adler 2006-04-20 09:26:15 PDT
Comment on attachment 7850 [details]
Patch

To be more clear what I mean about that, I think eventually we want to come up with a testing approach that detects if we repaint too much as well as something that detects when we repaint too little.
Comment 4 mitz 2006-04-22 01:32:43 PDT
(In reply to comment #3)
> (From update of attachment 7850 [details] [edit])
> To be more clear what I mean about that, I think eventually we want to come up
> with a testing approach that detects if we repaint too much as well as
> something that detects when we repaint too little.
> 

Something like

- (void)display
{
    NSView *webView = [frame webView];
    [webView display];
    [webView lockFocus];
    [[NSColor blackColor] set];
    NSRectFill([webView frame]);
    [webView unlockFocus];
    readFromWindow = YES;
}

Will let you see exactly what was repainted (except if it was black).
Comment 5 mitz 2006-04-22 01:52:35 PDT
(In reply to comment #4)
>     [[NSColor blackColor] set];

or perhaps better yet, [[[NSColor blackColor] colorWithAlphaComponent:0.5] set];