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

Unified Diff: chrome/renderer/print_web_view_helper.cc

Issue 10836330: Rasterize page before printing. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 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
Index: chrome/renderer/print_web_view_helper.cc
diff --git a/chrome/renderer/print_web_view_helper.cc b/chrome/renderer/print_web_view_helper.cc
index acbc450266fe8edf5d3289c6b99cfc4acc0ee2c4..d8fb811c15ce07af46a195b634396ade6d4affcb 100644
--- a/chrome/renderer/print_web_view_helper.cc
+++ b/chrome/renderer/print_web_view_helper.cc
@@ -104,7 +104,8 @@ bool PrintMsg_Print_Params_IsValid(const PrintMsg_Print_Params& params) {
return !params.content_size.IsEmpty() && !params.page_size.IsEmpty() &&
!params.printable_area.IsEmpty() && params.document_cookie &&
params.desired_dpi && params.max_shrink && params.min_shrink &&
- params.dpi && (params.margin_top >= 0) && (params.margin_left >= 0);
+ params.dpi && (params.margin_top >= 0) && (params.margin_left >= 0) &&
+ params.raster_size > 0;
}
bool PageLayoutIsEqual(const PrintMsg_PrintPages_Params& oldParams,
@@ -137,7 +138,9 @@ bool PrintMsg_Print_Params_IsEqual(
oldParams.params.title == newParams.params.title &&
oldParams.params.url == newParams.params.url &&
std::equal(oldParams.pages.begin(), oldParams.pages.end(),
- newParams.pages.begin());
+ newParams.pages.begin()) &&
+ oldParams.params.raster_type == newParams.params.raster_type &&
+ oldParams.params.raster_size == newParams.params.raster_size;
}
PrintMsg_Print_Params GetCssPrintParams(

Powered by Google App Engine
This is Rietveld 408576698