Chromium Code Reviews| Index: Source/core/page/PrintContextTest.cpp |
| diff --git a/Source/core/page/PrintContextTest.cpp b/Source/core/page/PrintContextTest.cpp |
| index cb49b96c035e43d518f3c6c048670477b05762e8..950e1214ee9c8b81f86b67a9b79052264124b677 100644 |
| --- a/Source/core/page/PrintContextTest.cpp |
| +++ b/Source/core/page/PrintContextTest.cpp |
| @@ -94,19 +94,15 @@ protected: |
| void printSinglePage(SkCanvas& canvas) |
| { |
| IntRect pageRect(0, 0, kPageWidth, kPageHeight); |
| + printContext().begin(pageRect.width(), pageRect.height()); |
| document().view()->updateAllLifecyclePhases(); |
| - document().setPrinting(true); |
|
Julien - ping for review
2015/07/15 17:14:25
Should we remove Document::setPrinting if we're no
fs
2015/07/15 18:25:58
Document::setPrinting(...) is still called, only v
Julien - ping for review
2015/07/16 14:32:01
I am just concerned about having several sites hol
|
| SkPictureBuilder pictureBuilder(pageRect); |
| GraphicsContext& context = pictureBuilder.context(); |
| context.setPrinting(true); |
| - DeprecatedPaintLayer& rootLayer = *document().view()->layoutView()->layer(); |
| - DeprecatedPaintLayerPaintingInfo paintingInfo(&rootLayer, LayoutRect(pageRect), PaintBehaviorNormal, LayoutSize()); |
| - DeprecatedPaintLayerPainter(rootLayer).paintLayerContents(&context, paintingInfo, PaintLayerPaintingCompositingAllPhases); |
| - printContext().begin(kPageWidth, kPageHeight); |
| - printContext().end(); |
| + document().view()->paintContents(&context, pageRect); |
| pictureBuilder.endRecording()->playback(&canvas); |
| printContext().outputLinkedDestinations(&canvas, pageRect); |
| - document().setPrinting(false); |
| + printContext().end(); |
| } |
| static String absoluteBlockHtmlForLink(int x, int y, int width, int height, const char* url, const char* children = nullptr) |