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

Side by Side Diff: chrome/renderer/print_web_view_helper.cc

Issue 7868001: Add check to debug issue 96063. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/renderer/print_web_view_helper.h" 5 #include "chrome/renderer/print_web_view_helper.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after
989 margin_left_in_pixels - 989 margin_left_in_pixels -
990 margin_right_in_pixels); 990 margin_right_in_pixels);
991 page_layout_in_points->content_height = 991 page_layout_in_points->content_height =
992 ConvertPixelsToPoint(page_size_in_pixels.height - 992 ConvertPixelsToPoint(page_size_in_pixels.height -
993 margin_top_in_pixels - 993 margin_top_in_pixels -
994 margin_bottom_in_pixels); 994 margin_bottom_in_pixels);
995 995
996 // Invalid page size and/or margins. We just use the default setting. 996 // Invalid page size and/or margins. We just use the default setting.
997 if (page_layout_in_points->content_width < 1.0 || 997 if (page_layout_in_points->content_width < 1.0 ||
998 page_layout_in_points->content_height < 1.0) { 998 page_layout_in_points->content_height < 1.0) {
999 // TODO(vandebo) remove CHECK after debugging crbug.com/96063
1000 CHECK(frame != NULL);
999 GetPageSizeAndMarginsInPoints(NULL, page_index, default_params, 1001 GetPageSizeAndMarginsInPoints(NULL, page_index, default_params,
1000 page_layout_in_points); 1002 page_layout_in_points);
1001 return; 1003 return;
1002 } 1004 }
1003 1005
1004 page_layout_in_points->margin_top = 1006 page_layout_in_points->margin_top =
1005 ConvertPixelsToPointDouble(margin_top_in_pixels); 1007 ConvertPixelsToPointDouble(margin_top_in_pixels);
1006 page_layout_in_points->margin_right = 1008 page_layout_in_points->margin_right =
1007 ConvertPixelsToPointDouble(margin_right_in_pixels); 1009 ConvertPixelsToPointDouble(margin_right_in_pixels);
1008 page_layout_in_points->margin_bottom = 1010 page_layout_in_points->margin_bottom =
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
1527 const gfx::Size& 1529 const gfx::Size&
1528 PrintWebViewHelper::PrintPreviewContext::GetPrintCanvasSize() const { 1530 PrintWebViewHelper::PrintPreviewContext::GetPrintCanvasSize() const {
1529 return prep_frame_view_->GetPrintCanvasSize(); 1531 return prep_frame_view_->GetPrintCanvasSize();
1530 } 1532 }
1531 1533
1532 void PrintWebViewHelper::PrintPreviewContext::ClearContext() { 1534 void PrintWebViewHelper::PrintPreviewContext::ClearContext() {
1533 prep_frame_view_.reset(); 1535 prep_frame_view_.reset();
1534 metafile_.reset(); 1536 metafile_.reset();
1535 pages_to_render_.clear(); 1537 pages_to_render_.clear();
1536 } 1538 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698