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, |
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 * Library General Public License for more details. | 13 * Library General Public License for more details. |
14 * | 14 * |
15 * You should have received a copy of the GNU Library General Public License | 15 * You should have received a copy of the GNU Library General Public License |
16 * along with this library; see the file COPYING.LIB. If not, write to | 16 * along with this library; see the file COPYING.LIB. If not, write to |
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
18 * Boston, MA 02110-1301, USA. | 18 * Boston, MA 02110-1301, USA. |
19 */ | 19 */ |
20 | 20 |
21 #include "config.h" | 21 #include "config.h" |
22 #include "core/page/PrintContext.h" | 22 #include "core/page/PrintContext.h" |
23 | 23 |
24 #include "core/frame/Frame.h" | 24 #include "core/frame/Frame.h" |
25 #include "core/frame/FrameView.h" | 25 #include "core/frame/FrameView.h" |
26 #include "core/platform/graphics/GraphicsContext.h" | |
27 #include "core/rendering/RenderView.h" | 26 #include "core/rendering/RenderView.h" |
| 27 #include "platform/graphics/GraphicsContext.h" |
28 | 28 |
29 namespace WebCore { | 29 namespace WebCore { |
30 | 30 |
31 // By imaging to a width a little wider than the available pixels, | 31 // By imaging to a width a little wider than the available pixels, |
32 // thin pages will be scaled down a little, matching the way they | 32 // thin pages will be scaled down a little, matching the way they |
33 // print in IE and Camino. This lets them use fewer sheets than they | 33 // print in IE and Camino. This lets them use fewer sheets than they |
34 // would otherwise, which is presumably why other browsers do this. | 34 // would otherwise, which is presumably why other browsers do this. |
35 // Wide pages will be scaled down more than this. | 35 // Wide pages will be scaled down more than this. |
36 const float printingMinimumShrinkFactor = 1.25f; | 36 const float printingMinimumShrinkFactor = 1.25f; |
37 | 37 |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 printContext.spoolPage(graphicsContext, pageIndex, pageWidth); | 401 printContext.spoolPage(graphicsContext, pageIndex, pageWidth); |
402 graphicsContext.restore(); | 402 graphicsContext.restore(); |
403 | 403 |
404 currentHeight += pageSizeInPixels.height() + 1; | 404 currentHeight += pageSizeInPixels.height() + 1; |
405 } | 405 } |
406 | 406 |
407 graphicsContext.restore(); | 407 graphicsContext.restore(); |
408 } | 408 } |
409 | 409 |
410 } | 410 } |
OLD | NEW |