Bug 68453 - Repaint tests don't work in WebKit2
Summary: Repaint tests don't work in WebKit2
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords:
Depends on: 68644
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-20 11:33 PDT by Simon Fraser (smfr)
Modified: 2011-09-26 23:16 PDT (History)
12 users (show)

See Also:


Attachments
Have FrameView track repaint rects and expose them in WK1 (8.02 KB, patch)
2011-09-22 11:51 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff
Have FrameView track repaint rects and expose them in WK1 (8.16 KB, patch)
2011-09-23 17:37 PDT, Simon Fraser (smfr)
sam: review+
Details | Formatted Diff | Diff
Expose repaint rects through WK2 private API (17.65 KB, patch)
2011-09-23 17:49 PDT, Simon Fraser (smfr)
sam: review+
webkit.review.bot: commit-queue-
Details | Formatted Diff | Diff
Use the repaint rects to generate the repaint overlay in DRT and WTR (14.73 KB, patch)
2011-09-23 17:56 PDT, Simon Fraser (smfr)
sam: review+
gustavo.noronha: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2011-09-20 11:33:10 PDT
layoutTestController.display() does nothing in WebKit2. Making it behave the same way as WK1 is tricky, because the WebProcess would have to retain a bitmap for the entire page, with the alpha wash, and then copy parts over to the UI process.

A better solution is to keep track of the repaint rects in WebCore, and add layout test controller API to retrieve them. We can then use these rects to synthesize the repaint pixel results.
Comment 1 Simon Fraser (smfr) 2011-09-22 11:51:08 PDT
Created attachment 108373 [details]
Have FrameView track repaint rects and expose them in WK1
Comment 2 Adam Roben (:aroben) 2011-09-22 11:54:18 PDT
Comment on attachment 108373 [details]
Have FrameView track repaint rects and expose them in WK1

View in context: https://bugs.webkit.org/attachment.cgi?id=108373&action=review

> Source/WebKit/mac/WebView/WebViewPrivate.h:499
> +- (void)setTracksRepaints:(BOOL)flag;
> +- (BOOL)isTrackingRepaints;
> +- (void)resetTrackedRepaints;
> +- (NSArray*)trackedRepaintRects; // Returned array contains rectValue NSValues.

Do we need WebKit SPI for this? Can DRT make calls directly to window.internals from native code?
Comment 3 Adam Barth 2011-09-22 12:07:17 PDT
+dglazkov for the window.internals question.
Comment 4 Simon Fraser (smfr) 2011-09-23 17:37:57 PDT
Created attachment 108567 [details]
Have FrameView track repaint rects and expose them in WK1
Comment 5 Simon Fraser (smfr) 2011-09-23 17:38:40 PDT
Comment on attachment 108567 [details]
Have FrameView track repaint rects and expose them in WK1

Change from the previous patch is to have FrameView unapply the scroll offset from the rects.
Comment 6 Simon Fraser (smfr) 2011-09-23 17:49:16 PDT
Created attachment 108569 [details]
Expose repaint rects through WK2 private API
Comment 7 Simon Fraser (smfr) 2011-09-23 17:56:10 PDT
Created attachment 108571 [details]
Use the repaint rects to generate the repaint overlay in DRT and WTR
Comment 8 WebKit Review Bot 2011-09-23 20:51:51 PDT
Comment on attachment 108569 [details]
Expose repaint rects through WK2 private API

Attachment 108569 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/9840142
Comment 9 Gustavo Noronha (kov) 2011-09-24 04:30:04 PDT
Comment on attachment 108569 [details]
Expose repaint rects through WK2 private API

Attachment 108569 [details] did not pass gtk-ews (gtk):
Output: http://queues.webkit.org/results/9844242
Comment 10 Collabora GTK+ EWS bot 2011-09-24 04:31:00 PDT
Comment on attachment 108571 [details]
Use the repaint rects to generate the repaint overlay in DRT and WTR

Attachment 108571 [details] did not pass gtk-ews (gtk):
Output: http://queues.webkit.org/results/9856002
Comment 11 Simon Fraser (smfr) 2011-09-26 10:07:25 PDT
Later patches are failing because they require the FrameView changes.
Comment 12 Sam Weinig 2011-09-26 10:11:47 PDT
Comment on attachment 108567 [details]
Have FrameView track repaint rects and expose them in WK1

View in context: https://bugs.webkit.org/attachment.cgi?id=108567&action=review

> Source/WebCore/page/FrameView.h:454
> +    bool m_isTrackingRepaints; // Used for testing.
> +    Vector<LayoutRect> m_trackedRepaintRects;

This seems like it should be IntRects.
Comment 13 Sam Weinig 2011-09-26 10:15:13 PDT
Comment on attachment 108571 [details]
Use the repaint rects to generate the repaint overlay in DRT and WTR

View in context: https://bugs.webkit.org/attachment.cgi?id=108571&action=review

> Tools/DumpRenderTree/mac/PixelDumpSupportMac.mm:152
> +    if (repaintRects) {
> +        
> +        for (NSValue *value in repaintRects) {

Unnecessary newline.
Comment 14 Simon Fraser (smfr) 2011-09-26 11:56:27 PDT
Comment on attachment 108567 [details]
Have FrameView track repaint rects and expose them in WK1

http://trac.webkit.org/changeset/95967
Comment 15 Simon Fraser (smfr) 2011-09-26 12:00:47 PDT
Comment on attachment 108569 [details]
Expose repaint rects through WK2 private API

http://trac.webkit.org/changeset/95968
Comment 16 Simon Fraser (smfr) 2011-09-26 15:33:40 PDT
http://trac.webkit.org/changeset/96005
Comment 17 Csaba Osztrogonác 2011-09-26 23:16:36 PDT
Qt-WK2 buildfixes landed in
http://trac.webkit.org/changeset/95989 
http://trac.webkit.org/changeset/96071