diff options
Diffstat (limited to 'WebKitTools/DumpRenderTree/PixelDumpSupport.cpp')
-rw-r--r-- | WebKitTools/DumpRenderTree/PixelDumpSupport.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/WebKitTools/DumpRenderTree/PixelDumpSupport.cpp b/WebKitTools/DumpRenderTree/PixelDumpSupport.cpp index e372827..b5a5146 100644 --- a/WebKitTools/DumpRenderTree/PixelDumpSupport.cpp +++ b/WebKitTools/DumpRenderTree/PixelDumpSupport.cpp @@ -42,7 +42,13 @@ void dumpWebViewAsPixelsAndCompareWithExpected(const std::string& expectedHash) { - RefPtr<BitmapContext> context = createBitmapContextFromWebView(gLayoutTestController->testOnscreen(), gLayoutTestController->testRepaint(), gLayoutTestController->testRepaintSweepHorizontally(), gLayoutTestController->dumpSelectionRect()); + RefPtr<BitmapContext> context; +#if PLATFORM(MAC) + if (gLayoutTestController->isPrinting()) + context = createPagedBitmapContext(); + else +#endif + context = createBitmapContextFromWebView(gLayoutTestController->testOnscreen(), gLayoutTestController->testRepaint(), gLayoutTestController->testRepaintSweepHorizontally(), gLayoutTestController->dumpSelectionRect()); ASSERT(context); // Compute the hash of the bitmap context pixels |