| 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 542a97aa660f388ba2681679f7aebbc97263fa79..b92e52d602d25a9090d272ad76e8b92b69dbb01f 100644
|
| --- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
|
| +++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
|
| @@ -330,45 +330,43 @@ class ChromePrintContext : public PrintContext {
|
| IntRect allPagesRect(0, 0, pageWidth, totalHeight);
|
|
|
| PaintRecordBuilder builder(allPagesRect, &canvas->getMetaData());
|
| - {
|
| - GraphicsContext& context = builder.context();
|
| - context.setPrinting(true);
|
| - context.beginRecording(allPagesRect);
|
| -
|
| - // Fill the whole background by white.
|
| - context.fillRect(FloatRect(0, 0, pageWidth, totalHeight), Color::white);
|
| -
|
| - int currentHeight = 0;
|
| - for (size_t pageIndex = 0; pageIndex < numPages; pageIndex++) {
|
| - // Draw a line for a page boundary if this isn't the first page.
|
| - if (pageIndex > 0) {
|
| - context.save();
|
| - context.setStrokeColor(Color(0, 0, 255));
|
| - context.setFillColor(Color(0, 0, 255));
|
| - context.drawLine(IntPoint(0, currentHeight),
|
| - IntPoint(pageWidth, currentHeight));
|
| - context.restore();
|
| - }
|
| + GraphicsContext& context = builder.context();
|
| + context.setPrinting(true);
|
| + context.beginRecording(allPagesRect);
|
| +
|
| + // Fill the whole background by white.
|
| + context.fillRect(FloatRect(0, 0, pageWidth, totalHeight), Color::white);
|
| +
|
| + int currentHeight = 0;
|
| + for (size_t pageIndex = 0; pageIndex < numPages; pageIndex++) {
|
| + // Draw a line for a page boundary if this isn't the first page.
|
| + if (pageIndex > 0) {
|
| + context.save();
|
| + context.setStrokeColor(Color(0, 0, 255));
|
| + context.setFillColor(Color(0, 0, 255));
|
| + context.drawLine(IntPoint(0, currentHeight),
|
| + IntPoint(pageWidth, currentHeight));
|
| + context.restore();
|
| + }
|
|
|
| - AffineTransform transform;
|
| - transform.translate(0, currentHeight);
|
| + AffineTransform transform;
|
| + transform.translate(0, currentHeight);
|
| #if OS(WIN) || OS(MACOSX)
|
| - // Account for the disabling of scaling in spoolPage. In the context
|
| - // of spoolAllPagesWithBoundaries the scale HAS NOT been pre-applied.
|
| - float scale = getPageShrink(pageIndex);
|
| - transform.scale(scale, scale);
|
| + // Account for the disabling of scaling in spoolPage. In the context
|
| + // of spoolAllPagesWithBoundaries the scale HAS NOT been pre-applied.
|
| + float scale = getPageShrink(pageIndex);
|
| + transform.scale(scale, scale);
|
| #endif
|
| - context.save();
|
| - context.concatCTM(transform);
|
| + context.save();
|
| + context.concatCTM(transform);
|
|
|
| - spoolPage(context, pageIndex, allPagesRect);
|
| + spoolPage(context, pageIndex, allPagesRect);
|
|
|
| - context.restore();
|
| + context.restore();
|
|
|
| - currentHeight += pageSizeInPixels.height() + 1;
|
| - }
|
| - canvas->PlaybackPaintRecord(context.endRecording());
|
| + currentHeight += pageSizeInPixels.height() + 1;
|
| }
|
| + canvas->PlaybackPaintRecord(context.endRecording());
|
| }
|
|
|
| protected:
|
|
|