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

Side by Side Diff: third_party/WebKit/Source/core/page/PrintContext.cpp

Issue 1817873002: Print with the correct physical dimensions when specified (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@262769
Patch Set: Created 4 years, 9 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
OLDNEW
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
25 #include "core/layout/LayoutView.h" 25 #include "core/layout/LayoutView.h"
26 #include "platform/graphics/GraphicsContext.h" 26 #include "platform/graphics/GraphicsContext.h"
27 27
28 namespace blink { 28 namespace blink {
29 29
30 // By imaging to a width a little wider than the available pixels, 30 // By imaging to a width a little wider than the available pixels,
31 // thin pages will be scaled down a little, matching the way they 31 // thin pages will be scaled down a little, matching the way they
32 // print in IE and Camino. This lets them use fewer sheets than they 32 // print in IE and Camino. This lets them use fewer sheets than they
33 // would otherwise, which is presumably why other browsers do this. 33 // would otherwise, which is presumably why other browsers do this.
34 // Wide pages will be scaled down more than this. 34 // Wide pages will be scaled down more than this.
35 const float printingMinimumShrinkFactor = 1.25f; 35 const float printingMinimumShrinkFactor = 1.33f;
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 const float printingMaximumShrinkFactor = 2; 41 const float printingMaximumShrinkFactor = 2;
42 42
43 PrintContext::PrintContext(LocalFrame* frame) 43 PrintContext::PrintContext(LocalFrame* frame)
44 : m_frame(frame) 44 : m_frame(frame)
45 , m_isPrinting(false) 45 , m_isPrinting(false)
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 314
315 DEFINE_TRACE(PrintContext) 315 DEFINE_TRACE(PrintContext)
316 { 316 {
317 #if ENABLE(OILPAN) 317 #if ENABLE(OILPAN)
318 visitor->trace(m_frame); 318 visitor->trace(m_frame);
319 visitor->trace(m_linkedDestinations); 319 visitor->trace(m_linkedDestinations);
320 #endif 320 #endif
321 } 321 }
322 322
323 } // namespace blink 323 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698