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

Unified Diff: Source/core/page/PrintContextTest.cpp

Issue 1236183003: Add 'printing' flag to PaintInfo (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: PrintAdaption -> Printing; printing -> isPrinting; Comment fixups. Created 5 years, 5 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 | « no previous file | Source/core/paint/BlockPainter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
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)
« no previous file with comments | « no previous file | Source/core/paint/BlockPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698