Title: [198302] trunk
Revision
198302
Author
[email protected]
Date
2016-03-16 14:31:18 -0700 (Wed, 16 Mar 2016)

Log Message

[mac] Printing test snapshots are upside-down after r198242
https://bugs.webkit.org/show_bug.cgi?id=155543

Reviewed by Simon Fraser.

Source/WebCore:

* page/PrintContext.cpp:
(WebCore::PrintContext::spoolAllPagesWithBoundaries):
Stop PLATFORM(COCOA)-conditionally flipping here. Just paint.
This function is only used by the test runners so this doesn't have a
huge impact on anything else.

Tools:

* DumpRenderTree/mac/PixelDumpSupportMac.mm:
(createPagedBitmapContext):
Flip printing snapshots in DRT so that everything is right-side-up.

LayoutTests:

* TestExpectations:
Re-un-skip these tests.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (198301 => 198302)


--- trunk/LayoutTests/ChangeLog	2016-03-16 20:58:29 UTC (rev 198301)
+++ trunk/LayoutTests/ChangeLog	2016-03-16 21:31:18 UTC (rev 198302)
@@ -1,3 +1,13 @@
+2016-03-16  Tim Horton  <[email protected]>
+
+        [mac] Printing test snapshots are upside-down after r198242
+        https://bugs.webkit.org/show_bug.cgi?id=155543
+
+        Reviewed by Simon Fraser.
+
+        * TestExpectations:
+        Re-un-skip these tests.
+
 2016-03-16  Ryan Haddad  <[email protected]>
 
         Marking inspector/controller/runtime-controller.html as flaky on mac

Modified: trunk/LayoutTests/TestExpectations (198301 => 198302)


--- trunk/LayoutTests/TestExpectations	2016-03-16 20:58:29 UTC (rev 198301)
+++ trunk/LayoutTests/TestExpectations	2016-03-16 21:31:18 UTC (rev 198302)
@@ -897,10 +897,6 @@
 
 webkit.org/b/94458 http/tests/security/aboutBlank/security-context-write.html [ Skip ]
 
-webkit.org/b/155543 printing/quirks-percentage-height-body.html [ Skip ]
-webkit.org/b/155543 printing/quirks-percentage-height.html [ Skip ]
-webkit.org/b/155543 printing/standards-percentage-heights.html [ Skip ]
-
 ########################################
 ### START OF IndexedDB failures
 

Modified: trunk/Source/WebCore/ChangeLog (198301 => 198302)


--- trunk/Source/WebCore/ChangeLog	2016-03-16 20:58:29 UTC (rev 198301)
+++ trunk/Source/WebCore/ChangeLog	2016-03-16 21:31:18 UTC (rev 198302)
@@ -1,3 +1,16 @@
+2016-03-16  Tim Horton  <[email protected]>
+
+        [mac] Printing test snapshots are upside-down after r198242
+        https://bugs.webkit.org/show_bug.cgi?id=155543
+
+        Reviewed by Simon Fraser.
+
+        * page/PrintContext.cpp:
+        (WebCore::PrintContext::spoolAllPagesWithBoundaries):
+        Stop PLATFORM(COCOA)-conditionally flipping here. Just paint.
+        This function is only used by the test runners so this doesn't have a
+        huge impact on anything else.
+
 2016-03-16  Daniel Bates  <[email protected]>
 
         Update WebKit Feature Status page to include the status of Content Security Policy Level 2 and Level 3

Modified: trunk/Source/WebCore/page/PrintContext.cpp (198301 => 198302)


--- trunk/Source/WebCore/page/PrintContext.cpp	2016-03-16 20:58:29 UTC (rev 198301)
+++ trunk/Source/WebCore/page/PrintContext.cpp	2016-03-16 21:31:18 UTC (rev 198302)
@@ -341,10 +341,6 @@
     graphicsContext.fillRect(FloatRect(0, 0, pageWidth, totalHeight));
 
     graphicsContext.save();
-#if PLATFORM(COCOA)
-    graphicsContext.translate(0, totalHeight);
-    graphicsContext.scale(FloatSize(1, -1));
-#endif
 
     int currentHeight = 0;
     for (size_t pageIndex = 0; pageIndex < pageRects.size(); pageIndex++) {

Modified: trunk/Tools/ChangeLog (198301 => 198302)


--- trunk/Tools/ChangeLog	2016-03-16 20:58:29 UTC (rev 198301)
+++ trunk/Tools/ChangeLog	2016-03-16 21:31:18 UTC (rev 198302)
@@ -1,3 +1,14 @@
+2016-03-16  Tim Horton  <[email protected]>
+
+        [mac] Printing test snapshots are upside-down after r198242
+        https://bugs.webkit.org/show_bug.cgi?id=155543
+
+        Reviewed by Simon Fraser.
+
+        * DumpRenderTree/mac/PixelDumpSupportMac.mm:
+        (createPagedBitmapContext):
+        Flip printing snapshots in DRT so that everything is right-side-up.
+
 2016-03-16  Alexey Proskuryakov  <[email protected]>
 
         Update unit test for iOS debug queues.

Modified: trunk/Tools/DumpRenderTree/mac/PixelDumpSupportMac.mm (198301 => 198302)


--- trunk/Tools/DumpRenderTree/mac/PixelDumpSupportMac.mm	2016-03-16 20:58:29 UTC (rev 198301)
+++ trunk/Tools/DumpRenderTree/mac/PixelDumpSupportMac.mm	2016-03-16 21:31:18 UTC (rev 198302)
@@ -205,7 +205,12 @@
     size_t rowBytes = 0;
     void* buffer = 0;
 
-    RefPtr<BitmapContext> bitmapContext = createBitmapContext(pageWidthInPixels, numberOfPages * (pageHeightInPixels + 1) - 1, rowBytes, buffer);
-    [mainFrame printToCGContext:bitmapContext->cgContext() pageWidth:pageWidthInPixels pageHeight:pageHeightInPixels];
+    int totalHeight = numberOfPages * (pageHeightInPixels + 1) - 1;
+
+    RefPtr<BitmapContext> bitmapContext = createBitmapContext(pageWidthInPixels, totalHeight, rowBytes, buffer);
+    CGContextRef context = bitmapContext->cgContext();
+    CGContextTranslateCTM(context, 0, totalHeight);
+    CGContextScaleCTM(context, 1, -1);
+    [mainFrame printToCGContext:context pageWidth:pageWidthInPixels pageHeight:pageHeightInPixels];
     return bitmapContext.release();
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to