| Index: chrome/renderer/render_view.cc
|
| ===================================================================
|
| --- chrome/renderer/render_view.cc (revision 12851)
|
| +++ chrome/renderer/render_view.cc (working copy)
|
| @@ -462,8 +462,12 @@
|
| HDC hdc = emf.hdc();
|
| DCHECK(hdc);
|
| skia::PlatformDeviceWin::InitializeDC(hdc);
|
| - int size_x = canvas_size.width();
|
| - int size_y = canvas_size.height();
|
| + // Since WebKit extends the page width depending on the magical shrink
|
| + // factor we make sure the canvas covers the worst case scenario
|
| + // (x2.0 currently). PrintContext will then set the correct clipping region.
|
| + int size_x = static_cast<int>(canvas_size.width() * params.params.max_shrink);
|
| + int size_y = static_cast<int>(canvas_size.height() *
|
| + params.params.max_shrink);
|
| // Calculate the dpi adjustment.
|
| float shrink = static_cast<float>(canvas_size.width()) /
|
| params.params.printable_size.width();
|
|
|