| Index: chrome/renderer/print_web_view_helper_linux.cc
|
| diff --git a/chrome/renderer/print_web_view_helper_linux.cc b/chrome/renderer/print_web_view_helper_linux.cc
|
| index 827c61853afe3628440b63c6e7113e0ff031bb55..06f802d71b242ba6d602b3ccc076ddedf7b983d3 100644
|
| --- a/chrome/renderer/print_web_view_helper_linux.cc
|
| +++ b/chrome/renderer/print_web_view_helper_linux.cc
|
| @@ -219,17 +219,14 @@ void PrintWebViewHelper::PrintPage(const ViewMsg_PrintPage_Params& params,
|
| margin_left_in_points,
|
| content_height_in_points + margin_top_in_points +
|
| margin_bottom_in_points);
|
| + gfx::Point content_origin(margin_left_in_points, margin_top_in_points);
|
|
|
| - cairo_t* cairo_context =
|
| - metafile->StartPage(page_size,
|
| - margin_top_in_points,
|
| - margin_left_in_points);
|
| - if (!cairo_context)
|
| + skia::PlatformDevice* device = metafile->StartPageForVectorCanvas(
|
| + page_size, content_origin, 1.0f);
|
| + if (!device)
|
| return;
|
|
|
| - canvas->reset(new skia::VectorCanvas(cairo_context,
|
| - canvas_size.width(),
|
| - canvas_size.height()));
|
| + canvas->reset(new skia::VectorCanvas(device));
|
| frame->printPage(params.page_number, canvas->get());
|
|
|
| // TODO(myhuang): We should handle transformation for paper margins.
|
|
|