Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(622)

Unified Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 1331533002: [poc] curve-filter Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix CanvasRenderingContext2D::createPattern crash for #40 Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/web/WebFontImpl.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « third_party/WebKit/Source/web/WebFontImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698