| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Alp Toker <alp@atoker.com> | 2 * Copyright (C) 2007 Alp Toker <alp@atoker.com> |
| 3 * Copyright (C) 2007 Apple Inc. | 3 * Copyright (C) 2007 Apple Inc. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 #include "core/layout/LayoutView.h" | 25 #include "core/layout/LayoutView.h" |
| 26 #include "core/layout/api/LayoutViewItem.h" | 26 #include "core/layout/api/LayoutViewItem.h" |
| 27 #include "platform/graphics/GraphicsContext.h" | 27 #include "platform/graphics/GraphicsContext.h" |
| 28 | 28 |
| 29 namespace blink { | 29 namespace blink { |
| 30 | 30 |
| 31 // By shrinking to a width of 75% (1.333f) we will render the correct physical | 31 // By shrinking to a width of 75% (1.333f) we will render the correct physical |
| 32 // dimensions in paged media (i.e. cm, pt,). The shrinkage used | 32 // dimensions in paged media (i.e. cm, pt,). The shrinkage used |
| 33 // to be 80% (1.25f) to match other browsers - they have since moved on. | 33 // to be 80% (1.25f) to match other browsers - they have since moved on. |
| 34 // Wide pages will be scaled down more than this. | 34 // Wide pages will be scaled down more than this. |
| 35 const float kPrintingMinimumShrinkFactor = 1.333f; | 35 const float kPrintingMinimumShrinkFactor = 1.33333333f; |
| 36 | 36 |
| 37 // This number determines how small we are willing to reduce the page content | 37 // This number determines how small we are willing to reduce the page content |
| 38 // in order to accommodate the widest line. If the page would have to be | 38 // in order to accommodate the widest line. If the page would have to be |
| 39 // reduced smaller to make the widest line fit, we just clip instead (this | 39 // reduced smaller to make the widest line fit, we just clip instead (this |
| 40 // behavior matches MacIE and Mozilla, at least). | 40 // behavior matches MacIE and Mozilla, at least). |
| 41 // TODO(rhogan): Decide if this quirk is still required. | 41 // TODO(rhogan): Decide if this quirk is still required. |
| 42 const float kPrintingMaximumShrinkFactor = 2; | 42 const float kPrintingMaximumShrinkFactor = 2; |
| 43 | 43 |
| 44 PrintContext::PrintContext(LocalFrame* frame) | 44 PrintContext::PrintContext(LocalFrame* frame) |
| 45 : frame_(frame), is_printing_(false), linked_destinations_valid_(false) {} | 45 : frame_(frame), is_printing_(false), linked_destinations_valid_(false) {} |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 print_context.ComputePageRectsWithPageSize(scaled_page_size); | 344 print_context.ComputePageRectsWithPageSize(scaled_page_size); |
| 345 return print_context.PageCount(); | 345 return print_context.PageCount(); |
| 346 } | 346 } |
| 347 | 347 |
| 348 DEFINE_TRACE(PrintContext) { | 348 DEFINE_TRACE(PrintContext) { |
| 349 visitor->Trace(frame_); | 349 visitor->Trace(frame_); |
| 350 visitor->Trace(linked_destinations_); | 350 visitor->Trace(linked_destinations_); |
| 351 } | 351 } |
| 352 | 352 |
| 353 } // namespace blink | 353 } // namespace blink |
| OLD | NEW |