Bug 6905

Summary: DumpRenderTree needs a way to force painting (to allow invalidation tests)
Product: WebKit Reporter: Eric Seidel (no email) <eric>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, justin.garcia, mitz
Priority: P4    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
Patch darin: review+

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];