OLD | NEW |
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 "printing/page_setup.h" | 5 #include "printing/page_setup.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 | 10 |
(...skipping 23 matching lines...) Expand all Loading... |
34 left == rhs.left && | 34 left == rhs.left && |
35 top == rhs.top && | 35 top == rhs.top && |
36 right == rhs.right && | 36 right == rhs.right && |
37 bottom == rhs.bottom; | 37 bottom == rhs.bottom; |
38 } | 38 } |
39 | 39 |
40 PageSetup::PageSetup() { | 40 PageSetup::PageSetup() { |
41 Clear(); | 41 Clear(); |
42 } | 42 } |
43 | 43 |
| 44 PageSetup::PageSetup(const PageSetup& other) = default; |
| 45 |
44 PageSetup::~PageSetup() {} | 46 PageSetup::~PageSetup() {} |
45 | 47 |
46 void PageSetup::Clear() { | 48 void PageSetup::Clear() { |
47 physical_size_.SetSize(0, 0); | 49 physical_size_.SetSize(0, 0); |
48 printable_area_.SetRect(0, 0, 0, 0); | 50 printable_area_.SetRect(0, 0, 0, 0); |
49 overlay_area_.SetRect(0, 0, 0, 0); | 51 overlay_area_.SetRect(0, 0, 0, 0); |
50 content_area_.SetRect(0, 0, 0, 0); | 52 content_area_.SetRect(0, 0, 0, 0); |
51 effective_margins_.Clear(); | 53 effective_margins_.Clear(); |
52 text_height_ = 0; | 54 text_height_ = 0; |
53 forced_margins_ = false; | 55 forced_margins_ = false; |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 physical_size_.width() - | 158 physical_size_.width() - |
157 effective_margins_.right - | 159 effective_margins_.right - |
158 content_area_.x())); | 160 content_area_.x())); |
159 content_area_.set_height(std::max(0, | 161 content_area_.set_height(std::max(0, |
160 physical_size_.height() - | 162 physical_size_.height() - |
161 effective_margins_.bottom - | 163 effective_margins_.bottom - |
162 content_area_.y())); | 164 content_area_.y())); |
163 } | 165 } |
164 | 166 |
165 } // namespace printing | 167 } // namespace printing |
OLD | NEW |