summaryrefslogtreecommitdiffstats
path: root/WebKitTools/DumpRenderTree/PixelDumpSupport.cpp
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-07-22 15:37:06 +0100
committerBen Murdoch <benm@google.com>2010-07-27 10:20:25 +0100
commit967717af5423377c967781471ee106e2bb4e11c8 (patch)
tree1e701dc0a12f7f07cce1df4a7681717de77a211b /WebKitTools/DumpRenderTree/PixelDumpSupport.cpp
parentdcc30a9fca45f634b1d3a12b276d3a0ccce99fc3 (diff)
downloadexternal_webkit-967717af5423377c967781471ee106e2bb4e11c8.zip
external_webkit-967717af5423377c967781471ee106e2bb4e11c8.tar.gz
external_webkit-967717af5423377c967781471ee106e2bb4e11c8.tar.bz2
Merge WebKit at r63859 : Initial merge by git.
Change-Id: Ie8096c63ec7c991c9a9cba8bdd9c3b74a3b8ed62
Diffstat (limited to 'WebKitTools/DumpRenderTree/PixelDumpSupport.cpp')
-rw-r--r--WebKitTools/DumpRenderTree/PixelDumpSupport.cpp8
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