Index: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp |
diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp |
index c8ea114f4089f8b0d4d649f386af1f8c356ddea9..f2d8d80727a518d30a005c3a16b1ff44a89cb43d 100644 |
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp |
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp |
@@ -174,6 +174,7 @@ |
#include "platform/fonts/FontCache.h" |
#include "platform/graphics/GraphicsContext.h" |
#include "platform/graphics/GraphicsLayerClient.h" |
+#include "platform/graphics/GraphicsScreen.h" |
#include "platform/graphics/paint/ClipRecorder.h" |
#include "platform/graphics/paint/DrawingRecorder.h" |
#include "platform/graphics/paint/SkPictureBuilder.h" |
@@ -360,6 +361,10 @@ public: |
float spoolSinglePage(WebCanvas* canvas, int pageNumber) |
{ |
+ WillPaintForDevice device(ScreenDevice::sRGBPrint); // FIXME: pdfium. |
+ if (!frame()->page()) |
+ return 0; |
+ |
dispatchEventsForPrintingOnAllFrames(); |
if (!frame()->document() || !frame()->document()->layoutView()) |
return 0; |
@@ -379,6 +384,10 @@ public: |
void spoolAllPagesWithBoundaries(WebCanvas* canvas, const FloatSize& pageSizeInPixels) |
{ |
+ WillPaintForDevice device(ScreenDevice::sRGBPrint); // FIXME: pdfium. |
+ if (!frame()->page()) |
+ return; |
+ |
dispatchEventsForPrintingOnAllFrames(); |
if (!frame()->document() || !frame()->document()->layoutView()) |
return; |