| Index: printing/print_settings_initializer_win.cc
|
| diff --git a/printing/print_settings_initializer_win.cc b/printing/print_settings_initializer_win.cc
|
| index 0f6a930b7c8f12c2fb1b28b18c6cce5ffc417e39..0ec96d0ab624a5f7f59240c3409bfe9331b4cd8c 100644
|
| --- a/printing/print_settings_initializer_win.cc
|
| +++ b/printing/print_settings_initializer_win.cc
|
| @@ -49,6 +49,14 @@ void PrintSettingsInitializerWin::InitPrintSettings(
|
| GetDeviceCaps(hdc, HORZRES),
|
| GetDeviceCaps(hdc, VERTRES));
|
|
|
| + // Sanity check the printable_area: we've seen crashes caused by a printable
|
| + // area rect of 0, 0, 0, 0, so it seems some drivers don't set it.
|
| + if (printable_area_device_units.IsEmpty() ||
|
| + !gfx::Rect(physical_size_device_units).Contains(
|
| + printable_area_device_units)) {
|
| + printable_area_device_units = gfx::Rect(physical_size_device_units);
|
| + }
|
| +
|
| print_settings->SetPrinterPrintableArea(physical_size_device_units,
|
| printable_area_device_units,
|
| dpi);
|
|
|