Title: [97327] trunk/Tools
Revision
97327
Author
[email protected]
Date
2011-10-12 17:57:11 -0700 (Wed, 12 Oct 2011)

Log Message

Many WK2 snapshots are blank
https://bugs.webkit.org/show_bug.cgi?id=69953

Reviewed by Beth Dakin.

Two fixes:
1. negating a size_t in CGContextTranslateCTM() fails, because
size_t is unsigned. Fix by casing to CGFloat before negation.

2. Turn on window autodisplay, so that compositing tests snapshot correctly.
Autodisplay is necessary to kick off Core Animation rendering.

* WebKitTestRunner/cg/TestInvocationCG.cpp:
(WTR::createCGContextFromImage):
* WebKitTestRunner/mac/PlatformWebViewMac.mm:
(WTR::PlatformWebView::PlatformWebView):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (97326 => 97327)


--- trunk/Tools/ChangeLog	2011-10-13 00:50:54 UTC (rev 97326)
+++ trunk/Tools/ChangeLog	2011-10-13 00:57:11 UTC (rev 97327)
@@ -1,3 +1,22 @@
+2011-10-12  Simon Fraser  <[email protected]>
+
+        Many WK2 snapshots are blank
+        https://bugs.webkit.org/show_bug.cgi?id=69953
+
+        Reviewed by Beth Dakin.
+        
+        Two fixes:
+        1. negating a size_t in CGContextTranslateCTM() fails, because
+        size_t is unsigned. Fix by casing to CGFloat before negation.
+        
+        2. Turn on window autodisplay, so that compositing tests snapshot correctly.
+        Autodisplay is necessary to kick off Core Animation rendering.
+
+        * WebKitTestRunner/cg/TestInvocationCG.cpp:
+        (WTR::createCGContextFromImage):
+        * WebKitTestRunner/mac/PlatformWebViewMac.mm:
+        (WTR::PlatformWebView::PlatformWebView):
+
 2011-10-12  Adam Barth  <[email protected]>
 
         commit-queue doesn't have a friendly error message when the reviewer line is messed up

Modified: trunk/Tools/WebKitTestRunner/cg/TestInvocationCG.cpp (97326 => 97327)


--- trunk/Tools/WebKitTestRunner/cg/TestInvocationCG.cpp	2011-10-13 00:50:54 UTC (rev 97326)
+++ trunk/Tools/WebKitTestRunner/cg/TestInvocationCG.cpp	2011-10-13 00:57:11 UTC (rev 97327)
@@ -66,7 +66,7 @@
     if (flip == FlipGraphicsContext) {
         CGContextSaveGState(context);
         CGContextScaleCTM(context, 1, -1);
-        CGContextTranslateCTM(context, 0, -pixelsHigh);
+        CGContextTranslateCTM(context, 0, -static_cast<CGFloat>(pixelsHigh));
     }
     
     CGContextDrawImage(context, CGRectMake(0, 0, pixelsWide, pixelsHigh), image.get());

Modified: trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm (97326 => 97327)


--- trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm	2011-10-13 00:50:54 UTC (rev 97326)
+++ trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm	2011-10-13 00:57:11 UTC (rev 97327)
@@ -58,7 +58,6 @@
     [m_window setColorSpace:[NSColorSpace genericRGBColorSpace]];
     [[m_window contentView] addSubview:m_view];
     [m_window orderBack:nil];
-    [m_window setAutodisplay:NO];
     [m_window setReleasedWhenClosed:NO];
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to